Repository navigation
t27b-native ratchet is red on every master run since it landed: ledger 099ac2224 predates 16 improvements and 40+ new specs #9600
Description
Re-filed from #7023. An attempt claimed that issue on 2026-10-09 and left an empty branch, and a dispatch row that has spent its retry ceiling keeps its issue for good - so no bee could take it again, however much the brief improved. The work below is carried over unchanged.
Problem
t27b-native-ratchet (.github/workflows/t27b-native.yml, landed in #6846 at 31ad9df) has been red on master on every run since it landed, and so it is red on every PR. The ledger docs/reports/t27b_expectations.json was last blessed at 099ac22 (#6646), before the workflow existed.
| master run | head | verdict |
|---|---|---|
| 37499689149 | 31ad9df (#6846 itself) | UNEXPECTED PASS 16, UNLISTED 40 |
| 37500597107 | 6540a67 | UNEXPECTED PASS 16, UNLISTED 41 |
| 37505149120 | 92d7024 (#6966) | UNEXPECTED PASS 16, UNLISTED 42 |
UNEXPECTED FAILURE is 0 on all three: nothing regressed. The red is two kinds of good news nobody recorded:
- 16 UNEXPECTED PASS:
pass_vacuousin the ledger, a real pass now (14specs/crons/*,specs/isa/ternary_encoding.t27,specs/tools/trinity/tri/wallet.t27). - 40-42 UNLISTED: specs the reference passes and the ledger does not name (
specs/verified/*,specs/isa/t27a*.t27,specs/port/*,specs/queen/actors.t27,specs/queen/control.t27,specs/tri/t27b/{fuzz,fuzz_oracle,reduce}.t27, ...).
The UNLISTED count grows by one with every merged PR that adds a spec (40 -> 41 -> 42 above). PR #7001's run 37506279886 at dbf97e9 has exactly master's 58 findings (set difference empty both ways), so it adds nothing. The check is not a required context, so it blocks no merge, but a check that is red on every head reads as noise and stops being looked at.
Proposal
- Bless the ledger on master from a master run (
tri t27b ratchet --run <master run.json> --bless), in its own PR under this epic's lane, with the run ID in the body. - Decide how a spec-adding PR stays green, so UNLISTED does not grow again. Either the PR adds its own ledger row (and the check says so in its failure text), or an UNLISTED path that the head itself adds is reported as a notice instead of red.
Acceptance criteria
t27b-native-ratchetis green on a master run after the bless.- A PR that adds one new reference-passing spec and nothing else gets a defined result (green, or red with the exact ledger line to add), written down in the ratchet's help text.
Refs #6063
Boundary
specs/isa/ternary_encoding.t27specs/queen/actors.t27specs/queen/control.t27specs/tools/trinity/tri/wallet.t27.github/workflows/t27b-native.yml
User Scenarios
- Given the
t27b-native-ratchetworkflow has been red on every master run since landing, When the ledgerdocs/reports/t27b_expectations.jsonis blessed from a clean master run, Then the workflow reports green on the subsequent master run. - Given a contributor opens a PR that adds exactly one new spec under
specs/which passes the reference implementation, When the ratchet runs on that PR, Then the check result is defined: either green, or red with the exact ledger line the PR must add to become green.
Requirements
FR-001: The ledger docs/reports/t27b_expectations.json MUST be updated via tri t27b ratchet --run <master-run.json> --bless from a passing master run so that all 16 UNEXPECTED PASS entries become expected passes and all 40-42 UNLISTED entries become listed.
FR-002: The ratchet tool MUST classify a newly added spec that passes the reference implementation as a notice (not a failure) when the spec path is introduced by the same PR, or MUST emit the exact ledger line the PR must add to make the check green.
FR-003: The workflow .github/workflows/t27b-native.yml MUST run the updated ratchet logic and exit 0 on master after the bless PR merges.
FR-004: The ratchet's help text (or failure output) MUST document the defined result for a spec-adding PR so contributors know whether to add a ledger row or expect green.
The instruments
Every one of these reads and prints; none of them writes. Run them from the repository root, with <spec> replaced by the file in ## Boundary:
.t27 is not Rust and not Zig, and a bee fluent in either writes one by
accident. Measured 2026-09-20: a bee filled eight bodies in
specs/file/watcher.t27 with return Ok(());, Err(FileError::WatcherNotFound)
and for i in 0..watchers.length. The parse ratchet refused the whole file --
Unexpected token in expression: RParen, line 123 -- and a spec that does not
parse generates nothing, so every test it already carried stopped running.
At the top level the parser accepts exactly these eight forms, with an optional
pub, and no others:
const var fn enum struct test invariant bench
There is no trait, no impl, no type X = ..., no generics, no macro. What
a bee reaches for from another language, and what happens:
- Rust's result sugar (
Ok(()),Err(E::V),?) is not a construct here. - Rust macros (
println!,format!,vec!) are not constructs here. - A range loop (
for i in 0..n) is Rust and Zig, not this language. - Zig builtins (
catch unreachable,@intCast,@constCast) are not constructs here. - Cross-module reuse (
use other::fn;) parses and then generates a comment and an unqualified call, so the Zig fails withuse of undeclared identifier(use a::b; generates no import, so no spec can reuse a function from another spec #4298). It does not work yet.
t27c parse <spec> answers in one line whether what you wrote is the language.
Run it before you report, every time.
t27c spec-status <spec>- the compiler's one-word verdict: IMPLEMENTED, PARTIAL, UNWRITTEN, NOPARSE, NOFN. Exit code is 0 whatever it says, so read the word.t27c symbols <spec>- every name the file declares, with its kind. Answers "does this already exist here?" before you add it.t27c outline <spec>- per function: its locals, what it calls, what it returns. The contract you are implementing against.t27c coverage <spec>- which functions have a test and which do not. The issue asks for tests; this is how you check you wrote them.t27c lint <spec>- style and shape warnings. It OVER-REPORTShas no test or invariant: measured 2026-09-20 over 60 specs it printed 677 of those wherecoveragefound 190 untested functions, disagreeing on 59 of the 60 - it warns aboutbit_to_trit_pairinspecs/base/ternary_encoding.t27, whichtest bit_to_trit_pair_zerocalls on line 249. Read it as a hint;coverageis the answer.t27c typecheck <spec>- types, before generation. PrintsTypecheck OK (0 errors, 0 warnings)or the errors.t27c test-report <spec>- builds this spec and runs its own tests, which is what the oracle does.BLOCKEDmeans the generated Zig does not compile, with the error beside it.python3 tools/dupe_scan.py --name <function>- where that function already lives, if it does. 576 of 4021 bodies here are byte-identical copies.
The rest of the toolbelt is in docs/BEE_TOOLBELT.md.
Activity
ci(t27b): distinguish PR ledger lag from runtime defects (Refs gHashT…
dmitrii-f-t27 commentedon Oct 15, 2026
Status update for #9600 (the issue body is bot-owned, so this is a comment).
Work is carried by one pull request, #9637 (draft, from dmitrii-f-t27). It also closes #9635 and #9632 and only refs this issue, because FR-001 is not done.
Ready in #9637 (not yet green on CI; no full integrated corpus run yet)
specs/ci/derived_data.t27ledger_code_verdictalready states. Decision inspecs/tri/t27b/steward.t27(ratchet_red, 9 tests, 7 negative controls);tri t27b ratchet --prdocuments it; the workflow passes--pronpull_requestonly. Master, the lab and every other caller stay strict, so the ledger steward still starts from a red master ratchet.FnDecl(reference CSE hoist)(ci: restore rust_convert native pass (reference CSE hoist regression) #9632) and the trios-mesh-node crypto JIT/interpreter mismatch (mesh-node port: stop random keypair test from reading undefined primitive results #9635). An UNLISTED spec that mismatches, crashes, fails or times out stays red under--pr; a ledger-listed blocked spec that turns mismatch is reported as MOVED and is not covered by this change.Not ready
tri t27b ratchet --run <run> --bless --accept-newreads a master run with UNEXPECTED FAILURE 0 and no UNLISTED defect. Blessing master's current run would record rust_convert asblocked, which is a pass -> blocked regression, so it is not done.gen_wConstDecl rows depend on spec(port): share tree helpers across eight gen_w ports (Closes #9633) #9636 (duplicate-bodies: share tree helpers across eight gen_w bench ports #9633).Boundary (actual paths in the base; the generated Rust copy of steward.t27 does not exist in the base and is not listed)
specs/isa/ternary_encoding.t27specs/queen/actors.t27specs/queen/control.t27specs/tools/trinity/tri/wallet.t27.github/workflows/t27b-native.ymlspecs/tri/t27b/steward.t27gen/c/tri/t27b/steward.c.trinity/seals/t27b_T27bSteward.jsonscripts/tri_loop/t27b.pyscripts/tri_loop/t27b_rules.pyspecs/tools/t27o/rust_convert.t27gen/rust/tools/t27o/rust_convert.rs.trinity/seals/t27o_T27oRust.jsonspecs/port/trios/crates/trios-mesh-node/src/crypto.t27.trinity/seals/src_port::trios_mesh_node_crypto.jsondocs/reports/t27b_expectations.json(FR-001, later PR)Dmitrii Fedorov (@dmitrii-f-t27)