Skip to content

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

Closed

Description

@don-petry

Problem

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:

  • For a repo without an ingress, classify_role_drift correctly falls back to comparing the legacy per-role file (for example .github/workflows/dev-lead.yml) with the legacy canonical (standards/workflows/dev-lead.yml).
  • But stub_drift_alert_json stamps every DRIFTED row with the registry row's stub_path, which is .github/workflows/agent-ingress.yml. So [Fleet Monitor] Dev-lead stub drift #2284–[Fleet Monitor] Ci-failure-analyst stub drift #2288 tell dev-lead to "re-sync" a .github/workflows/agent-ingress.yml stub in .github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite and google-app-scripts. None of them has, or should have, an ingress. Following that instruction is exactly the double-dispatch trap ADR-0007 guards against.
  • The dry-run remediation plan likewise lists agent-ingress.yml writes for those repos. Live mode would fail them, because _remediate_role_block errors when the repo has no ingress file. The plan and the alert are still wrong.
  • Before feat: implement issue #1729 — [Phase 3] Collapse the first repo's Class-1 event-driven stubs into agent-ingress.yml and rename the required checks #2182 these legacy per-role stubs were not tracked here at all. Their drift is governed by the compliance audit's stub-surface checks.

The five issues #2284–#2288 are on dev-lead:hands-off until this is fixed.

Fix (minimal)

  1. In scripts/fleet_monitor.sh, exclude role rows whose classification came from the legacy fallback (repo has no agent-ingress.yml) from fleet_stub_drift.json (alerts and remediation input). Keep them in the per-stub report table, marked as legacy, so the information is not lost.
  2. Rows from a repo that has an agent-ingress.yml (block comparison) keep alerting and remediating as today.
  3. Do not change the whole-file initiative-planner / initiative-driver rows, classify_role_drift, or remediation's live guards.
  4. Bats coverage:
    • (a) a legacy repo whose per-role file drifts from the legacy canonical appears in the report but not in fleet_stub_drift.json;
    • (b) a collapsed repo whose block drifts is in fleet_stub_drift.json with stub_file = .github/workflows/agent-ingress.yml;
    • (c) the remediation input never lists agent-ingress.yml for a repo that has no ingress.

Acceptance

  • shellcheck and bats are green.
  • After merge, a dry-run Fleet Monitor shows the collapsed-role drift issues listing only repos that actually carry an agent-ingress.yml (today only petry-projects/markets).
  • The PR body uses Refs #1729.

Generated by Claude Code

Activity

  1. don-petry commented on Oct 11, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #2289 — Fleet Monitor reports legacy per-role stub drift as agent-ingress.yml drift

    Scope

    Tag role rows classified via the legacy fallback (repo has no agent-ingress.yml) and keep them out of fleet_stub_drift.json (alerts + remediation input). They stay in the per-stub report, marked as legacy.

    Implementation Checklist

    • scripts/fleet_stub_drift.sh — stub_drift_row_role appends a 5th TSV field legacy when the row came from the legacy fallback. Ingress-classified rows and whole-file rows keep the 4-field shape.
    • scripts/fleet_stub_drift.sh — stub_drift_alert_json drops rows tagged legacy.
    • scripts/fleet_stub_drift.sh — generate_stub_drift_report marks legacy DRIFTED rows in the table ("legacy per-role stub — not alerted").
    • No change to classify_role_drift, the initiative-planner/driver rows, or remediation's live guards.

    Tests to Write

    • (a) tests/fleet_stub_registry.bats: a legacy repo whose per-role file drifts shows in the report (marked legacy) but not in fleet_stub_drift.json
    • (b) a collapsed repo whose block drifts is in fleet_stub_drift.json with stub_file = .github/workflows/agent-ingress.yml and its role
    • (c) mixed fleet (legacy + collapsed): build_remediation_plan on the emitted JSON lists agent-ingress.yml only for the repo that has one
    • Unit tests in tests/fleet_stub_drift.bats for the legacy tag and the alert filter

    Test Command

    bats tests/ and bash .dev-lead/scripts/dev-lead-lint.sh

  2. don-petry commented on Oct 11, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete — PR #2292

    The implementation for issue #2289 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

  3. added a commit that references this issue on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsdev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions