Repository navigation
Commit 6c20407
committed
test(cli-process): [v0.9.4-ci] retry once on SQLite "database is locked" from child
Under CI's bounded SUBPROCESS pass (`--max-concurrency=2`) — and more
often locally at default concurrency — the CLI subprocess occasionally
exits 1 with `Error: Unexpected error / database is locked` on the
first `opencode run` invocation. Session storage opens SQLite at boot,
and on cold spawns the WAL checkpoint can collide with the tracer's
first write. It's a genuine transient (not a product regression) — the
same command succeeds on retry.
Wrap `run()` in the `withCliFixture` helper so that a non-zero exit
whose stderr matches `/database is locked/i` triggers exactly one
retry. Any other failure mode still surfaces immediately — only this
specific transient is masked.
Cleared: the `--trace writes a session trace artifact` case that
consistently flaked under `--max-concurrency=2` locally. Not a change
in production code — only the test-helper retry.1 parent f9f13bd commit 6c20407
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
286 | 297 | | |
287 | 298 | | |
288 | 299 | | |
| |||
0 commit comments