chore(rulesets): repoint apply-rulesets + bootstrap to .github fleet source (#575) - #1013
Conversation
…n .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughLocal ruleset JSON files (code-quality, pr-quality) are removed. apply-rulesets.sh gains fleet mode, fetching ruleset definitions from a standards repo (petry-projects/.github) instead of local files, defaulting RULESETS_DIR to empty. bootstrap-new-repo.sh forces fleet mode via RULESETS_DIR="". Docs and tests are updated accordingly. ChangesFleet-sourced rulesets migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Bootstrap as bootstrap-new-repo.sh
participant Apply as apply-rulesets.sh
participant GH as gh api
participant Standards as petry-projects/.github
Bootstrap->>Apply: run with RULESETS_DIR=""
Apply->>Apply: detect unset RULESETS_DIR
Apply->>GH: fetch code-quality.json, pr-quality.json
GH->>Standards: read standards/rulesets/*.json
Standards-->>GH: base64-encoded content
GH-->>Apply: decoded JSON files in temp dir
Apply->>Apply: apply pr-quality and code-quality rulesets
Apply-->>Bootstrap: report "done (2 ruleset(s))"
Possibly related issues
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-07-02T15:36:47Z. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
There was a problem hiding this comment.
Code Review
This pull request centralizes the organization-wide fleet rulesets (code-quality and pr-quality) by moving them to the petry-projects/.github repository and updating the bootstrap and ruleset application scripts to fetch them dynamically. The local ruleset JSON files have been removed, and the test suites have been updated to mock and verify this new fleet-mode orchestration. The review feedback highlights two important robustness improvements: explicitly propagating failures from mktemp -d inside _materialize_fleet_dir since set -e is suspended during its execution, and guarding grep -c in the test suite with || true to prevent premature test failures when zero matches are found.
There was a problem hiding this comment.
Pull request overview
This PR repoints .github-private’s codified ruleset applier and new-repo bootstrapper to source the org-wide “fleet” rulesets (code-quality, pr-quality) from petry-projects/.github (standards/rulesets/), removing the now-redundant local JSON copies while keeping release-channel-tags repo-local.
Changes:
- Update
scripts/apply-rulesets.shto default to “fleet mode” (materializecode-quality/pr-qualityfrompetry-projects/.github) whenRULESETS_DIRis unset; require explicitRULESETS_DIRto applyrelease-channel-tags. - Update
scripts/bootstrap-new-repo.sh(and tests/docs) so bootstrap applies exactly the two fleet rulesets and never appliesrelease-channel-tags. - Remove local
.github/rulesets/{code-quality,pr-quality}.jsonand adjust tests/docs accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/apply-rulesets.sh |
Adds fleet-mode materialization from petry-projects/.github when RULESETS_DIR is unset. |
scripts/bootstrap-new-repo.sh |
Updates bootstrap ruleset step messaging/behavior to apply only fleet rulesets. |
tests/test_apply_rulesets.bats |
Adds fleet-mode coverage and makes local release-channel-tags application explicitly pass RULESETS_DIR. |
tests/test_bootstrap_new_repo.bats |
Shifts validation from local JSON shape checks to orchestration assertions (2 fleet rulesets, not release-channel-tags). |
docs/bootstrap/new-repo-validation.md |
Updates validation transcript and source-of-truth references to petry-projects/.github standards rulesets. |
.github/rulesets/pr-quality.json |
Removed local copy (now owned by petry-projects/.github). |
.github/rulesets/code-quality.json |
Removed local copy (now owned by petry-projects/.github). |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
Superseded by automated re-review at
|
…with org policy (#575) (#582) The codified pr-quality had require_last_push_approval=false, baked in when the file was authored (#972). That contradicts the org's actual policy: the meta-repos (.github, .github-private) and newer repos (TalkTerm, google-app-scripts) already enforce require_last_push_approval=true live, and #895 verified auto-rebase's update-branch is EXEMPT from last-push-approval (so enabling it does not fight the auto-rebase flow). Set the codified source of truth to true. Blast radius on next apply-rulesets run: tightens the three drifted repos still at false (ContentTwin, markets, broodly); no-op on the four already at true. Stacked on #577 (the relocation). Resolves the pr-quality file-vs-live drift flagged in petry-projects/.github-private#1013. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sets/ (#575) (#577) * chore(rulesets): relocate code-quality + pr-quality JSON to standards/rulesets/ (#575) Move the org-wide compliance ruleset source of truth into its canonical home in petry-projects/.github. `.github` owns org-wide standards and compliance policy; `.github-private` is scoped to agents/skills and their assets (repo boundary codified in #576). - Add standards/rulesets/{code-quality,pr-quality}.json — byte-identical to the current .github-private/.github/rulesets/ copies (the 4-check code-quality set; NO coverage/secret-scan additions, which are sequenced separately to avoid bricking fleet repos that don't yet produce those checks). - Add standards/rulesets/README.md documenting source-of-truth, the scope boundary (release-channel-tags stays in .github-private), and the safe-sequencing rule for required-check additions. - github-settings.md: add a "Source of truth" pointer to standards/rulesets/. - AGENTS.md: add a Rulesets row to the Organization Standards index. The tooling repoint (apply-rulesets.sh + bootstrap-new-repo.sh) and removal of the JSONs from .github-private land in a follow-up PR against .github-private, which must merge after this one. Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(pr-quality): require last push approval — align codified ruleset with org policy (#575) (#582) The codified pr-quality had require_last_push_approval=false, baked in when the file was authored (#972). That contradicts the org's actual policy: the meta-repos (.github, .github-private) and newer repos (TalkTerm, google-app-scripts) already enforce require_last_push_approval=true live, and #895 verified auto-rebase's update-branch is EXEMPT from last-push-approval (so enabling it does not fight the auto-rebase flow). Set the codified source of truth to true. Blast radius on next apply-rulesets run: tightens the three drifted repos still at false (ContentTwin, markets, broodly); no-op on the four already at true. Stacked on #577 (the relocation). Resolves the pr-quality file-vs-live drift flagged in petry-projects/.github-private#1013. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 33cece12bf2fe09e4f893187cd6fea8219ee5f6e
Review mode: triage-approved (single reviewer)
Summary
Re-review after the cycle-1 sequencing hold. The single blocking finding — companion PR petry-projects/.github#577 not yet merged — is now resolved: #577 merged 2026-07-02T23:24Z and standards/rulesets/ in petry-projects/.github serves both fleet JSONs (verified via the contents API). The PR's own files are unchanged since the prior review (the only new commit is a merge of main into the branch), so the prior code analysis stands. All CI green at 33cece1, all 5 review threads resolved. Approving.
Linked issue analysis
No same-repo closing issue. Implements AC #1 (.github-private side), AC #2 (repoint + dedupe), and AC #3 (migration safety) of petry-projects/.github#575. Fleet JSONs removed here; the applier defaults to fleet mode sourcing STANDARDS_REPO (petry-projects/.github, now populated by the merged #577); bootstrap applies exactly the 2 fleet rulesets and no longer applies the repo-local release-channel-tags to new repos (consistent with the boundary codified in #576).
Findings
Prior blocking finding — RESOLVED:
Unmet merge-order dependency— petry-projects/.github#577 is merged (2026-07-02T23:24Z, ab54917d). Verifiedrepos/petry-projects/.github/contents/standards/rulesetsnow serves code-quality.json + pr-quality.json, so fleet-modeapply-rulesets.sh(and bootstrap step 3) resolves its source. The sequencing hold is cleared.
New verification this cycle (informational, non-blocking):
- Compared the merged fleet JSONs against the local copies this PR deletes:
code-quality.jsonis byte-identical;pr-quality.jsondiffers in one field — fleet hasrequire_last_push_approval: truevs localfalse. This is the pre-existing file-vs-live drift the PR body already flags: the live pr-quality ruleset on this repo hastrue(verified via the rulesets API), so #577 landed with the drift reconciled toward live. Net effect: applying the fleet ruleset here is a no-op vs production, and the stale local file is the copy being deleted. The PR body's "byte-identical" claim is now slightly stale for pr-quality, but the substance is strictly better — no new drift, and the flagged drift is resolved in the owning repo. New bootstrapped repos inheritrequire_last_push_approval: true, a policy decision now owned by petry-projects/.github as intended by #575/#576.
Carried from prior review (code is sound, unchanged since 02cbaad):
_materialize_fleet_dirvalidates each fetched file ([ -s ]), errors clearly, trap-registered temp-dir cleanup.- Fleet mode applies an explicit allowlist (
FLEET_RULESETS=(code-quality pr-quality)), not a*.jsonglob. step_rulesetsforcesRULESETS_DIR=""so an inherited env var can't re-enable repo-local rulesets on bootstrapped repos.- All 5 review threads (gemini ×2, copilot ×3) are resolved.
- Secret scan:
run_secret_scanningMCP tool unavailable in this session; gitleaks CI check is green and the diff contains no credential-like content (removals of already-public ruleset JSON + shell/test/doc changes).
CI status
All checks green at 33cece1: shellcheck, ShellCheck, Lint, bats, unit-tests, CodeQL (actions+python), SonarCloud quality gate passed, agent-shield, Agent Security Scan, gitleaks, holdout-guard, template-drift, gh-aw-compile, validate-agent-profiles, guard, review/review, Compile agentic workflows, CodeRabbit. Dependency-audit ecosystem jobs skipped (no matching ecosystems). mergeStateStatus=BEHIND (branch behind main; auto-rebase machinery exists).
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
|
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…source (#575) (#1013) * chore(rulesets): repoint apply-rulesets + bootstrap to fleet source in .github (#575) The org-wide fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github (standards/rulesets/, relocated there in the companion PR). Repoint the codified applier and the bootstrap orchestrator to source them from there, and remove the local copies. release-channel-tags stays repo-local. apply-rulesets.sh: - Default is now "fleet mode": when RULESETS_DIR is unset, materialize the fleet rulesets from STANDARDS_REPO (default petry-projects/.github) — via a local FLEET_RULESETS_DIR checkout when provided, else a gh contents-API fetch into a temp dir (mirrors seed-repo-template.sh's _fetch_standard model). - The repo-local release-channel-tags is applied by pointing RULESETS_DIR at this repo's own .github/rulesets (unchanged mechanism). - Remove the now-dead SCRIPT_DIR-based local default. bootstrap-new-repo.sh: - step_rulesets now applies exactly the two fleet rulesets to a new repo (fleet mode). release-channel-tags is NO LONGER applied to bootstrapped repos — it protects .github-private's own pr-review/** + dev-lead/** release tags only, so it is repo-local by the #575/#576 boundary. (Previously all 3 were applied.) Remove .github/rulesets/{code-quality,pr-quality}.json (moved to .github). Tests: - test_apply_rulesets.bats: pass RULESETS_DIR explicitly for release-channel-tags; add fleet-mode coverage (2 rulesets applied, never release-channel-tags; dry-run no-writes; missing FLEET_RULESETS_DIR errors). - test_bootstrap_new_repo.bats: provision a fleet fixture in setup so the real apply-rulesets resolves offline; drop the pr-quality/code-quality JSON *shape* assertions (that content is now owned + validated in .github); assert bootstrap applies exactly 2 fleet rulesets and not release-channel-tags. - new-repo-validation.md: 3 -> 2 ruleset(s); source-of-truth now petry-projects/.github. Migration safety (AC): relocated JSONs are byte-identical to the pre-move copies; a live --dry-run against petry-projects/.github-private resolves them and UPDATES the existing rulesets in place (PUT by id, not delete/recreate). code-quality is a live no-op. NOTE: pr-quality shows a PRE-EXISTING file-vs-live delta on .github-private (live require_last_push_approval=true vs file false) — identical before/after this move (the origin/main file carries the same value), so the move introduces no new drift. Flagged as an out-of-scope follow-up. Depends on the companion petry-projects/.github PR (must merge first). Part of #575. Follows #576. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>



Summary
Repoints the codified applier + bootstrap orchestrator to source the org-wide fleet rulesets (
code-quality,pr-quality) frompetry-projects/.github(relocated there in the companion PR petry-projects/.github#577), and removes the local copies.release-channel-tagsstays repo-local. Repo boundary codified in #576.Implements AC #1 (the
.github-privateside), AC #2 (repoint + dedupe), and AC #3 (migration safety) of petry-projects/.github#575.Design decisions (made on best judgment while author was away — flag in review if you'd prefer otherwise)
The two
apply-rulesets.shcopies are divergent generations, not literal duplicates:.github's is a detection-based builder (referenced by the recently-delivered pr-limits ADR #505); this repo's is the file-driven codified applier (#889) that actually consumes the JSONs. I took the issue's "clearly delineate roles" path rather than a risky physical merge:.githubdetection-based copy is left untouched to avoid disturbing #505 — its retirement/annotation is flagged as an open follow-up, not done unilaterally.FLEET_RULESETS_DIRlocal-checkout override → elseghcontents-API fetch fromSTANDARDS_REPO(defaultpetry-projects/.github). Mirrorsseed-repo-template.sh's_fetch_standard. Consistent with the tool already requiringghadmin API access..github-private's ownpr-review/**+dev-lead/**tags only. New repos now get exactly the 2 fleet rulesets.Changes
apply-rulesets.sh— fleet mode (materialize from.github) is the default whenRULESETS_DIRis unset;release-channel-tagsapplied via explicitRULESETS_DIR=.github/rulesets. Removed deadSCRIPT_DIRlocal default.bootstrap-new-repo.sh—step_rulesetsapplies the 2 fleet rulesets; comments/labels updated for the boundary..github/rulesets/{code-quality,pr-quality}.json(moved to.github).test_apply_rulesets.bats(+3 fleet-mode tests, release-channel-tags now passesRULESETS_DIR);test_bootstrap_new_repo.bats(fleet fixture insetup; dropped the JSON shape assertions now owned by.github; asserts exactly 2 fleet rulesets, never release-channel-tags). 24/24 bats pass,shellcheck --severity=warning -xclean.new-repo-validation.md—3→2 ruleset(s); source-of-truth nowpetry-projects/.github.Migration safety (AC #3) — proven
--dry-runagainstpetry-projects/.github-private, sourcing the relocated files, resolves them and updates the existing rulesets in place (PUTby id —code-quality16142164,pr-quality16142042), never delete/recreate:code-qualitylive == file (no-op).pr-qualityon.github-privatehas a file-vs-live delta that predates this PR: liverequire_last_push_approval: true+required_reviewers: [], vs the codified JSON'srequire_last_push_approval: false(+automatic_copilot_code_review_enabled: false). The origin/main JSON (byte-identical to the relocated copy) carries the same values, so this move introduces no new drift. Changing what the checks do is explicitly out of scope for #575 — recommend a separate follow-up to reconcile the codifiedpr-qualitywith the intended.github-privatepolicy.Part of #575. Follows #576.
🤖 Generated with Claude Code
Summary by CodeRabbit
release-channel-tagsruleset during standard bootstrap flows.