You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test the 1 untested function in specs/fpga/testbench.t27
Context
t27c coverage specs/fpga/testbench.t27 says this file declares 15 functions and 1 of them has no test. A function with no test is a claim: it compiles, it generates, and nothing in this repository says what it is supposed to do.
.t27 is the hand-authored source language.t27c compiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.
Before you write a function, ask whether it already exists. 576 of the 4021 function bodies in specs/ are byte-identical copies of another one - magadd written 30 times, sadd 29 - because nothing told the agent writing them that the function was already there.
If it already exists, do not copy it and do not try to import it. Cross-module reuse does not generate yet: use other::fn; compiles to a comment and an unqualified call, and the Zig fails with use of undeclared identifier. Say so in your report instead - name the file and line where the function lives and state that this spec needs it - and implement only what this spec's own criteria ask for. Duplicate Body Ratchet fails a pull request that adds a new copy, and 576 of 4021 bodies here are already copies, each of which has to be fixed everywhere it was written.
The compiler answers more questions than grep does. Every one of these reads the file and prints; none of them writes. Run them from the repository root, with <spec> replaced by the file named 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.
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-REPORTS has no test or invariant: measured 2026-09-20 over 60 specs it printed 677 of those where coverage found 190 untested functions, disagreeing on 59 of the 60 - it warns about bit_to_trit_pair in specs/base/ternary_encoding.t27, which test bit_to_trit_pair_zero calls on line 249. Read it as a hint; coverage is the answer.
t27c typecheck <spec> - types, before generation. Prints Typecheck 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. BLOCKED means 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.
Check yourself with t27c test-report before you report. It builds this spec and runs its own tests, which is what the review does. BLOCKED means the generated Zig does not compile, and the error is printed beside it. If the block comes from something outside this file, say so in your report and name the error rather than working around it. The rest of the toolbelt is in docs/BEE_TOOLBELT.md.
Current state - re-run these yourself, from the repository root
Givenspecs/fpga/testbench.t27, where 1 of its 15 functions has no test, whenstim_count_before is written and the commands under Acceptance criteria are run from the repository root, then each of those commands prints the value stated beside it.
Requirements
FR-001: every signature quoted below MUST stay exactly as it is - the signature is the contract, and a caller elsewhere is holding it.
FR-002: the spec MUST still parse afterwards. t27c parse is the check, and a spec that stops parsing generates nothing, so every test it already carried stops running too.
FR-003: no function MUST be deleted to satisfy a count. The function count is itself a criterion below.
FR-004: each test MUST assert on a result. assert true and a body of only comments are counted as vacuous by t27c validate-vacuity, and the corpus ratchet fails a file that gains one.
What has no test
Quoted verbatim from the file - keep every signature exactly as it is:
The file already has 16 test declaration(s). Write one for each function above. Either spelling is accepted: test name { or test "name" {.
A test that asserts nothing is not coverage. assert true and a body of only comments are both counted as vacuous by t27c validate-vacuity, and the corpus ratchet fails a file that gains one.
Acceptance criteria
t27c coverage specs/fpga/testbench.t27 2>&1 | grep -cE '^Untested: +0$' prints 1 (today: 0 - it prints Untested: 1)
grep -cE '^[[:space:]]*(pub[[:space:]]+)?fn[[:space:]]' specs/fpga/testbench.t27 prints 15 - the same functions are still there (deleting a function also makes it untested-free)
grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/fpga/testbench.t27 prints at least 17 (today: 16)
t27c spec-status specs/fpga/testbench.t27 prints IMPLEMENTED (today: IMPLEMENTED)
t27c test-report specs/fpga/testbench.t27 2>&1 | grep -c BLOCKED prints 0 - this spec compiles today and must still compile (today: 0)
Test the 1 untested function in specs/fpga/testbench.t27
Context
t27c coverage specs/fpga/testbench.t27says this file declares 15 functions and 1 of them has no test. A function with no test is a claim: it compiles, it generates, and nothing in this repository says what it is supposed to do..t27is the hand-authored source language.t27ccompiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.Before you write a function, ask whether it already exists. 576 of the 4021 function bodies in
specs/are byte-identical copies of another one -magaddwritten 30 times,sadd29 - because nothing told the agent writing them that the function was already there.If it already exists, do not copy it and do not try to import it. Cross-module reuse does not generate yet:
use other::fn;compiles to a comment and an unqualified call, and the Zig fails withuse of undeclared identifier. Say so in your report instead - name the file and line where the function lives and state that this spec needs it - and implement only what this spec's own criteria ask for.Duplicate Body Ratchetfails a pull request that adds a new copy, and 576 of 4021 bodies here are already copies, each of which has to be fixed everywhere it was written.The compiler answers more questions than
grepdoes. Every one of these reads the file and prints; none of them writes. Run them from the repository root, with<spec>replaced by the file named in## Boundary:.t27is not Rust and not Zig, and a bee fluent in either writes one byaccident. Measured 2026-09-20: a bee filled eight bodies in
specs/file/watcher.t27withreturn 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 notparse 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:There is no
trait, noimpl, notype X = ..., no generics, no macro. Whata bee reaches for from another language, and what happens:
Ok(()),Err(E::V),?) is not a construct here.println!,format!,vec!) are not constructs here.for i in 0..n) is Rust and Zig, not this language.catch unreachable,@intCast,@constCast) are not constructs here.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.Check yourself with
t27c test-reportbefore you report. It builds this spec and runs its own tests, which is what the review does.BLOCKEDmeans the generated Zig does not compile, and the error is printed beside it. If the block comes from something outside this file, say so in your report and name the error rather than working around it. The rest of the toolbelt is indocs/BEE_TOOLBELT.md.Current state - re-run these yourself, from the repository root
User Scenarios & Testing
specs/fpga/testbench.t27, where 1 of its 15 functions has no test,when
stim_count_beforeis written and the commands under Acceptance criteria are run from the repository root,then each of those commands prints the value stated beside it.
Requirements
t27c parseis the check, and a spec that stops parsing generates nothing, so every test it already carried stops running too.assert trueand a body of only comments are counted as vacuous byt27c validate-vacuity, and the corpus ratchet fails a file that gains one.What has no test
Quoted verbatim from the file - keep every signature exactly as it is:
fn stim_count_before(stimuli: [TbStimulus], count: u32, cycle: u32) -> u32The file already has 16
testdeclaration(s). Write one for each function above. Either spelling is accepted:test name {ortest "name" {.A test that asserts nothing is not coverage.
assert trueand a body of only comments are both counted as vacuous byt27c validate-vacuity, and the corpus ratchet fails a file that gains one.Acceptance criteria
t27c coverage specs/fpga/testbench.t27 2>&1 | grep -cE '^Untested: +0$'prints1(today: 0 - it printsUntested: 1)grep -cE '^[[:space:]]*(pub[[:space:]]+)?fn[[:space:]]' specs/fpga/testbench.t27prints15- the same functions are still there (deleting a function also makes it untested-free)grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/fpga/testbench.t27prints at least17(today: 16)t27c spec-status specs/fpga/testbench.t27printsIMPLEMENTED(today: IMPLEMENTED)t27c test-report specs/fpga/testbench.t27 2>&1 | grep -c BLOCKEDprints0- this spec compiles today and must still compile (today: 0)Boundary
specs/fpga/testbench.t27