Repository navigation
desk-hub: reply-chain, reconnect and org-directory stop asserting timings the pool's load breaks - #112
Merged
Conversation
…reaks The hub's code was right in all three; each test held a load-sensitive span to a bound with too little room. reply-chain (D1): the stalled `have` ended the stream at its 1 s bound and the POST was answered 503 delivery-failed with frames 0, as asserted, but 2.39 and 2.18 s after it was sent (runs 39607160893, 39608865906), where the test allowed 2 s. The span holds the whole round trip (the suite's proxy, the Worker, the Registry, the Machine, the Project), 10 to 35 ms on a quiet box. The test now asserts what the bound proves: the answer came after the stall's 1 s and before the deployed 10 s bound (WRITE_TIMEOUT_MS). With the hello held 1.2 s, the old test fails as in CI (2218 ms) and the new one passes (and at 4 s); without the suite's bound (the deployed 10 s instead), the new one still fails. reconnect (a reconnect within the grace is no flap): the close, a forwarded RPC, the next stream and its hello had to land within a 1.5 s grace. They take about 350 ms on an idle box; in run 39604097046 the machine's org frames show the grace lapsing before the new hello's `have` (offline at 59.415, online again at 59.436), so the parked RPC failed machine-offline and never reached the new stream. That case's machine now has a 5 s grace (the other grace case keeps 1.5 s, which it must see run out). With the reconnect started 1.3 s late, the old test fails as in CI and the new one passes (and at 4 s); started 5.5 s late, past the new grace, the new one fails. org-directory (a follow-only hello renews and lapses): a 600 ms lease on a 200 ms heartbeat, asserted never offline over 1.8 s; one renewal landing 400 ms late lapsed it (run 39604097046). The shape session-plane's lease test had before MAWS #107, fixed the same way: a 3 s lease, the wait ending a second past the lease the hello started, and the lapse awaited within the lease plus 5 s. With the acks paused 600 ms, the old test fails as in CI and the new one passes (and at 2.4 s); with no ack renewing, the new one still fails. Closes the tracker's reply-chain row; reconnect and org-directory had none. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…not 200 ms "a session POST and a subscribe pass a held have" asserted the second lane's session POST answered within 200 ms. What it proves is that the POST is answered while the have is still held (the release comes after), which a POST waiting behind the have never is; the 200 ms measured the box. On the pool, run under the failing CI-opt arms' conditions (5x8, no module cache), the suite's own copy took 1,046 ms (run 39669676842). The case now waits for the answer up to 5 s, as the subscribe right after it does, and fails naming it past that. With the answer 1 s late, the old case fails (1,008 ms against 200) and the new one passes (and at 4 s); 6 s late, the new one fails. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…se, failing when the close has not reached the project (induced load only) Seen twice in 20 scratch copies of master's reconnect suite with eight busy loops beside each 5x8 shard (run 39668112587), not among CI-opt's recorded failures; logged rather than fixed with this branch's three cases. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
The tracker's one conflict: master's new rows kept, this branch's row after them. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 21, 2026
… desk #112) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three desk-hub flakes from CI-opt's sharded unit runs on master (MAWS #108's body; the tracker's 2026-10-21 desk row), plus a fourth case in the same reply-chain suite that failed the same way during this branch's pool runs. The hub's code was right each time. Each test held a span to a bound with too little room for the pool's load. That span is the suite's own client and proxy plus the local hub runtime, where one Durable Object call can stall for a second.
The diagnostics show how large those stalls get. In one 4x8 shard without the module cache, an org-directory copy's Machine fired its 200 ms heartbeat late and answered the previous ack late at the same moment, by 0.93 s and then 0.72 s. This happened beside the heavy artifacts-dom suites, while the test process itself showed no event-loop lag (run 39670570077).
The cases
reply-chain, "a hello whose have the stream does not take (D1)" (runs 39607160893, 39608865906)
haveended the stream at the suite's 1 s write bound, and the POST was answered503 delivery-failedwith frames 0, as asserted. The answer came 2.39 s and 2.18 s after the POST was sent, and the test allowed 2 s. On a quiet box the round trip around the bound takes 10 to 35 ms.WRITE_TIMEOUT_MS).reply-chain, "a session POST and a subscribe pass a held have" (found here: run 39669676842, 5x8 without the module cache)
haveis still held, since the release comes later in the case.reconnect, "a reconnect within the grace is no flap" (run 39604097046)
have: offline at 13:02:59.415, online again at .436. The parked RPC therefore failedmachine-offlineand never reached the new stream.RECONNECT_GRACE_MS). The other grace case keeps 1.5 s, because it has to see the grace run out.org-directory, "a follow-only hello renews… and lapses without them" (run 39604097046)
Evidence
Before and after, delay injected (local, each case alone; the master copy against this branch):
expected 2218.76 to be less than 2000expected 10017.44 to be less than 10000expected 1007.99 to be less than 200no answer to the session POST while the have is held within 5000 msno the waiting RPC on the new stream … within 5000 ms(CI's message)expected false to be true(CI's)Repeats on the pool (unit only, on scratch
ci/hfl2-*refs, deleted after). Each run carried 20 whole-suite copies of each of the three suites (60 files), instrumented to print each case's timings. The no-cache runs reproduce the failing CI-opt arms:--fsModuleCacheoff, at 3x8, 4x8 and 5x8.With their fixes, the three original cases ran 148 times each: 140 copies, the 7 runs' own suites and this gate. The first case ran 85 times with its fix. There was no desk-hub failure among them.
No run failed master's three cases themselves. The natural stalls of 0.9 and 1.65 s in run 39670570077 hit copies that already carried the fix, and the busy loops never stalled anything past 0.4 s. The before-and-after evidence for the three is therefore the injected delays above.
Gate: class 1a static and unit on the head, green: run 39671500453.
Tracker
machine-offline, as designed. It was seen only under the busy loops (2 of 20 copies), not in CI-opt's recorded failures, so it is logged rather than fixed here.Residual
org-directory's new lease is 3 s, as session-plane's has been since #107. The longest renewal gap measured here was 1.65 s, in one copy of 140, which left 1.35 s of the lease. A stall past 3 s would flake both.
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)