Skip to content

Port tools/jtag/link_relay.py (Python, 7 functions) to specs/port/tools/jtag/link_relay.t27 - #4533

Merged
gHashTag merged 2 commits into
masterfrom
queen-4507
Sep 21, 2026
Merged

gHashTag merged 2 commits into
masterfrom
queen-4507

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #4507

Written by a bee on queen-4507 and published by tools/queen/publish.py. The branch itself is the bee's; the second commit is the coordination entry every pull request must add, which a bee has no way to know about.

1 file changed, 240 insertions(+)

🤖 Generated with Claude Code

Trinity Bee and others added 2 commits September 21, 2026 11:53
The turn ended with these files edited and never committed. Uncommitted
work is invisible to the review - it reads the branch - so the attempt
would have been released as empty and the next bee would have started
beside this work rather than from it.

This commit is not a claim that the work is correct. It is the bee's
work, committed on its behalf, and it is judged exactly like any other:
the adversarial reviewer reads it, the compiler runs on it, and the
issue's own criteria are measured against it.

Issue: #4507
Turn: a8dbdad9-999c-4604-a2c7-dd0f9ade43df
Ending: finished (the turn closed)
Committed: 1 path(s)
Left uncommitted: 0 path(s) outside the declared boundary
A pull request must add exactly one docs/now entry and a bee has no way
to know that: its brief names a boundary file and acceptance criteria,
and docs/now/ is neither. The publisher adds it rather than failing the
gate.

Closes #4507

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-21 13:02:44 UTC

Summary

Status Count
Total Open PRs 25
PRs with Failing Checks 23
PRs with All Checks Green 2
READY 2
FAILING 23
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=403499176a5d != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit dd4356a into master Sep 21, 2026
24 of 31 checks passed
gHashTag added a commit that referenced this pull request Sep 21, 2026
specs/port/tools/jtag/link_relay.t27 landed in #4533 today with Zig bodies
in a file named .t27: ?struct{} at line 104, 23 @intcast(x as T), 14 try
std.testing.expect, m.tms(&[...]), while (i < n) : (i += 1), .{ .role = r },
null/.unwrap()/.or(0). It failed on gen-c, gen-rust, gen-verilog and gen.

Rewritten against read_user1.t27 -- its neighbour in the same directory and
the same JTAG/MPSSE domain, and a spec that does generate. t27c check now
reports 0 errors and 0 warnings and all four backends exit 0.

The optional is kept rather than dropped: DrWord { ok, value } preserves the
distinction the Python drew with None, so a caller that ignores ok reads a
zero instead of a word the hardware never sent. The chain-IR loop, written
out four times between xfer and request, is one chain_ir(idx, chain, sel).

One of the seven dead tests asserted 0x1F3DF where the arithmetic gives
0x1F39F. A test that cannot compile cannot be wrong out loud.

adamw.t27 was fixed by #4540 and left in the baseline. check_specs_generate.py
short-circuits on "baseline now generates" and never reaches "newly does not
generate", so every run stopped at adamw and never looked at link_relay. The
stale line is pruned here; that is what made this visible.

Fixes #4559
gHashTag added a commit that referenced this pull request Sep 21, 2026
…ed the oldest problem instead

Fixes #4560

specs/port/tools/run_conformance_vvp.t27 and check_fix_carries_source.t27
landed on 2026-09-21 and have never compiled on any backend. The first is
transliterated Python, the second 565 lines of Zig with `let` against a 284
line source.

The transliteration also changed the verdict. The emitted testbench
increments `fails` and reports success on `if (folds == 0)`, a name declared
nowhere, so the pass line is unreachable. `vvp_path` is bound to the compiled
output and then rebound to the simulator binary, and the run becomes
`vvp vvp`. Neither is a parse error.

Both rewritten as specs: 0 errors, 0 warnings, four backends exit 0.
check_fix_carries_source.t27 states the verdict lattice and the is_prose
inversion but deliberately does not restate SOURCE_SCOPES or PROSE_EXT --
those have one definition in cli/tri/src/hooks.rs and the Python parses it
rather than copying it.

