feat: implement issue #2289 — Fleet Monitor reports legacy per-role stub drift as agent-ingress.yml drift (alerts and remediation plan target repos that never collapsed)

Merged
DO
9d ago
+150-17

Problem

Fleet Monitor reports legacy per-role stub drift as agent-ingress.yml drift (alerts and remediation plan target repos that never collapsed)

From the issue: The first Fleet Monitor run with the collapsed-role STUB_REGISTRY rows (#2182) active is https://github.com/petry-projects/.github-private/actions/runs/38150568552 (dry-run). It mis-reports legacy repos (repos with no agent-ingress.yml) as agent-ingress.yml drift:

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

Tests added/updated: tests/fleet_stub_drift.bats,tests/fleet_stub_registry.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Closes #2289