Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a fleet maintainer,
I want have a post-merge canary that periodically dry-run-dispatches the central driver against a fixture target repo/epic and alerts on failure,
so that a silent break of the cross-repo release path surfaces immediately instead of when someone notices nothing got released.
Acceptance Criteria
- New
.github/workflows/initiative-driver-canary.yml+scripts/initiative_driver_canary.shmirror initiative-planner-canary.yml / scripts/initiative_canary.sh: a scheduled (off-peak, ≤1/day) + workflow_dispatch job fires a DRY-RUN dispatch (-f dry_run=true) of initiative-driver.yml withtarget_reposet to a fixture — creating/labeling nothing. - The canary classifies the dispatched run and, on failure, finds-or-creates a single tracking issue (labels initiative-canary / dev-lead / health-check) and posts the report; a clean run annotates a notice.
- The fixture is a CONFIGURED target repo + epic (repo variables INITIATIVE_DRIVER_CANARY_TARGET / INITIATIVE_DRIVER_CANARY_EPIC, with workflow_dispatch overrides) where the epic carries
initiative:autoand has ≥1 OPEN sub-issue whose blockers are all closed — so the dry-run actually resolves the cross-repo gate + blocked_by; the canary no-ops with a::warning::when unconfigured. - The canary treats the run as FAILED (and alerts) not only when the dispatched run's conclusion != success, but also when — for a CONFIGURED fixture — the run log shows no
READY (dry-run, not labeling)decision for the target repo (the cross-repo release path resolved to nothing: a hollow green). - Logic (run classification incl. the no-READY hollow-green guard + dispatch-arg assembly) is unit-tested in
tests/test_initiative_driver_canary.bats, mirroring tests/test_initiative_canary.bats. - AGENTS.md records the canary as a documented repo-specific workflow exempt from template syncs (mirror the existing initiative-planner-canary.yml exception entry).
Tasks / Subtasks
- Write scripts/initiative_driver_canary.sh mirroring initiative_canary.sh (classify_canary_run, canary_report, dry-run gh workflow run with -f target_repo / -f dry_run=true / -f epic). (AC: test issue from agent #1, Go-live improvements for PR review agent #2)
- Classify a configured-but-no-READY run as a FAILURE (hollow-green guard) by parsing the driver's exact dry-run log line
READY (dry-run, not labeling)for the target repo; conclusion != success still fails too. (AC: Optimize review: small-PR and incremental fast paths #4) - Write .github/workflows/initiative-driver-canary.yml mirroring initiative-planner-canary.yml (guard → run → alert → annotate), off-peak cron; wire the fixture repo variables + overrides. (AC: test issue from agent #1, Go-live improvements for PR review agent #2, Add @claude delegation, auto-merge, and rebase handling #3)
- Add tests/test_initiative_driver_canary.bats covering classification, the no-READY hollow-green failure, dispatch arg assembly, and the unconfigured no-op. (AC: feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
- Add the AGENTS.md exception entry and register the new bats file in lint.yml's bats list. (AC: feat: feature ideation framework — adversarial proposer/challenger/synthesizer #6)
Dev Notes
- Mirror scripts/initiative_canary.sh closely: it already fires
gh workflow run "$WORKFLOW_FILE" --repo "$REPO" -f target_repo="$REPO" -f dry_run=true, pollsgh run list, and classifies the conclusion. For the driver, target the fixture and pass-f epic=<fixture-epic>and-f dry_run=true. - The driver has NO 'Unsupported event type: discussion' fingerprint (it is pure-bash, no claude-code-action). Use driver-relevant signals: (a) run conclusion != success, and (b) the HOLLOW-GREEN guard — for a configured fixture, the run log MUST contain the driver's dry-run decision line
#<n> — READY (dry-run, not labeling).for the target; its absence means the cross-repo gate/blocked_by resolved to nothing and is a FAILURE. (That exact string is emitted by scripts/initiative-driver.sh in the DRY_RUN branch.) - Dry-run is mandatory for zero cost: with
dry_run=truethe driver logs the READY decision and applies nodev-leadlabel, so no dev-lead/LLM run is triggered. - The fixture epic must be armed (
initiative:auto) with ≥1 ready sub-issue (open, blockers closed) so a dry-run produces a READY decision — otherwise the canary cannot distinguish 'path healthy' from 'path broken'. Document this in the fixture setup. - PAT required: the dispatch needs GH_PAT_WORKFLOWS (a workflow_dispatch with GITHUB_TOKEN never starts a run) — same constraint as the planner canary.
- Cron must be offset off the top of the hour per the off-peak scheduling standard (Reliable scheduled Actions: off-peak cron offsets, scheduling standard, and schedule-reliability reporting #722/[Phase 1] Codify the off-peak scheduling standard + CI compliance check #724); the planner canary runs 06:30 just after Fleet Monitor (06:00) — pick a nearby non-colliding offset.
Project Structure Notes
All in .github-private — dev-lead-authorable. Register the new test in lint.yml's repo-specific bats list (AGENTS.md notes that list is extended, not reset, by template syncs).
References
- .github/workflows/initiative-planner-canary.yml
- scripts/initiative_canary.sh
- tests/test_initiative_canary.bats
- AGENTS.md#workflow-files (exception entries)
- scripts/initiative-driver.sh#DRY_RUN
Likely target surface
new .github/workflows/initiative-driver-canary.ymlnew scripts/initiative_driver_canary.shnew tests/test_initiative_driver_canary.batsAGENTS.md.github/workflows/lint.yml
Story prepared by the BMAD Scrum Master (Bob) for epic #882. Status: ready-for-dev.
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 21, 2026
Dev-Lead Implementation Plan
Issue: #885 — [Phase 3] Add an initiative-driver canary over the cross-repo release path
Scope
Add a post-merge canary that dry-run-dispatches
initiative-driver.ymlagainst a configured fixture target repo + epic and alerts (find-or-create tracking issue) when the run fails OR when a configured fixture produces noREADY (dry-run, not labeling)decision (a hollow-green cross-repo break).Implementation Checklist
scripts/initiative_driver_canary.sh— pure helpers (classify_canary_runw/ hollow-green guard,canary_is_failure,canary_report) +main()dry-run dispatch/poll, mirroringscripts/initiative_canary.sh.github/workflows/initiative-driver-canary.yml— off-peak cron + workflow_dispatch; guard (target+epic configured) → run → alert → annotate; fixture viaINITIATIVE_DRIVER_CANARY_TARGET/INITIATIVE_DRIVER_CANARY_EPICrepo vars w/ dispatch overrides; GH_PAT_WORKFLOWSAGENTS.md— add exception entry mirroring the initiative-planner-canary.yml entry.github/workflows/lint.yml— registertests/test_initiative_driver_canary.batsin the bats listTests to Write
tests/test_initiative_driver_canary.bats— classify (success+READY→OK, success-no-READY→HOLLOW_GREEN, failure/timeout→FAILED, empty/null→NO_RUN), alert decision, report content, andmain()with mocked gh (dry-run dispatch arg assembly, hollow-green failure, unconfigured no-op, env-var fallback)Test Command
scripts/run-bats.sh tests/test_initiative_driver_canary.batsandbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 21, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/initiative_driver_canary.sh— pure helpers (classify_canary_runwith the hollow-green guard,canary_is_failure,canary_report) +main()dry-run dispatch/poll, mirroringscripts/initiative_canary.sh.github/workflows/initiative-driver-canary.yml— off-peak cron (40 6 * * *, just after the planner canary's 06:30) +workflow_dispatch; guard → run → alert → annotate; fixture viaINITIATIVE_DRIVER_CANARY_TARGET/INITIATIVE_DRIVER_CANARY_EPICrepo vars with dispatch overrides;GH_PAT_WORKFLOWSAGENTS.md— added the template-sync exception entry mirroring the initiative-planner-canary.yml entry.github/workflows/lint.yml— registeredtests/test_initiative_driver_canary.batsin the bats listtests/test_initiative_driver_canary.bats— 17 tests (TDD: written red first, then green)Acceptance Criteria Mapping
initiative-driver.ymlwith-f target_repo=<fixture> -f epic=<fixture> -f dry_run=true— creates/labels nothing.initiative-canary/dev-lead/health-check) titled🔴 Initiative-driver canary failingand posts the report; clean run emits a::notice::.target_repo/epicdispatch overrides; the guard step no-ops with a::warning::when unconfigured.READY (dry-run, not labeling)(cross-repo gate/blocked_by resolved to nothing).gh.Test Results
Files Changed
scripts/initiative_driver_canary.sh(new): canary logic — dry-run dispatch of the driver against the fixture + the hollow-green classifier..github/workflows/initiative-driver-canary.yml(new): scheduled/dispatch canary workflow (guard → run → alert → annotate).tests/test_initiative_driver_canary.bats(new): 17 unit tests over the pure helpers + mockedmain().AGENTS.md: template-sync exception entry for the new workflow..github/workflows/lint.yml: registered the new bats file.Notes
target_repo(must beowner/repo) and a non-numericepicbefore anything reaches theghcommand line (injection guard), mirroring the planner canary's discussion-number check.HOLLOW_GREEN(alert) — conservative by design: better to alert than to silently miss a broken path.INITIATIVE_DRIVER_CANARY_TARGET/INITIATIVE_DRIVER_CANARY_EPICto a fixture epic armed withinitiative:autoand ≥1 ready open sub-issue; until then the canary no-ops with a::warning::.feat: implement issue #885 — [Phase 3] Add an initiative-driver canar…