💡 Fleet-Wide Stub Drift Auto-Remediation via Automated PRs #1043
Replies: 1 comment
|
📋 Initiative planned by the BMAD Scrum Master (Bob). Epic #1148 — Fleet-wide stub drift auto-remediation: DRY_RUN-gated, pilot-first PRs that re-sync consumer stubs to canon 4 stories created (inert — labelled
Open questions for review:
Review the epic and its sub-issue DAG, adjust as needed, then add |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Extend the fleet stub drift detection system (
fleet_stub_drift.sh,template_stub_drift.sh) into an automated remediation loop: when drift is detected between a consumer repo's workflow stub and the canonical standards, automatically open a PR in the consumer repo with the corrected content fromseed-repo-template.sh. This closes the detect→fix gap that currently requires manual intervention for each drift issue.Market Signal
User Signal
seed-repo-template.shgenerates the canonical content for each file — the fix content is already computableTechnical Opportunity
The remediation loop can be built from existing components:
fleet_stub_drift.shalready computes theALIGNED / DRIFTED / MISSINGstatus for every tracked file in every consumer reposeed-repo-template.shgenerates the canonical content for each file (and--emit-*flags produce the expected byte-identical content)TEMPLATE_DRIFT_ALLOWLISTintemplate_stub_drift.shalready handles intentionally-customized files — they are excluded from drift checks and would also be excluded from auto-remediation--remediateflag to the drift detection script would: for eachDRIFTEDfile, create a branch in the consumer repo, commit the canonical content, and open a PR viagh pr createThe PR content is deterministic (computed from the canonical standards), so every auto-remediation PR is auditable and reproducible.
Assessment
Adversarial Review
Strongest objection: Cross-repo automated PRs introduce a new class of supply-chain risk. A compromised drift-fix bot could push malicious workflow changes to consumer repos under the guise of "standards alignment."
Rebuttal: The auto-PRs would be opened by the same authenticated GitHub App identity that already has write access for dev-lead and other cross-repo operations — no new attack surface is introduced. The PRs go through the normal PR review pipeline (including the project's own pr-review agent) — they are proposals, not direct commits. The content is deterministic (computed from the canonical standards via
seed-repo-template.sh), so every change is auditable and reproducible. TheTEMPLATE_DRIFT_ALLOWLISTensures intentionally-customized files are never overwritten. The supply-chain risk is equivalent to the existing cross-repo dev-lead operations.Suggested Next Step
Extend
fleet_stub_drift.shwith a--remediateflag that, for eachDRIFTEDfile, opens a PR in the consumer repo with the canonical content fromseed-repo-template.sh. Gate behindDRY_RUNfor initial testing. Pilot with a single consumer repo before fleet-wide rollout.All reactions