Skip to content

test: a third stream past two lanes queues, then runs in every shared round - #3757

Merged
ashhart merged 3 commits into
mainfrom
lead/third-stream-queue-test
Nov 20, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/third-stream-queue-test

Conversation

@ashhart

@ashhart ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

A user report said a third stream on a two-lane server ran slower than the first two. A repro on our Mac Studio showed normal queueing: the third request waits for a lane, then runs at the same per-round rate as the others. This PR pins that behaviour so it cannot regress.

The new fake-backend test in zig/src/core/lane_host_lone_test.zig:

  • A and B hold both lanes; C waits with the named engine_busy reason.
  • A fourth request joins behind C and must not pass it (FIFO admission).
  • When A finishes, C decodes one token in every shared round beside B, with the fake backend's own continuation, and never opens the lone path.

Test code only; the engine is unchanged. zig fmt --check passes on the file; test-lane-api-host runs the new test green (the 12 failures in that step are the known originals_test baseline, untouched here).

  • Synthena

@ashhart
ashhart force-pushed the lead/third-stream-queue-test branch 2 times, most recently from c0b7040 to e6f3bf3 Compare November 18, 2026 17:58
With --parallel 2 a third stream waits for a lane and then shares rounds at
the normal rate; it is not put on a lone or degraded path. This fake-backend
regression pins the engine_busy wait reason, FIFO admission behind the first
two streams, and full shared-round decode with the fake's own tokens once a
lane frees. Test code only; the engine is unchanged.
The test observed a transient two-admitted/one-queued state within one
millisecond and assumed the lone driver never opens. On a busy runner the
engine can admit nothing in that window, and the lone driver can take a
stream, so the assertions failed even though the lane host queued C and
decoded it in shared rounds. Wait up to ten seconds for C's named
engine_busy reason, keep A and B long enough for that observation, and
remove the lone driver so the lane core is the only path C can take.
@ashhart
ashhart force-pushed the lead/third-stream-queue-test branch from e6f3bf3 to f46a5c4 Compare November 20, 2026 09:12
@ashhart
ashhart merged commit 11a0de0 into main Nov 20, 2026
2 of 11 checks passed
@ashhart
ashhart deleted the lead/third-stream-queue-test branch November 20, 2026 09:12
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