Skip to content

revert: restore the pre-#155 SQLite lock behavior - #163

Merged
brentyates-swx merged 2 commits into
swxtchfrom
fm/opencode-revert-155
Oct 10, 2026
Merged

brentyates-swx merged 2 commits into
swxtchfrom
fm/opencode-revert-155

Conversation

@brentyates-swx

@brentyates-swx brentyates-swx commented Oct 10, 2026 •

Copy link
Copy Markdown

Refs #155
Refs #162

This reverts 8cff3506 (#155, "fix(core): restore the SQLite lock-wait window") on swxtch.

Why. Under concurrent writers, 8cff3506 drops more accepted prompts than its parent bf5180afa0 (#150). The report attributes the extra losses to SQLITE_BUSY_SNAPSHOT: #155 excludes that code from retry, so a stale-snapshot failure fails its prompt after the 204 has been returned. The diagnostic build behind that attribution is in the report and was not repeated for this PR. This PR restores the parent's behavior. The fix-forward is tracked in #162, and this PR does not attempt it.

Tree identity

  • The revert commit a0703354: git diff --stat bf5180afa0 a0703354 is empty.
  • bf5180afa0^{tree} = a0703354^{tree} = 164199bcea117031172486bbe1a0c5bccaedff10.
  • The follow-up commit a97b0577 changes only CHANGESET.md, adding this PR's entry.

Multi-writer comparison

Four opencode serve processes per set, one scratch DB per set, heavy load (8 rounds x 24 sessions per server x 32 threads; 768 accepted prompts per run). Short = accepted prompts (HTTP 204) with no persisted user message.

Run Build Condition Short Lock-failed lines
mw1-R this revert, a0703354 concurrent with installed 143 222
mw1-I installed, 86622785 concurrent with revert 190 311
mw2-R this revert, a0703354 concurrent with parent 151 220
mw2-P parent, bf5180af concurrent with revert 147 236
mw3-R this revert, a0703354 alone 133 230
mw3-P parent, bf5180af alone 158 213
  • No run reaches the 357 to 389 short band the report measured for 8cff3506. That build was not re-measured here.
  • Every lock-failed line carries a SQLITE_BUSY or LockTimeoutError cause.
  • Absolute levels run above the report's parent numbers (96 to 111) in this environment. The comparison that holds is reverted against parent in matched runs.
  • Fresh-store proof: integrity ok, incremental auto-vacuum, WAL, 41 of 41 migrations.

Tests

  • packages/core: sqlite-busy, 20 pass, 0 fail.
  • packages/opencode: lock consumers (httpapi-error-middleware, processor-effect), 36 pass, 0 fail.

Changeset

a97b0577 adds this PR's entry under "Fork changes" in CHANGESET.md. script/changeset-check.ts passes for #163 with CI's environment.

Full evidence: data/opencode-revert-155/report.md in the fleet data directory (not in this repo).

🤖 Generated with Claude Code

This reverts commit 8cff350.

Reason: the multi-writer failure in data/opencode-fixed-binary-155/report.md. Refs #162

Claude-Session: https://claude.ai/code/session_019PSxF9tfYzQesA13oxDTHe
@brentyates-swx

Copy link
Copy Markdown
Author

Session stamp (claim record)

@brentyates-swx
brentyates-swx merged commit 60f779b into swxtch Oct 10, 2026
3 checks passed
@brentyates-swx
brentyates-swx deleted the fm/opencode-revert-155 branch October 10, 2026 02:47
brentyates-swx added a commit that referenced this pull request Oct 10, 2026
Brings in the #155 revert (#163) before this PR merges. The reviewed
head 394ec55 stays on the first parent.

Claude-Session: https://claude.ai/code/session_015hTsruVJZ4rc4nVuPj1KgU
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.

1 participant