Repository navigation
Description
Context
packages/ui-server/tests/dialogue-storage.test.ts:471 (“native pending pressure is distinct from storage failure and keeps its finite committed prefix”) queues 257 observations behind a held real SQLite writer, then expects 256 successful visibility callbacks plus one queue-pressure refusal at line 487. During the full unit selection for #4314, it received fewer successful callbacks. The identical failure reproduces at main 7e861bdb3, using main's own preload and the unchanged test (Bun 1.4.2 on Ubuntu 24.04).
The journal's per-operation storage settlement boundary is ten seconds (packages/ui-server/src/db/settlement.ts:2). DialogueJournal.track, packages/ui-server/src/ws/dialogue.ts:377, withholds visibility when an owned write becomes indeterminate. The current test couples its queue-pressure assertion to the throughput of 256 real serial commits. The precise failing run's callback deficit is retained in its output; the underlying timing attribution needs a controlled proof.
Out of scope
Do not loosen the product's storage settlement deadline, suppress withheld evidence, or weaken the queue limit.
Scope
Make the queue-pressure proof independent of uncontrolled disk latency while retaining real writer/committed-prefix evidence, and distinguish pressure from a legitimate indeterminate-storage outcome.
Acceptance criteria
- Deterministically exercise the 256-observation queue limit and exactly one pressure refusal.
- Verify the actual finite committed prefix and its visibility classification.
- Keep the ten-second product storage settlement boundary and its independent proof unchanged.
- A mutation breaking queue-pressure admission must fail for the queue assertion.
Verification
At main, run bun run test packages/ui-server/tests/dialogue-storage.test.ts --test-name-pattern 'native pending pressure' --rerun-each 10. The baseline reproduced the same failure during repetition, after some passing iterations. The unit-category run at #4314 also reproduced it. This is filed without a milestone and not fixed in that guard PR.
Contract impact
None expected. Preserve the product's existing indeterminate-storage semantics.
2026-11-23 triage at main a3395c4: moved the test citation to its current line (:471).
Activity