You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a fleet maintainer,
I want have Fleet Monitor track per-repo initiative-driver stub coverage/drift the same way it already tracks the planner stub,
so that an out-of-date or missing driver stub in an enrolled repo surfaces in the daily health signal instead of failing silently.
Acceptance Criteria
scripts/fleet_monitor.sh detects drift for the driver stub .github/workflows/initiative-driver.yml against petry-projects/.github/standards/workflows/initiative-driver.yml, in ADDITION to the existing planner stub — generalized to iterate a list of (name, stub_path, canonical_path) entries rather than a single hardcoded STUB_PATH/CANONICAL_STUB_PATH.
The fleet report renders a driver stub coverage/drift section (reusing fleet_stub_drift.sh's pure helpers), and drifted driver stubs feed the alert JSON / HAS_STUB_DRIFT path.
The actions-fleet-monitor.yml stub-drift alert step covers the driver stub without regressing the planner-stub coverage (separate section/issue per stub kind, or a clearly-labelled combined section).
Bats cover the multi-stub generalization (extend tests around fleet_stub_drift / fleet_monitor) and confirm the existing planner-stub behaviour is unchanged.
If the canonical driver-stub SHA cannot be read (the template is not yet merged in petry-projects/.github), the driver registry entry is skipped with a ::warning:: (per-stub, non-fatal) — exactly as the existing single-stub path does when its canonical SHA is empty — so Fleet Monitor degrades gracefully before and after the cross-repo template lands.
Tasks / Subtasks
Generalize fleet_monitor.sh: replace the single STUB_PATH/CANONICAL_STUB_PATH (+ the per-repo loop ~:187-206 and report/alert sections) with iteration over a stub registry including both initiative-planner and initiative-driver. (AC: test issue from agent #1, Go-live improvements for PR review agent #2)
Keep fleet_stub_drift.sh's pure helpers (classify_stub_drift / stub_drift_row / stub_drift_alert_json / generate_stub_drift_report) reusable per stub; parameterize the report heading by stub name. (AC: Go-live improvements for PR review agent #2)
Preserve the per-stub warn-and-skip when a canonical SHA is empty (fleet_monitor.sh ~:198 already does this for one stub) so a not-yet-merged driver template degrades gracefully rather than failing the run. (AC: feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
Dev Notes
fleet_stub_drift.sh is ALREADY pure and stub-agnostic (takes a canonical SHA + a per-repo SHA, classifies ALIGNED/DRIFTED/MISSING). The hardcoding lives in fleet_monitor.sh: STUB_PATH (:35), CANONICAL_STUB_PATH (:37), the comparison loop (:187-206), the report section (:239-243), and the alert export (~:309-319).
Generalize by looping over a small registry, e.g. [(initiative-planner, .github/workflows/initiative-planner.yml, standards/workflows/initiative-planner.yml), (initiative-driver, .github/workflows/initiative-driver.yml, standards/workflows/initiative-driver.yml)], calling the existing pure helpers per entry and accumulating per-stub drift files.
The driver canonical path must match Story 2's exactly; this story is blocked_by Story 2 so the canonical template exists to compare against (otherwise every enrolled repo reads as MISSING/404).
Cross-repo merge ordering: this story needs Story 2's stub template MERGED to petry-projects/.github's default branch (not just authored) for a non-empty canonical SHA — blocked_by [2] captures the intra-plan edge, but the canonical read is cross-repo, so the generalized loop must keep the existing empty-canonical warn-and-skip per stub.
Project Structure Notes
All in .github-private — dev-lead-authorable. Net-new bats should be added to lint.yml's bats list per AGENTS.md.
Story
As a fleet maintainer,
I want have Fleet Monitor track per-repo initiative-driver stub coverage/drift the same way it already tracks the planner stub,
so that an out-of-date or missing driver stub in an enrolled repo surfaces in the daily health signal instead of failing silently.
Acceptance Criteria
.github/workflows/initiative-driver.ymlagainstpetry-projects/.github/standards/workflows/initiative-driver.yml, in ADDITION to the existing planner stub — generalized to iterate a list of (name, stub_path, canonical_path) entries rather than a single hardcoded STUB_PATH/CANONICAL_STUB_PATH.::warning::(per-stub, non-fatal) — exactly as the existing single-stub path does when its canonical SHA is empty — so Fleet Monitor degrades gracefully before and after the cross-repo template lands.Tasks / Subtasks
Dev Notes
:35), CANONICAL_STUB_PATH (:37), the comparison loop (:187-206), the report section (:239-243), and the alert export (~:309-319).[(initiative-planner, .github/workflows/initiative-planner.yml, standards/workflows/initiative-planner.yml), (initiative-driver, .github/workflows/initiative-driver.yml, standards/workflows/initiative-driver.yml)], calling the existing pure helpers per entry and accumulating per-stub drift files.Project Structure Notes
All in .github-private — dev-lead-authorable. Net-new bats should be added to lint.yml's bats list per AGENTS.md.
References
Likely target surface
scripts/fleet_monitor.shscripts/fleet_stub_drift.sh.github/workflows/actions-fleet-monitor.ymltests/Story prepared by the BMAD Scrum Master (Bob) for epic #882. Status: ready-for-dev.