Repository navigation
[Phase 2] Release-ring confirmation + central-config registration in the bootstrap #968
Copy link
Copy link
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a org maintainer,
I want have the bootstrap confirm the new repo's release ring (default stable) and, for a non-stable ring, register it in both central files and repin its stubs,
so that ring membership becomes a deliberate, auditable choice instead of a silent wildcard default that audit/deploy would later flag as drift.
Acceptance Criteria
- The bootstrap accepts a ring selection (e.g.
--ring stable|ring1|ring0|next) defaulting to stable, and records the confirmed ring (operator + value + timestamp) — auditable even when the answer is stable. - For a non-stable ring, it registers the repo in BOTH standards/canary-rings.json (this repo) AND scripts/lib/ring-pins.sh (petry-projects/.github), keeping them in sync, and repins the shipped stubs to the matching channel (
@<agent>/<ring>). - For stable, no central-file edit is required, but the confirmation is still recorded.
- After a non-stable registration, the compliance audit / fleet drift check sees no ring drift — both central files name the repo in the same ring and the stubs match that channel.
- A bats test covers the stable (record-only) path and the non-stable (edits both files + repins stubs) path under DRY_RUN.
Tasks / Subtasks
- Add a
--ringargument (default stable) and the audit-record output to scripts/bootstrap-new-repo.sh. (AC: test issue from agent #1, Add @claude delegation, auto-merge, and rebase handling #3) - Implement non-stable registration: add the repo to the matching channel
membersin standards/canary-rings.json and to the ring-pins.sh mapping in petry-projects/.github, plus repin the shipped stubs to that channel. (AC: Go-live improvements for PR review agent #2) - Add a consistency assertion that both central files place the repo in the same ring (no drift). (AC: Optimize review: small-PR and incremental fast paths #4)
- Extend tests/test_bootstrap_new_repo.bats to cover the stable and non-stable ring paths under DRY_RUN. (AC: feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
- standards/canary-rings.json (this repo) is the documented single source of ring membership (per-channel
membersarrays under agents..rings); scripts/canary-rollout.sh reads it. Default today is silentstablevia a*catch-all member token — the whole point of this story is to turn that into a recorded decision. - scripts/lib/ring-pins.sh lives in petry-projects/.github and is NOT present in this repo (verified) — a non-stable registration is a CROSS-REPO edit. Use the aw-standards-sync.sh cross-repo PR pattern (STANDARDS_REPO=petry-projects/.github) rather than a direct push; both files must stay in sync because the audit and the deploy sweep read both.
- Stub repin: a non-stable repo's caller stubs must pin
@<agent>/<ring>to match its ring, or fleet_stub_drift/audit flags drift; mirror the channel-tag model used by scripts/canary-rollout.sh.
Project Structure Notes
Extends scripts/bootstrap-new-repo.sh and edits standards/canary-rings.json in this repo; the ring-pins.sh edit is cross-repo into petry-projects/.github.
References
- standards/canary-rings.json
- scripts/canary-rollout.sh
- scripts/aw-standards-sync.sh
- https://github.com/petry-projects/.github/blob/main/scripts/lib/ring-pins.sh
- discussion Create a GitHub template repository to scaffold new petry-projects repos with org standards #962
Likely target surface
new script scripts/bootstrap-new-repo.shstandards/canary-rings.jsonnew test tests/test_bootstrap_new_repo.bats
Story prepared by the BMAD Scrum Master (Bob) for epic #964. Status: ready-for-dev.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
don-petry commentedon Jun 27, 2026
Dev-Lead Implementation Plan
Issue: #968 — [Phase 2] Release-ring confirmation + central-config registration in the bootstrap
Scope
Extend
scripts/bootstrap-new-repo.shwith a--ringselection (defaultstable) that records an auditable ring decision (operator + value + timestamp) and, for a non-stable ring, registers the repo in both central files (standards/canary-rings.jsonhere +scripts/lib/ring-pins.shcross-repo inpetry-projects/.github) and repins the shipped caller stub to@<agent>/<ring>— asserting no ring drift.Implementation Checklist
scripts/bootstrap-new-repo.sh: add--ring/--agentarg parsing (defaultstable/dev-lead) + jq dependency check (AC#1)_record_ring_decision(operator+value+timestamp), emitted for every ring incl. stable (AC#1, Add @claude delegation, auto-merge, and rebase handling #3)membersinstandards/canary-rings.json(real local edit; DRY_RUN prints intent) (AC#2)scripts/lib/ring-pins.shcross-repo via theaw-standards-sync.shPR pattern (STANDARDS_REPO=petry-projects/.github) — DRY_RUN prints intent (AC#2)@<agent>/<ring>(DRY_RUN prints intent) (AC#2)_assert_ring_consistency: both central files place the repo in the SAME ring (no drift) — repo in named ring, absent from all others (AC#4)step_ringintomainas the first step; renumber step labelsTests to Write
tests/test_bootstrap_new_repo.bats: stable (record-only) path under DRY_RUN — emits audit record, no central-file edits, no write API calls--ringdefaults to stable; unknown ring is rejectedTest Command
bats tests/test_bootstrap_new_repo.bats(full suite:bats tests/); lint:bash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 27, 2026
Dev-Lead: Implementation Complete
Plan Execution
--ring/--agentarg parsing (defaultstable/dev-lead) +jqdependency check (AC#1)_record_ring_decisionemits an auditable record (operator + value + timestamp) for every ring, incl. stable (AC#1, Add @claude delegation, auto-merge, and rebase handling #3)standards/canary-rings.json(adds repo to the channelmembers; real local write, DRY_RUN prints intent) (AC#2)scripts/lib/ring-pins.sh(petry-projects/.github) via theaw-standards-sync.shcontents-API +gh pr createpattern; DRY_RUN prints intent (AC#2)@<agent>/<ring>(DRY_RUN prints intent) (AC#2)_assert_ring_consistencyenforces no drift — repo lands in the named ring and no other — checked on the proposed state before any write (AC#4)step_ringwired as the first bootstrap step (steps renumbered to /5)Test Results
Lint (
.dev-lead/scripts/dev-lead-lint.sh— shellcheck on 82 scripts + agent frontmatter + CODEOWNERS):Full
tests/*.batssweep: 918 passing. The single unrelated failure (test_batch_fallback.bats— Gemini→Copilot fallback) also fails on cleanHEADand is environment-dependent, not introduced here.Files Changed
scripts/bootstrap-new-repo.sh: added the release-ring confirmation step (--ring/--agent, audit record, canary-rings.json registration, cross-repo ring-pins.sh + stub repin via the standards-sync PR pattern, no-drift consistency assertion); renumbered the existing steps to /5.tests/test_bootstrap_new_repo.bats: 4 new tests covering default/stable record-only, unknown-ring rejection, and the non-stable DRY_RUN path (both-file + stub intent, audit record, no SoT mutation, consistency OK).Notes
scripts/lib/ring-pins.shis not present in this repo (it lives inpetry-projects/.github), so its registration is a genuine cross-repo edit — implemented via theaw-standards-sync.shPR pattern. Per AC#5 the verified path is DRY_RUN (intent-only); the live cross-repo edit assumes a per-ring<ring>=( … )array anchor and fails loudly (no silent corruption) if that anchor is absent, rather than guessing an unverified format.feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…
feat: implement issue #968 — [Phase 2] Release-ring confirmation + ce…