Skip to content

fix(2284): give bugbot-gate an inventory row, so the audit can read the fleet again (backend#2284) - #312

Merged
LukasWodka merged 1 commit into
developfrom
fix/2284-inventory-row-for-bugbot-gate
Aug 23, 2026
Merged

fix(2284): give bugbot-gate an inventory row, so the audit can read the fleet again (backend#2284)#312
LukasWodka merged 1 commit into
developfrom
fix/2284-inventory-row-for-bugbot-gate

Conversation

@LukasWodka

@LukasWodka LukasWodka commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

What broke

.github#305 landed bugbot-gate.yml as a reusable — plus 1,485 lines of script,
selftest and mutation suite — and no row in repo-inventory.yml. The org audit on
develop went red 26 seconds after #293 merged:

run 32638444392 · 2026-08-23T12:06:53Z · exit 2

reusable workflow(s) ['bugbot-gate.yml'] exist in ./.github/workflows but are absent
from the inventory's `reusables` list, so they are checked against no repo and reported
by nothing.
Refusing to report on caller drift from an incomplete read.

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:

  1. It refused before evaluating ANY per-repo state — including the stale-sweep flip
    that had merged 26 seconds earlier. #1979's conformance was unverified for as long
    as this was red, not confirmed-and-fine.
  2. It blocked #306, which touches this guarded file and so needs a green audit on
    the same SHA via conformance-gate.

Why #293's own audit was green

#293's audit was re-run at ~11:38 and passed. #305 merged after that, then #293
merged. So #293's green verdict was stale with respect to develop — the re-run
trap 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 exempt rows, mirroring every existing blocked-gate.yml row at its own indent,
plus a bugbot_gate_rollout_pending anchor in shared_reasons.

Modelled deliberately on blocked_gate_rollout_pending, because this is the same
situation: 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 the
API, so adding a caller and flipping its entry to required in one PR fails on a
caller not yet on the audit branch. That is exactly what split #307 from #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 — a
reusable 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_flight
anchor 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's
verdict 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 required is the one that closes #2284.

No Closes keyword, on purpose — see backend#2364. This PR does not close
#2284, and a title reference would not have linked it anyway.

Verification

check result
yaml.safe_load parses; all 19 rows resolve as exempt dicts; bugbot-gate.yml in reusables (12 total)
scripts/tests/caller-drift-selftest.py 197 pass, 0 fail
real audit, this branch, against the live org exit 0"No drift. Every repo read, every entry matched." 19 of 19 audited, every family OK

That last row is the one that matters: with this change the audit completes, which
is what re-establishes that the 17 stale-backlog.yml: required entries from #293
actually match the fleet. callers reads 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.yml in repo-inventory.yml so 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 exempt row in every repo, citing a new bugbot_gate_rollout_pending reason (same two-step as blocked-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 to required.

Reviewed by Cursor Bugbot for commit 492a688. Bugbot is set up for automated code reviews on this repo. Configure here.

…he fleet again (backend#2284)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@LukasWodka LukasWodka self-assigned this Aug 23, 2026
@LukasWodka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 saqlainsyed007 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@LukasWodka
LukasWodka merged commit 9979fb4 into develop Aug 23, 2026
15 checks passed
@LukasWodka
LukasWodka deleted the fix/2284-inventory-row-for-bugbot-gate branch August 23, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants