fix(2284): give bugbot-gate an inventory row, so the audit can read the fleet again (backend#2284) - #312
Conversation
…he fleet again (backend#2284) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 492a688. Configure here.
saqlainsyed007
left a comment
There was a problem hiding this comment.
Verified against the inventory and the audit result, not the description.
The break and the fix. #305 landed bugbot-gate.yml as a reusable but no reusables row, so caller-drift hit its fail-closed "a reusable checked against no repo is reported by nothing" arm (exit 2, "incomplete read") and reddened develop's audit 26s after #293 merged — before it evaluated any per-repo state. This adds bugbot-gate.yml to the reusables list and an exempt: *bugbot_gate_rollout_pending entry on every repo, which is exactly the two-step blocked-gate.yml already uses (each new bugbot-gate.yml line sits right under the matching blocked-gate.yml one). The anchor is honest STAGED-not-PARKED: zero callers yet by design (the derivation-from-findings is the risk surface and lands for review first; callers follow in the rollout PR), and it carries the self-deleting clause — if it outlives the rollout it becomes the wip_limit_check_has_no_callers finding, not a justification.
Decisive check: audit and gate are green on this PR — the same checks that went red on develop — so the inventory read is complete again and every repo's bugbot-gate.yml entry resolves. Bugbot pass, no threads, mergeable (BLOCKED is review/ordering, not a conflict). This restores a red develop audit; LGTM.
What broke
.github#305landedbugbot-gate.ymlas a reusable — plus 1,485 lines of script,selftest and mutation suite — and no row in
repo-inventory.yml. The org audit ondevelopwent red 26 seconds after#293merged:Exit 2 is the fail-closed arm — "could not evaluate", explicitly NOT an
all-clear. The harness worked: a reusable checked against no repo is reported by
nothing, and it treats that as a finding rather than a silence.
Two things it cost, both worth naming rather than quietly fixing:
that had merged 26 seconds earlier.
#1979's conformance was unverified for as longas this was red, not confirmed-and-fine.
#306, which touches this guarded file and so needs a green audit onthe same SHA via
conformance-gate.Why
#293's own audit was green#293'sauditwas re-run at ~11:38 and passed.#305merged after that, then#293merged. So
#293's green verdict was stale with respect to develop — the re-runtrap this repo's README already documents under Reading the signals (required checks
are latest-per-context). Nothing in the PR was wrong; the sequencing was.
The change
19
exemptrows, mirroring every existingblocked-gate.ymlrow at its own indent,plus a
bugbot_gate_rollout_pendinganchor inshared_reasons.Modelled deliberately on
blocked_gate_rollout_pending, because this is the samesituation: a reusable whose derivation is the whole risk surface, landing ahead of
its callers so that derivation can be reviewed alone. The two-step is forced by this
file's own header —
.github's caller state is read from its audit branch over theAPI, so adding a caller and flipping its entry to
requiredin one PR fails on acaller not yet on the audit branch. That is exactly what split
#307from#293.The anchor self-destructs. It states that if it is still here once the rollout PR
has merged, it has become the same finding as
wip_limit_check_has_no_callers— areusable that shipped, was never wired up, and had a written excuse — and is to be
treated as a defect, not a justification. The
stale_backlog_migration_in_flightanchor this repo just deleted is the precedent for that clause working.
bugbot-gate still gates nothing, and this PR does not change that
Measured: zero callers anywhere in the org.
backend#2284's premise was "Bugbot'sverdict gates nothing", and that is still true — now with more code behind it. This PR
makes the fleet readable, not conformant-in-substance. The rollout PR that adds the
callers and flips the entries to
requiredis the one that closes#2284.No
Closeskeyword, on purpose — seebackend#2364. This PR does not close#2284, and a title reference would not have linked it anyway.Verification
yaml.safe_loadexemptdicts;bugbot-gate.ymlinreusables(12 total)scripts/tests/caller-drift-selftest.pyThat last row is the one that matters: with this change the audit completes, which
is what re-establishes that the 17
stale-backlog.yml: requiredentries from#293actually match the fleet.
callersreads OK for all 19 repos.Note
Low Risk
Inventory-only YAML: no callers, no branch protection, and no gate behavior change. Risk is limited to a wrong exemption blocking a later required flip.
Overview
Registers
bugbot-gate.ymlinrepo-inventory.ymlso the org caller-drift audit can complete again. The reusable shipped without an inventory row, which made the harness fail closed (exit 2) before evaluating any per-repo state.Adds the reusable to the global list and an
exemptrow in every repo, citing a newbugbot_gate_rollout_pendingreason (same two-step asblocked-gate: derivation first, callers later). This does not wire callers or make Bugbot a required check; it only makes the fleet readable until the rollout PR flips those entries torequired.Reviewed by Cursor Bugbot for commit 492a688. Bugbot is set up for automated code reviews on this repo. Configure here.