* fix(gate): report an unreadable store as an error, not a pending bead gate (wy-2hz4ol)
evaluateGates assigned r.err for the gh:run, gh:pr and timer arms but never
for the bead arm, so a backend or transport failure on the awaited bead's
read fell through applyGateCheckResults' pending branch: no error row, no
error count, exit 0 — indistinguishable from a healthy gate still waiting.
checkBeadGate now returns (satisfied, reason, err). A read that fails for
any reason other than not-found (storage.ErrNotFound, sql.ErrNoRows, the
partial-id resolver's text) is an error; a missing bead stays pending with
the not-found reason as before. printGateCheckSummary returns an error when
any gate could not be checked so the command exits non-zero on both the
classic and proxied routes. bd close keeps refusing on such a gate (fail
closed, --force to override) instead of treating "could not read" as
satisfied.
Tests: TestCheckBeadGate_LocalBeadLookupError now asserts the wrapped error;
TestCheckBeadGate_LocalBeadNotFoundErrorStaysPending pins the four not-found
shapes; TestEvaluateGates_BeadStoreErrorCountsAsError and
TestPrintGateCheckSummary_ErrorsFailTheCommand pin the error row/count and
the non-zero exit. Each of the three fails against its reverted line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNYoASfCXUd5AeeCNiXn51
* ci: re-run the gate after a module-proxy GOAWAY on 'Check doc flags freshness' (no code change)
* fix(gate): name close failures in the exit error; test the close refusal
Maintainer fixup for #6404 (adopt-pr review iteration 1; quality scorecard
956/1000, approve). It fixes the review's three minor findings, all in code
or text this PR introduced.
- printGateCheckSummary: the exit error said "N gate(s) could not be
checked", but errorCount also counts resolved gates whose close failed
(the "error closing" rows) on the classic and proxied routes. It now says
"could not be checked or closed", naming both row kinds, and the summary
test asserts the new text.
- close_gate_test.go: add
TestCheckGateSatisfaction_BeadGateUnreadableStoreRefuses. A store stub
whose GetIssue fails with a non-not-found error must make
checkGateSatisfaction refuse with "could not check bead gate", the read
error, and --force. Checked against three mutants: the refusal
falling through to the fail-open warning, the pre-PR reason-only refusal,
and checkBeadGate folding the read error into the reason. The existing
BeadGateInvalidFormat and ErrorMessageFormat tests catch only the first,
and only through the typed-nil routedBeadGateGetter left by a nil package
store.
- CHANGELOG: narrow the error-row claim to reads of the workspace's own
store. A bead in a prefix-routed rig whose store cannot be read still
reads as not found (pending): the routing fallback returns the local
not-found and drops the routed error. That is pre-existing and left as a
non-gating follow-up. Also say the non-zero exit covers gh, timer, and
bead gates and close failures.
Left as-is: the nit that a typed-nil routedBeadGateGetter{localStore: nil}
gets past checkBeadGate's st == nil guard (unreachable on the classic route,
where store is set before RunE). The optional `gate check` Long-help note
was skipped so the generated CLI reference does not need regenerating.
Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Eddie the Engineer <adopt-pr@gascity.com>