Repository navigation
feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface - #972
Conversation
…tstrap-new-repo.sh applies the full non-file policy surface
|
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 (4)
📝 WalkthroughWalkthroughAdds Bootstrap New Repo
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ 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-06-27T16:48:16Z. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new bootstrap script scripts/bootstrap-new-repo.sh to automate repository compliance, along with a codified pr-quality.json ruleset and a comprehensive test suite in tests/test_bootstrap_new_repo.bats. The review feedback highlights several opportunities to improve script robustness and safety under set -u, such as safely defaulting positional parameters to prevent unbound variable crashes, implementing error handling for mktemp in tests, adding pre-flight checks for CLI dependencies, and optimizing subshell usage with here-strings.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
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-06-27T16:55:19Z. |
|
@donpetry-bot please re-review — the prior review was rate-limited at 15:55 (marker on sha |
|
@don-petry I'm on it — starting a fresh review now. Results will appear in a few minutes. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 81b3bda67296fb0ad4a8262ede068585eb057d76
Review mode: triage-approved (single reviewer)
Summary
Phase-2 bootstrap wrapper for issue #967: a thin, DRY_RUN-aware orchestrator (scripts/bootstrap-new-repo.sh) that chains the existing apply-repo-settings.sh and apply-rulesets.sh with fail-fast + pass/fail summary, plus a codified .github/rulesets/pr-quality.json, a 167-line bats suite, and its registration in lint.yml. No policy is reimplemented — the script orchestrates existing apply-* scripts and the new ruleset is data apply-rulesets.sh consumes.
Linked issue analysis
Closes #967. All five acceptance criteria are met: (1) the script invokes apply-repo-settings.sh then apply-rulesets.sh --repo in sequence, fails fast, and prints PASS/FAIL summaries (covered by the sequencing + fail-fast bats tests); (2) pr-quality.json mirrors code-quality.json exactly — OrganizationAdmin + Integration app id 3167543 (dependabot-automerge), both bypass_mode always, targeting ~DEFAULT_BRANCH with no legacy/ad-hoc main ruleset; (3) required status checks remain wired via the existing code-quality.json (SonarCloud, CodeQL, agent-shield, dependency-audit) while pr-quality.json carries the review rule — a clean division of concerns, and the standard label set + CODEOWNERS-team verification are applied; (4) no policy is reimplemented; (5) the bats test covers DRY_RUN and fail-fast paths and is registered in lint.yml. A single DRY_RUN flag is correctly bridged onto DEV_LEAD_DRY_RUN and DRY_RUN for the two sub-scripts.
Findings
No blocking issues. The shell script uses set -euo pipefail, defaults all positionals safely under set -u, passes the repo arg as a plain gh argument (no eval / no injection surface), and treats reads/labels/CODEOWNERS verification as best-effort while failing fast on the two policy-applying steps. All 8 gemini-code-assist review threads (set -u robustness, mktemp error handling, dependency pre-flight checks, here-string usage) are resolved. Advisory bots CodeRabbit and Codex were rate-limited and did not post substantive findings — this re-review is exactly the recovery path for those rate-limited markers; SonarCloud (0 new issues) and CodeQL both passed.
CI status
All required checks green: CodeQL (actions + python), SonarCloud (Quality Gate passed, 0 new issues), bats, ShellCheck/Lint, unit-tests, AgentShield, gitleaks secret scan, holdout-guard, test-deletion guard, validate-agent-profiles. Per-ecosystem dependency-audit jobs SKIPPED as expected. mergeStateStatus is BEHIND (branch needs rebase) but mergeable=MERGEABLE; squash auto-merge is armed.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
|
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-27T17:37:41Z. |
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>
…tstrap-new-repo.sh applies the full non-file policy surface (#972) * feat: implement issue #967 — [Phase 2] Bootstrap wrapper: scripts/bootstrap-new-repo.sh applies the full non-file policy surface * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com> Co-authored-by: Don Petry Bot <donpetry+bot@gmail.com>



Closes #967
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
New Features
Bug Fixes
Tests