Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .trinity/seals/queen_QueenKeyedBatch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"built_by": "t27c-bootstrap@0.5.2+cc80a305d",
"closure": [
{
"spec": "specs/queen/control.t27",
"spec_hash": "sha256:2c9c2698bca4bd146d21cf8ee002935e8c80cb88a0fc29cc5bb75e90eb496e58"
},
{
"spec": "specs/queen/keyed.t27",
"spec_hash": "sha256:2c396c47a4b27d995c79e8a1b91ad87d3772463aa9a6d7794e78aed30a4c8b3e"
},
{
"spec": "specs/queen/keyed_guard.t27",
"spec_hash": "sha256:b76136cb283f2374d681b77316138d96fddeb3fd1bff5316879461ba79a409f8"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:016a3b5765e38a6d5ee1ec3f580bea1f1a62cbc2998ec40096f3072b9c28d3d5",
"gen_hash_rust": "sha256:cd10d95cea73ac75ebbde491d64f36c9c722bcc1ae2e9cdd596c9166db50bc6f",
"gen_hash_verilog": "sha256:0999747556d0fb5cf5e01c582e7de6eeb917fd053ac38c994e5055fee3afeb9c",
"gen_hash_zig": "sha256:3432ae04747785e4e3c63470422070731c3e3920b381d30d2577793682528fb4",
"module": "QueenKeyedBatch",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-17T17:26:49Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:80709724eab9fa180050984b0586ef224c87f6a8b70db245d3d04bb5af177006",
"spec_path": "specs/queen/keyed_batch.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 13,
"total": 13,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:1982ae948e24d00c5d221ccec12dfce1eb01204b53e37b0f857f93b16d64629d",
"zig": "0.16.0"
}
}
23 changes: 23 additions & 0 deletions docs/now/2026-10-18-queen-keyed-batch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# NOW -- keyed_batch.t27: the bee admission admits a batch of ready issues per queend choose (2026-10-18)

## specs/queen/keyed_batch.t27 (Closes #10033; epic #7851)

- Why: the actors trial of 2026-10-17 (#7851, comment 6237225782) started 2 bees in 20 minutes, against the loop's 18.5. The round readies about 826 candidates. The one admission actor then asked queend once per issue (`await deps.admit`, `queen-bee-actors.ts:298` at trios 42042a5), while the loop asks once per round.
- What: the admission now groups asks into one queend choose. keyed_guard.t27's answers stay the same; only the number of queend calls changes.
- `joins_batch` and `answer_now`: exactly the asks `admit_answer` would send to queend join a batch, and the rest are answered at once.
- `batch_goes_out`, `batch_take` and `chooses_for` (group commit): a batch goes out when no choose is in flight, with no timer, up to `BATCH_ASKS_MAX` = 1024, which is at least 826.
- `new_lane_quota`: control.t27 `batch_quota`, the loop's cap.
- `word_of`, `batch_answer` and `batch_grants`: queend's answer gives each issue PICK, LATER or NO. A lone ask answers as `admit_answer` does, and a batch grants exactly its quota.
- `batch_wake_count`: a freed lane wakes every waiting issue into one batch.
- `round_chooses` (the model): the measured round of 826 candidates on 47 lanes, with one pick in ten, takes 461 serial chooses and 1 batched.
- `ask_wait_ms`, `ask_bound_ok` and `word_after_choose` (bounds): an ask's call must outlast two chooses. `askQueend` has no bound today. A choose that ends with no answer moves no lane.
- Lab evidence (Railway lab, master 9a7d54aaf tree, t27c 0.5.2):
- `t27c test-report`: 13 of 13 tests pass, 0 vacuous, and 6 invariants are proved at comptime.
- `tri mutate spec`: 85 of 89 mutants are killed. Of the other four:
- 2 survivors are equivalent (`<` to `<=` where both branches return `BATCH_ASKS_MAX`);
- 1 is a hang from the mutant's own endless loop;
- 1 is unviable, because an invariant rejects it at comptime.
- Hand constant plants: 10 of 10 are caught.
- Wasm build (gen-c plus zig cc wasm32-wasi): reproducible, sha256 `1ed6bcb1...cfd8a`, 1187 bytes.
- Seal: verified, all hashes match.
- Runtime: the thin TypeScript wiring is a gHashTag/trios issue. It covers a batch-shaped `deps.admit`, `planBatch` over one choose, `batch_wake_count`, and a bound on `askQueend`. The before/after numbers go on #7851.
Loading
Loading