beads/internal
Julian Knutsen 639fa01441 fix(dolt): a lost DOLT_COMMIT response in the Deleter is indeterminate, not replayed
The Deleter commits its SQL transaction with the CALL DOLT_COMMIT inside
its withRetryTx body (or withDeleteFence's, for a guarded delete): on a
Dolt sql-server that call commits the transaction, so it is the deletion's
commit point. A failure there was wrapped as a plain error. A lost response
("invalid connection") therefore reached withRetryTx as a pre-commit
connection error, which it replays. The replay re-probed ids the first
attempt had already deleted and reported "issues not found: <id>", a
failure report for a deletion that had landed.

The commit point is now classified with wrapSQLCommitError("dolt commit",
err), as doltAddAndCommitInTx already does for its in-body DOLT_COMMIT. An
undecoded response is ErrCommitIndeterminate and is never replayed. A
decoded server error, such as a 1213 that rolled the transaction back, is
still replayed. The Sweeper has the same in-body commit point under
withWriteTx. It is never replayed, but its lost response was not reported
as indeterminate either; it now is.

Audit: every other withRetryTx/withRetryTxOn body that commits in-body does
so through doltAddAndCommitInTx, which already classifies the response.
The remaining CALL DOLT_COMMIT sites run on a pinned connection after the
SQL transaction, outside any replayed body.

Tests (real Dolt). A MySQL-wire proxy in the test package forwards the
CALL DOLT_COMMIT to the server, then cuts the client off before the
response arrives:
- TestDeleterLostDoltCommitResponseIsIndeterminateAndNotReplayed: the row
  is gone (the delete landed), the error is ErrCommitIndeterminate, and
  the deleter began exactly one transaction. On main it fails with "delete
  error = issues not found: test-doomed". With only the error check
  removed, it also reports "the delete began 2 transactions, want 1".
- TestSweeperLostDoltCommitResponseIsIndeterminate: on main it fails with
  "sweep error = dolt commit: invalid connection".

Both pass with this change. The package's Delete|Deleter|Sweep|Fence|Purge
tests pass too, against a dolt sql-server 2.2.0 test container.

Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-16 00:26:25 +00:00
..
ado ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
atomicfile ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
audit ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
beads ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
ceiling ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
compact ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
config ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
configfile ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
creds ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
debug ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
doltremote ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
doltserver ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
doltversion ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
eventsjournal ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
execenv ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
fdhygiene ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
formula ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
git ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
gitenv ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
githooksenv ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
github ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
gitignore feat(backend/http): public HTTP backend door, OSS registration, and bd connect (S6) (#7288) 2026-10-10 07:19:18 +00:00
gitlab ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
gittraceenv ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
hooks ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
httpapi feat(http): advertise issues.update.claim and route claims by it (S24a/b) (#7555) 2026-10-14 11:47:45 +00:00
httpclient feat(http): advertise issues.update.claim and route claims by it (S24a/b) (#7555) 2026-10-14 11:47:45 +00:00
idgen ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
jira ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
linear ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
lockfile ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
memoryapi ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
metrics ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
migration ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
molecules ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
notion ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
procid ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
query ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
recipes ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
remotecache ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
routing ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
storage fix(dolt): a lost DOLT_COMMIT response in the Deleter is indeterminate, not replayed 2026-10-16 00:26:25 +00:00
telemetry fix(mol): molecule reads, auto-close and close --continue over http through issueops entries (S16) (#7513) 2026-10-12 19:50:34 +00:00
templates ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
testutil fix(testutil): sweep Dolt test containers whose owner process exited (#7028) 2026-10-10 02:39:59 +00:00
timeparsing ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
tracker ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
types fix(http): bd promote over http through issueops.Promote and issues.update.persistence (S21b) (#7554) 2026-10-14 05:51:53 +00:00
ui ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
uimd ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
utils feat(http): list/show counts/dep tree/ping over http, the advertised external-dependency policy, one-lookup not-found (S6b/S6c/S6d) (#7471) 2026-10-10 18:11:56 +00:00
validation fix(issueops): enforce the close guards on every close leg (#7425) 2026-10-09 18:30:42 +00:00
versioncheck ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
workapi fix(http): bd show --current, recompute-blocked and search over http through issueops entries (S6e/S25/S26) (#7528) 2026-10-13 04:12:54 +00:00
workspacegate ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00
worktreeremove ci(bazel): split //scripts:scripts_test by what it reads; partition //:repo_files (#7414) 2026-10-09 05:13:07 +00:00