Repository navigation
spec(queen): keyed_batch.t27 -- the bee admission admits a batch of ready issues per queend choose (Closes #10033) - #10051
Merged
Conversation
…eady issues per queend choose (Closes #10033) The actors trial on trios 42042a5 started 2 bees in 20 minutes, against the loop's 18.5, because the one bee-admission actor asked queend once per issue. This card says how a batch of asks is answered with one choose: which asks join a batch, group commit with no timer, the loop's batch_quota, one policy word per issue, a batched wake, and the bound an ask's call must keep over a choose. Lab evidence (Railway lab): 13/13 tests, 0 vacuous, 6 invariants; mutate 85/89 killed (2 equivalent, 1 hang, 1 unviable); 10/10 constant plants caught; reproducible wasm; seal verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Runtime wiring: gHashTag/trios#2043 |
5 tasks
gHashTag
enabled auto-merge (squash)
October 17, 2026 17:33
Contributor
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.
Closes #10033. Epic #7851.
Why
On 2026-10-17 the keyed-actors trial (trios 42042a5,
TRIOS_QUEEN_DISPATCH=actors) started 2 runners in 20 minutes. The round loop starts 18.5 in the same time, so the trial was reverted (evidence).The cause is that admission is serial:
bee-admissionactor then awaits one queendchooseper issue (queen-bee-actors.ts:298).What
This PR adds
specs/queen/keyed_batch.t27, a new card. It changes how many queend calls the admission makes, not what it answers: a batch holding one ask answers exactly as keyed_guard.t27admit_answerdoes.joins_batch,answer_nowadmit_answerwould send to queend join a batch. The rest are answered at once.batch_goes_out,batch_take,chooses_forBATCH_ASKS_MAX= 1024 asks, which is at least the measured 826.new_lane_quotabatch_quota, the loop's own cap.word_of,batch_answer,batch_grantsbatch_wake_countround_chooses,chooses_of,grants_ofask_wait_ms,ask_bound_ok,word_after_chooseASK_BOUND_MS30000 > 2 xCHOOSE_BOUND_MS12000. The choose bound is chosen, not measured. A choose that ends with no answer gives LATER, so it moves no lane and refuses nobody.The card has 13 tests and 6 invariants.
Lab evidence (Railway lab only, nothing run on the Mac)
The lab ran on a tree of master 9a7d54a with t27c-bootstrap 0.5.2 and zig 0.16.0. The spec's sha256 is
80709724eab9fa180050984b0586ef224c87f6a8b70db245d3d04bb5af177006.t27c test-report: 13 of 13 tests pass, with 0 vacuous. The 6 invariants are proved at comptime.tri mutate spec --jobs 8: 89 mutants, 85 killed (68 by a test and 17 by an invariant at compile time). The other 4:<to<=at line 93 (batch_take) and line 168 (batch_wake_count). Atopen == MAXboth branches return MAX.i = iinbatch_grants, which is the mutant's own endless loop.ask_bound_ok -> return false. The invariantthe_bounds_this_card_sets_fitrejects it at comptime.candidates - ito+ i, andj < i+chunkto<=. Both showed a test gap. The added (1500, 400, 5) assert now kills them.tri mutate plant): all 10 are caught.t27c gen-cfollowed byzig cc --target=wasm32-wasi -Oz -DNDEBUG -mexec-model=reactor. It exports the 16 card functions pluslane_free,admit_answer,wake_countandbatch_quota.1ed6bcb13de9ff4c462ff6d0f8a1ba6e3c590d0235756f3aa4ce4bd8fcacfd8a(1187 bytes)..trinity/seals/queen_QueenKeyedBatch.json, built by t27c-bootstrap@0.5.2+cc80a305d.--verifyreports all hashes MATCH.Runtime
The thin TypeScript wiring is a gHashTag/trios issue (linked in a comment below). The before/after numbers against the loop go on #7851.
Follow-up noticed
gen-c does not escape C keywords. A local named
shortbroke the wasm build, so this card names itrest.🤖 Generated with Claude Code