Documentation
¶
Overview ¶
Command bdaudit finds bd issues whose recorded state disagrees with what git history actually shows, and reports them -- it never writes to bd.
The concrete cost this guards against: gopherstack-cqy3 (cloudformation stack policy never enforced on UpdateStack) was fixed on 2026-08-15 in commit 69bbb940a, as a side effect of closing its parent issue -- whose own close reason names the cloudformation fix explicitly. cqy3 itself was never closed. Five days later it was dispatched to a worker as live P2 work, and a full agent run was spent rediscovering a fix already on main. bd does not parse commit messages or infer closure through a parent's close reason, so nothing else in the toolchain would have caught this.
Three independent checks:
Trailer check (deterministic). Scans commits in -range for "Closes|Fixes|Resolves gopherstack-<id>" trailers and flags any id bd does not show as closed. This is the literal ask behind gopherstack-101r: 45 issues shipped this way in one session because bd never parses commit messages.
Typo check (deterministic, the inverse of 1). Flags a trailer id that does not exist in bd at all -- cheap, and it has bitten before (a ledger and a PR cited gopherstack-mtqf from truncated `bd create` output; the real id was gopherstack-c7s3).
Suspicion pass (heuristic, NOT deterministic). cqy3's fixing commit carried no trailer for cqy3 -- it was closed by implication through a parent issue's sweep, a shape check 1 structurally cannot see no matter how wide its range. This pass flags open issues whose discovered-from parent is closed and whose close reason shares unusual words with the issue's own title, and open issues whose cited file:line no longer matches the source tree. These are leads for a human, not verdicts: expect false positives, and see the ranked SUSPICION LIST section for the signal behind each row.
This tool only reports. It never calls bd, never closes anything, and exits non-zero only for the two deterministic checks -- the suspicion list never affects the exit code.
Usage:
go run ./cmd/bdaudit # origin/main..HEAD, this branch's own commits go run ./cmd/bdaudit -full-history # every commit reachable from -base go run ./cmd/bdaudit -range origin/main...HEAD go run ./cmd/bdaudit -json out.json go run ./cmd/bdaudit -no-suspicion # only the two deterministic checks