Repository navigation
feat: implement issue #2237 — template-drift AHEAD detection: two narrow misclassifications and three untested paths left open by PR 2219 - #2244
Conversation
…row misclassifications and three untested paths left open by PR 2219
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This comment has been minimized.
This comment has been minimized.
CodeAnt PR Risk: Low Risk
Assessed commit: |
|
QA Lead — test-risk advisoryRisk tier: LOW. This changes a lint-time guard in CI automation, and every new path is covered by deterministic, stubbed bats cases. The worst a miss can do is send someone to the wrong re-seed step. It can't touch production data. What I'd shore up (highest leverage first):
All three AC #3 tests are present and match the issue's wording. The suite has no live-network or timing dependencies, so I see no flakiness risk. Escalate? no Advisory only. I comment; I do not change code. Ground: BMAD Test Architecture (bmad-tea v1.19.0). To opt out on this item, add the qa-lead:hands-off label. |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-11T02:08:07Z. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
This is a CodeRabbit OSS review rate-limit notice — the bot has exhausted its free review quota for this public repository. All PR CI checks pass, and no code changes are needed. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
…and refuse downgrades (#1925) (#2256) * feat: implement issue #2237 — template-drift AHEAD detection: two narrow misclassifications and three untested paths left open by PR 2219 * feat: seed PRs record their standards ref, supersede older seed PRs, and refuse downgrades (#1925) seed-repo-template.sh opened seed PRs that did not say which standards ref they came from, left older seed PRs open, and could overwrite a template file with an older version of itself. - Provenance: the seed PR body states the resolved standards ref, how it was chosen and the commit. A reused PR's body is rewritten on each run. - Supersede: #2233 already updates an open seed PR in place. When several are open the newest is kept and each older one is now closed with a comment linking it. A PR that cannot be closed fails the run. - No downgrades: a file that differs from the run's emission but matches the emission at standards HEAD is refused, with "standards channel is behind the template — promote standards". If nothing else needs writing, no PR is opened and the empty branch is removed. - A newer-commit check that cannot be made aborts the seed. It is never read as "not ahead". - docs/release/seeding-repo-template.md is the operator procedure. The no-downgrade check reuses the drift guard's HEAD and ancestry reads, so this branch includes the unmerged #2244 (issue #2237) that adds the ancestry read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): restore a pre-existing dated seed branch, and list every open PR - If today's seed branch already exists it may carry an earlier run's edits. It is now handled like an open seed PR's branch: every file is made to match what this run wants. Before, a file this run skipped, preserved or refused kept the earlier run's content, so a refused downgrade could still ship. - The open-PR listing limit is applied before the seed-branch filter, so it is raised from 100 to 1000. A seed PR cut off by the limit would be missed and a second one opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: seed-repo-template.sh has one home, this repo (#1927) The standards repo's same-named script is a different tool and is being renamed to emit-standard-file.sh in petry-projects/.github#1294. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(review): stop on an unreadable PR list, fetch at the recorded commit, and test the real ancestry path - If the open pull requests cannot be listed, the seed stops before it writes anything. Before, a failed listing read as "no seed PR open", which opens a duplicate and leaves the older ones open. - A seed run now fetches every standards file at the commit it records in the PR body, not through the ref name. A channel that moved mid-run could otherwise leave the PR naming a commit its content did not come from. - A dated branch left by an earlier run, with nothing written and nothing the base lacks, opens no PR. - Docs: a channel that cannot be resolved falls back to HEAD and the operator stops; a local STANDARDS_DIR has no commit and no downgrade check, so it is not for a real seed. - Tests: three run the real HEAD read, the real ancestry read and the real child emission with only gh replaced. Others cover the unreadable PR list, a seed PR beyond the first 100 open PRs, the commit pin, a failed provenance update, and a PR number that cannot be read back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>



Problem
template-drift AHEAD detection: two narrow misclassifications and three untested paths left open by PR 2219
From the issue: PR #2219 ("template-drift classifies a template ahead of the standards channel as AHEAD, not DRIFTED", issue #1926) merged with two reviewer findings unanswered and three test gaps the qa-lead advisory listed. None blocked the merge. This issue tracks them.
Risk
Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.
Test plan
Tests added/updated:
tests/template_stub_drift.bats. Verification:bash scripts/dev-lead-lint.sh(shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.Rollback
Revert this PR. No non-revertible side effects (no tags, migrations, or external state).
Monitoring
This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.
Closes #2237