Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupenhancementFeature requestsFeature requestsinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a org owner,
I want add a post-merge canary on the idea:approved → dispatch path and extend Fleet Monitor coverage to the new stub,
so that a silent revert like #655 is caught on the first approval rather than when a human notices nothing planned.
Acceptance Criteria
- A scheduled smoke check asserts the stub dispatches the central planner (a dry-run dispatch against a fixture Discussion, or a synthetic idea:approved add/remove) and alerts on a failure or the 'Unsupported event type: discussion' error.
- The Fleet Monitor health-check ([Fleet Monitor] petry-projects/.github-private — .github/workflows/initiative-planner.yml #627) is extended to the new standards/workflows/initiative-planner.yml stub across enrolled repos.
- An alert fires if any enrolled repo's stub drifts from the canonical template SHA.
Tasks / Subtasks
- Add a scheduled canary workflow/job that exercises the idea:approved → dispatch path in dry-run and alerts on failure. (AC: test issue from agent #1)
- Extend the Fleet Monitor health-check to track the new stub. (AC: Go-live improvements for PR review agent #2)
- Add stub-SHA drift detection to the monitor. (AC: Add @claude delegation, auto-merge, and rebase handling #3)
Dev Notes
- Directly closes bug: stale-base merge (#606) silently reverted the initiative-planner discussion→dispatch fix (#618);
idea:approvedstopped planning #655 prevention item 3 ('smoke-monitor the live trigger') — the discussion[labeled] path has no post-merge canary today. - [Fleet Monitor] petry-projects/.github-private — .github/workflows/initiative-planner.yml #627 is the existing [Fleet Monitor] health-check tracking initiative-planner.yml; extend it rather than building a parallel monitor.
- Prefer a dry-run dispatch over a real plan so the canary creates nothing.
Project Structure Notes
Monitoring lives in .github-private alongside the planner; reuse the existing fleet-monitor/health-check tooling.
References
- [Fleet Monitor] petry-projects/.github-private — .github/workflows/initiative-planner.yml #627
- bug: stale-base merge (#606) silently reverted the initiative-planner discussion→dispatch fix (#618);
idea:approvedstopped planning #655
Likely target surface
.github/workflows/initiative-planner.ymlscripts/initiative-planner/
Story prepared by the BMAD Scrum Master (Bob) for epic #817. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupenhancementFeature requestsFeature requestsinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
github-actions commentedon Jun 20, 2026
Thanks for the detailed story and acceptance criteria — this is well-scoped and easy to pick up! Before we start implementation: for the scheduled canary (AC #1), should the dry-run dispatch target a fixture Discussion in this repo, or would you prefer a fully synthetic event (e.g., mocking the
discussion[labeled]webhook payload) so no real Discussion object is needed at all?don-petry commentedon Jun 20, 2026
Dev-Lead Implementation Plan
Issue: #822 — Live idea:approved canary + Fleet Monitor coverage
Scope
Add a scheduled dry-run canary for the
idea:approved→ planner-dispatch path, and extend the Actions Fleet Monitor to track the per-repoinitiative-planner.ymlstub and alert on drift from the canonical template SHA.Implementation Checklist
scripts/initiative_canary.sh— dry-run dispatch ofinitiative-planner.ymlagainst a fixture Discussion, poll the resulting run, classify success / failure /Unsupported event type: discussion. Pure helpers +main()(mirrorsauto_rebase_health.sh)..github/workflows/initiative-planner-canary.yml— scheduled (daily) +workflow_dispatchcanary; alerts (find-or-create issue) on a non-OK result.scripts/fleet_stub_drift.sh— sourced lib of pure functions: classify a repo stub blob SHA vs. the canonical template SHA (ALIGNED/DRIFTED/MISSING), build report + alert JSON.scripts/fleet_monitor.sh— new "Initiative-planner stub coverage & drift" section reusing the discovered repo list; fetch canonical + per-repo stub SHAs, emitfleet_stub_drift.json, setHAS_STUB_DRIFT..github/workflows/actions-fleet-monitor.yml— alert step gated onenv.HAS_STUB_DRIFT == 'true'..github/workflows/lint.yml(per AGENTS.md bats-list rule).Tests to Write
tests/test_initiative_canary.bats—classify_canary_run(OK / FAILED / UNSUPPORTED_EVENT / NO_RUN), alert-decision helper, alert-body render, and a gh-mockedmainasserting the dry-run dispatch (dry_run=true).tests/fleet_stub_drift.bats—classify_stub_drift, row builder, report generator, alert-JSON, and count helpers over a fixture TSV.Test Command
scripts/run-bats.sh tests/test_initiative_canary.bats tests/fleet_stub_drift.bats(full suite vialint.ymlbats job); lint viabash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jun 20, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/initiative_canary.sh+.github/workflows/initiative-planner-canary.yml: daily (06:30 UTC) +workflow_dispatchcanary that fires a dry-run dispatch ofinitiative-planner.ymlagainst a fixture Discussion, polls the resulting run, and alerts (find-or-create tracking issue + wakes dev-lead) on a failure or theUnsupported event type: discussionregression fingerprint. Dry-run ⇒ creates nothing.scripts/fleet_monitor.sh§2a) to track each enrolled repo'sinitiative-planner.ymlstub, reusing the already-discovered repo list (extends [Fleet Monitor] petry-projects/.github-private — .github/workflows/initiative-planner.yml #627 rather than building a parallel monitor). Pure classification logic in the new sourced libscripts/fleet_stub_drift.sh.ALIGNED/DRIFTED/MISSING). Drifted enrolled repos are exported tofleet_stub_drift.json;actions-fleet-monitor.ymlopens/updates afleet-stub-drifttracking issue and firesrepository_dispatchto wake dev-lead whenHAS_STUB_DRIFT.lint.yml; added an AGENTS.md "Workflow Files" exception entry for the repo-specific canary workflow.Test Results
Files Changed
scripts/initiative_canary.sh(new): canary — pureclassify_canary_run/canary_is_failure/canary_report+main()(dispatch+poll). Mirrorsauto_rebase_health.shlayout..github/workflows/initiative-planner-canary.yml(new): scheduled canary workflow with failure alerting.scripts/fleet_stub_drift.sh(new): pure stub-coverage/drift lib (classify, row, count, alert-JSON, report).scripts/fleet_monitor.sh: §2a stub-SHA scan over discovered repos; appends a "stub coverage & drift" report section; exportsfleet_stub_drift.json+HAS_STUB_DRIFT/STUB_DRIFT_COUNT..github/workflows/actions-fleet-monitor.yml: "Track initiative-planner stub drift" + "Dispatch dev-lead for stub drift" steps; tightened the clean-run annotation..github/workflows/lint.yml: registered the two new bats files.tests/test_initiative_canary.bats,tests/fleet_stub_drift.bats(new): unit tests (gh mocked; no network).AGENTS.md: documented the repo-specific canary workflow exception.Notes
dry_run=true) soapply-planonly logs intended mutations to an artifact — no epic/issues are created.GH_PAT_WORKFLOWS(aworkflow_dispatchfired withGITHUB_TOKENis accepted but never starts a run) and reads the fixture Discussion from repo variableINITIATIVE_CANARY_DISCUSSION; an unset fixture skips with a::warning::rather than failing..github/workflows/initiative-planner.ymlstub.MISSING(no stub) is reported as informational/not-enrolled and is not alerted; onlyDRIFTEDenrolled repos trigger the drift alert (AC#3).petry-projects/.githubstandards/workflows/initiative-planner.yml(overridable viaCANONICAL_STUB_REPO/CANONICAL_STUB_PATH).feat: implement issue #822 — Live idea:approved canary + Fleet Monito…