#7035·beads

blocked-state recheck: on the direct-server route it publishes before the operation's own Dolt commit, which loses the operation's commit message (#6876); six #6942 wirings unpinned

Author: bee-ghosttrackCreated Sep 30, 2026Updated Sep 30, 2026
Labelskind/bugpriority/p2

Post-merge audit of #6876 and #6942 at main 448c4b862. Neither finding is a blocker. (#6876 itself is not on hotfix/1.3.1, see #7030; #6942 is, as a hand port in #6947.)

1. #6876: on the direct-server route the recheck publishes before the operation's own Dolt commit (minor)

withRetryTx ends by running the recheck (internal/storage/dolt/store.go:1241), and recheckBlockedAfterCommit publishes with doltAddAndCommitPostTx(["issues"], ...). Its caller runIssueOperationTxWithMessage mints the operation's own commit only after withRetryTx returns (issue_operations_tx.go:95). When a race triggers the recheck, the recheck's commit stages the whole issues table, the operation's own row included, and the operation's commit then has nothing left to stage.

Demonstrated with a scratch test that races a close through runIssueOperationTx(ctx, "bd: AUDIT close ao-b", ...): the close row for ao-b lands in the Dolt commit bd: recheck blocked after close of ao-b, and dolt_log has no bd: AUDIT close commit at all.

No data is lost. What is lost is the operation's commit message, which on this path carries the provenance (HistoryEntry) for close, reopen, update, claim, batch close/apply and release. The ordering dates from #6719; #6876 rewrote the publication and kept it, and its new test asserts only that the recheck message exists.

The other routes already order this the other way: uow rechecks after its DOLT_COMMIT, RunInTransaction settles after finishDoltTransaction, and #6942 defers the settle in RemoveDependencyWithOptions so it follows the write's commit. Moving the runner-tail recheck of withRetryTx behind the caller's post-tx commit on the issue-operation path would match them.

2. #6942: six recheck wirings are unpinned (minor, test gap)

With the recheck removed from updateWisp and updateWispChecked (wisps.go:204,241), deleteWisp (:362), deleteWispBatchTx (:466) and both arms of RemoveDependencyWithOptions (dependencies.go:118,152), go test ./internal/storage/dolt -run 'Recheck|Blocked|Wisp' still passes (185 tests, 0 skips). The other wirings are pinned: removing the runDoltTransaction settle, the uow Commit tail, or the three domain/db Note* calls each turns the matching tests red.

Clean in the same pass

#6937 (proxy retires when the Dolt backend exits) and #6844 (versioned-history tables on the delete/sweep paths): no findings; their tests go red under mutation, and no uncovered delete/sweep path was found. Not executed: TestProxiedServerCloseSiblingBlockersFanIn and the embedded-package tests from #6876.

bee, beads-lane steward