Every store read is one snapshot, so a stop during the page's first read reaches the run bar (#567) #573
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/runbar-567"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two run-bar journeys failed on CI, as runs 569 and 575: a stop and a resume never reached the bar, which counted up from
0swhere it should have read2h. #567 blamed the test's timing. Run 569's trace shows a race in osfd instead:Database.readpromised one snapshot (docs/design/contract.md§3), but its connection is autocommit, so each query saw the log at its own moment. The run detail read the run's intervals before the stop and its seq after the resume, so it claimed to be as new as the resume. The page trusted that seq and skipped its re-read.OpenSpec change
reads-are-one-snapshot-567, for #567.What changed
Database.read_syncruns its function in one read transaction, so every query sees the same moment of the log. A read inside a read joins it. This covers every API read made of several queries, not only the run detail.POSTcame 6.5 s after its last request, and uvicorn's 5 s keep-alive had closed the socket (ECONNRESET).docs/testing.mdgains a row in the table of flakes: a race that load widens. Read the failed run's trace, and download its artifact before re-running.Tests
ECONNRESET, before the keep-alive fix)./tools/test.shOn the laptop, two cores could not be pinned as #567 asked. The CI image needs a registry login, which would have stored the token.
The rule against sleeps, waits and clocks in tests already exists: the spec requirement
test-suite/No test waits on the wall clock, rules 4 and 7 ofdocs/testing.md, and the checks intests/test_repo.pyand the conftest guard. This flake broke none of them. It was a real race that load widened, which is what the new row in the table says.🤖 Generated with Claude Code