tools/check_specs_generate.py had four `return 1`s in a row, so the first
class found was the only one reported, and the mildest was checked three
lines before the most serious. One stale adamw ledger line left by #4540
blinded it for the whole window in which #4533, #4553 and #4556 landed. All
four classes now report and the exit is taken once. The stale-ledger branch
had no self-check case -- the only verdict in main() nothing executed -- and
now has one, with a case that plants a stale line and a new break together.
gHashTag added a commit that referenced this pull request Sep 21, 2026
…rted the oldest problem instead (#4562)

* fix(specs): the JTAG relay spec was Zig, not t27, and had never compiled

specs/port/tools/jtag/link_relay.t27 landed in #4533 today with Zig bodies
in a file named .t27: ?struct{} at line 104, 23 @intcast(x as T), 14 try
std.testing.expect, m.tms(&[...]), while (i < n) : (i += 1), .{ .role = r },
null/.unwrap()/.or(0). It failed on gen-c, gen-rust, gen-verilog and gen.

Rewritten against read_user1.t27 -- its neighbour in the same directory and
the same JTAG/MPSSE domain, and a spec that does generate. t27c check now
reports 0 errors and 0 warnings and all four backends exit 0.

The optional is kept rather than dropped: DrWord { ok, value } preserves the
distinction the Python drew with None, so a caller that ignores ok reads a
zero instead of a word the hardware never sent. The chain-IR loop, written
out four times between xfer and request, is one chain_ir(idx, chain, sel).

One of the seven dead tests asserted 0x1F3DF where the arithmetic gives
0x1F39F. A test that cannot compile cannot be wrong out loud.

adamw.t27 was fixed by #4540 and left in the baseline. check_specs_generate.py
short-circuits on "baseline now generates" and never reaches "newly does not
generate", so every run stopped at adamw and never looked at link_relay. The
stale line is pruned here; that is what made this visible.

Fixes #4559

* fix(specs): two ported specs were Zig and Python, and the gate reported the oldest problem instead

Fixes #4560

specs/port/tools/run_conformance_vvp.t27 and check_fix_carries_source.t27
landed on 2026-09-21 and have never compiled on any backend. The first is
transliterated Python, the second 565 lines of Zig with `let` against a 284
line source.

The transliteration also changed the verdict. The emitted testbench
increments `fails` and reports success on `if (folds == 0)`, a name declared
nowhere, so the pass line is unreachable. `vvp_path` is bound to the compiled
output and then rebound to the simulator binary, and the run becomes
`vvp vvp`. Neither is a parse error.

Both rewritten as specs: 0 errors, 0 warnings, four backends exit 0.
check_fix_carries_source.t27 states the verdict lattice and the is_prose
inversion but deliberately does not restate SOURCE_SCOPES or PROSE_EXT --
those have one definition in cli/tri/src/hooks.rs and the Python parses it
rather than copying it.

tools/check_specs_generate.py had four `return 1`s in a row, so the first
class found was the only one reported, and the mildest was checked three
lines before the most serious. One stale adamw ledger line left by #4540
blinded it for the whole window in which #4533, #4553 and #4556 landed. All
four classes now report and the exit is taken once. The stale-ledger branch
had no self-check case -- the only verdict in main() nothing executed -- and
now has one, with a case that plants a stale line and a new break together.

* fix(specs): two type names that each meant two different things

Refs #4560

`tri types ratchet` read 81 conflicted names against a ledger of 80.

`Context` was mine. The rewritten check_fix_carries_source.t27 named its
pull-request record `Context`, a name specs/neural/forward_pass.t27 and
specs/queen/lotus.t27 had already given to two other things. Renamed to
`PrEvent`, which is what it is; `context_incomplete` moved with it to
`pr_event_incomplete` across 10 call sites.

`Edge` came from check_graph_law8.t27 -- the same porting campaign, landed
the same day. specs/tri/graph/bellman_ford.t27 has declared `Edge` as
from/to/weight since long before it; the port's is from/to/kind. Two
concepts, one name, and nothing for a cross-spec resolver to break the tie
with. The newcomer takes the narrower name: `DepEdge`.

Ratchet now reads `ledger 80, observed 80 -- CLEAN`. All four backends
(gen-c, gen-rust, gen-js, gen-ts) exit 0 on both files.

This is also how the ratchet is meant to be read. Resolving `Mpsse` while
introducing `Context` left the count unchanged; only the identity-keyed
list showed that two separate things had happened.
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.

Port tools/jtag/link_relay.py (Python, 7 functions) to specs/port/tools/jtag/link_relay.t27

2 participants