Repository navigation
refactor: rename this repo's seed-repo-template.sh to emit-standard-file.sh — the seeder has one home (.github-private#1927) - #1294
Conversation
…ile.sh — the seeder has one home (petry-projects/.github-private#1927) Two scripts in two repos were both called seed-repo-template.sh and were taken for diverged copies of one tool. They are different tools: - petry-projects/.github-private/scripts/seed-repo-template.sh is the seeder. It writes the baseline scaffold into repo-template and opens the seed PR. - This repo's script only prints one standard file (the .gitignore baseline, or a workflow stub verbatim) from a local checkout. It never writes anywhere. So the name now has one home. This repo's script becomes scripts/emit-standard-file.sh, with no behaviour change. - Rename the script and its two test suites. The tests change only the script path they call; every assertion is unchanged. - Add tests/test_seed_repo_template_single_home.bats, which fails if a file named seed-repo-template.sh reappears in this repo, and run it whenever such a file is added. - AGENTS.md documents the home of the seeder. The bootstrap doc and the versioning standard name the right script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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! |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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>
CodeAnt PR Risk: Low Risk
Assessed commit: |
|
dev-lead is withholding action on this item. It is labeled To re-enable automated pickup: remove the |
|
…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>



Summary
This repo's
scripts/seed-repo-template.shis renamed toscripts/emit-standard-file.sh. Its behaviour does not change. The nameseed-repo-template.shnow has one home:petry-projects/.github-private.tests/test_seed_repo_template_single_home.bats, fails if a file namedseed-repo-template.shreappears anywhere in this repo. The Gitignore Baseline Tests workflow runs it, and now also triggers on any path matching**/seed-repo-template.sh.AGENTS.md("What lives where") documents where the seeder lives.docs/bootstrap/new-repo-validation.mdandstandards/standards-versioning.mdname the right script.Closes petry-projects/.github-private#1927 ("Two diverged copies of seed-repo-template.sh (.github vs .github-private, 964-line diff) — pick one canonical home").
Problem, and a correction to the issue
The issue describes two diverged copies of one script. They are two different tools that shared a name:
petry-projects/.githubpetry-projects/.github-private.gitignorebaseline, or a workflow stub verbatimrepo-template: fetches standards at a pinned ref, repins stubs, writes files, opens the seed PRrepo-templateSo the 964-line diff is not drift, and the
.githubscript cannot reintroduce the bug the issue worried about (the seed wiping files it does not own), because it never writes. The real defect was the shared name: nothing told an operator which one was "the seeder".Acceptance criteria
petry-projects/.github-privatefor the seeder and its suite. The maintainer chose to rename this repo's script instead of moving either tool, since each one's consumers live beside it.AGENTS.md. The matching sentence forpetry-projects/.github-privateis in that repo's PR #2256.Risk
Low. A rename with no behaviour change. A search of the org finds no caller of this repo's script outside this repo. Anything that calls
scripts/seed-repo-template.shin a checkout of this repo by hand will need the new name.Test plan
bats tests/test_emit_standard_file_gitignore.bats tests/test_emit_standard_file_workflows.bats tests/test_seed_repo_template_single_home.bats: 20 pass (17 existing, 3 new).seed-repo-template.shat two depths in a scratch repo and asserts both are found, whilenot-seed-repo-template.shis not.shellcheck --severity=warning -x scripts/emit-standard-file.sh: clean.actionlinton the workflow: clean.markdownlint-cli2on the three docs: 0 errors.gh search codeacross the org for callers of the old path: none outside this repo.Rollback
Revert this PR.
Monitoring
n/a — no runtime effect. The Gitignore Baseline Tests workflow on this PR runs the renamed suites and the new guard.
Interaction contract
🤖 Generated with Claude Code