Skip to content

test: seeded schedule exploration for the lane host (test-lane-explore-host) - #3233

Merged
ashhart merged 2 commits into
mainfrom
lead/lane-schedule-explorer
Nov 17, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/lane-schedule-explorer

Conversation

@ashhart

@ashhart ashhart commented Nov 13, 2026

Copy link
Copy Markdown
Owner

The lane host tests run hand-picked orders; their seeds choose samples, not schedules. This adds zig build test-lane-explore-host, which wraps the fake target and yields before each prompt call, prompt step, batched pass, first draw, one-token step and verified round. At each yield point a seed picks the next arrival, a cancel (of a request queued, filling, decoding or already ended), the backend's room for live lanes, or the memory pressure the host reads. The seed also picks the setup: lanes, request count, a draft head or none, pipelined or verified one-token rounds, early or late speculation, batched or per-stream head drafts, sampled or greedy requests, and, for chunked prompts, the chunk count and the prompt-row budget.

Two scenarios follow the existing tests: queued requests through batched prompt passes, and a decoder beside chunked prompts under the prompt-row budget. After every schedule:

  • every request finished exactly once, with no event after it;
  • it ended length with all its tokens, or cancelled only if it was cancelled;
  • its tokens equal a solo run of the same request (a prefix, if cancelled), greedy or sampled;
  • no reply passes max_tokens;
  • the backend never held more lanes than the host;
  • prompt steps beside a decoder stopped at the row budget;
  • each stream's chunks ran in order, a retry starting at 0;
  • no lane or stream is left.

A third test replays 16 seeds of each scenario and compares a digest of every yield point's act and every reply.

A failure prints its seed; zig build test-lane-explore-host -Dexplore-seed=S replays it. -Dexplore-seeds=N sets the sweep (default 200 per scenario) and -Dexplore-tally=true prints what the schedules did. The test binary runs in about 2 seconds. A planted skipped release on cancel and a removed budget stop each failed at a printed seed that replayed. No seed found a bug in main. No engine code changes; the nightly Linux host list runs the step.

  • Synthena (Ash's Agent)

The lane host tests run hand-picked orders; their seeds pick samples, not
schedules. test-lane-explore-host wraps the fake target and, before each
prompt call, prompt step, batched pass, first draw, one-token step and
verified round, lets a seed pick the next arrival, a cancel, the backend's
room for live lanes or the memory pressure the host reads. The seed also
picks the setup: lanes, requests, a draft head or none, pipelined or
verified one-token rounds, early or late speculation, batched or per-stream
head drafts, sampled or greedy requests, and for chunked prompts the chunk
count and the prompt-row budget.

After each schedule every request has finished exactly once with no event
after it, ended `length` with all its tokens or `cancelled` only when
cancelled, and its tokens are a solo run's (or their prefix); no reply
passes max_tokens, the backend never holds more lanes than the host, prompt
steps beside a decoder stop at the row budget, a stream's chunks run in
order, and no lane or stream is left. A third test replays 16 seeds of each
scenario and compares a digest of every yield point's act and every reply.

A failure prints its seed and `zig build test-lane-explore-host
-Dexplore-seed=S` replays it; -Dexplore-seeds=N sets the sweep (default
200 a scenario) and -Dexplore-tally=true prints what the schedules did.
The test binary runs in about 2 s. A planted skipped release on cancel and
a removed budget stop each fail at a printed seed that replays. No engine
code changes. The nightly Linux host list runs the step.
@ashhart
ashhart force-pushed the lead/lane-schedule-explorer branch from 3f43d90 to 17ef8d1 Compare November 17, 2026 09:36
@ashhart
ashhart merged commit a870f91 into main Nov 17, 2026
2 of 10 checks passed
@ashhart
ashhart deleted the lead/lane-schedule-explorer branch November 17, 2026 09:36
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