Repository navigation
chore(tri27): re-vendor tri27_encoding.zig -- the t27 spec closed T27A_CONSUMER_GAP (Refs gHashTag/t27#6507) - #1438
Merged
Merged
Conversation
…A_CONSUMER_GAP (Refs gHashTag/t27#6507) #1437 made decoder.zig take the T736 table from gHashTag/t27 specs/isa/ternary_encoding.t27. The spec's T27A_CONSUMER_GAP marker said the emulator did not yet use that table. With #1437 merged, the spec says T27A_CONSUMER instead (gHashTag/t27#6895), and the vendored copy here still carried the old marker, which is now false. - src/tri27/emu/tri27_encoding.zig: `t27c gen` output of the new spec, byte for byte (sha256 0979161d..., equal to gen_hash_zig of t27 .trinity/seals/isa_Tri27Encoding.json on gHashTag/t27#6895). Only the marker constant changes; no field table entry moves. - src/tri27/emu/decoder.zig: the recorded spec and generated sha256. zig 0.15.2: decoder 24/24, tri27_encoding 14/14, test_encoder_fuzz 31/31, test_comprehensive 66/66, executor 33/33, smoke_tests 37/37, encoder_simple 35/35, emit_verilog 2/2, emit_zig 2/2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 6, 2026 14:42
Contributor
X Brain Health CheckScore: 100.0/100 X Brain is above merge threshold |
Contributor
🧪 Brain Stress Test ResultsTests: 261/261 passed, 0 leaked |
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.
Refs gHashTag/t27#6507
Owner approval, 2026-10-06, on gHashTag/t27#6507: "add the label yourself, do the work, do not ask about labels". Label
owner-approved-foreign.#1437 made
src/tri27/emu/decoder.zigtake the T736 field table from gHashTag/t27specs/isa/ternary_encoding.t27. That spec carried a marker,T27A_CONSUMER_GAP, saying the emulator did not use the table yet. With #1437 merged, gHashTag/t27#6895 replaces it withT27A_CONSUMER, which names this decoder. The vendored copy here still carried the old marker, and it is now false.What
src/tri27/emu/tri27_encoding.zigis thet27c genoutput of the new spec, byte for byte.563b6ca610274d48010c05fca146634edcde13c391fcea3f44cc2790171530d60979161dbda5a2cf5077f3dcb45321382949b9a811ae1d4e7e4d2ced85afa695, which equalsgen_hash_zigin t27.trinity/seals/isa_Tri27Encoding.jsonon fix(isa): T27A_CONSUMER_GAP closed -- trinity decoder.zig takes the t27a table (Refs #6507) t27#6895.src/tri27/emu/decoder.zig: only the two recorded sha256 values and the PR reference in the provenance comment change.The generated file is not
zig fmtclean, the same as on main. It stays byte-identical to t27c output rather than being reformatted by hand.Tests
All runs use zig 0.15.2, the CI version.
gitleaks was run by hand on the commit: no leaks.
Work report
{ "version": 1, "head_sha": "b3d7a4a8f0566107b2c4bcffc0d243ea72719901", "summary": "The vendored TRI-27 field table is regenerated from the t27 spec, which now records that this emulator decoder uses the t27a table, so the stale T27A_CONSUMER_GAP marker is gone.", "changes": [ "src/tri27/emu/tri27_encoding.zig is the byte-for-byte t27c gen output of the new gHashTag/t27 specs/isa/ternary_encoding.t27; T27A_CONSUMER_GAP becomes T27A_CONSUMER and nothing else moves.", "src/tri27/emu/decoder.zig records the new spec and generated sha256 and points at gHashTag/t27#6895." ], "tests": [ { "command": "zig test src/tri27/emu/decoder.zig", "result": "All 24 tests passed under zig 0.15.2", "status": "passed", "evidence": "local run on the PR head, zig 0.15.2 as in CI" }, { "command": "zig test src/tri27/emu/tri27_encoding.zig", "result": "All 14 tests of the generated table passed", "status": "passed", "evidence": "local run on the PR head, zig 0.15.2 as in CI" }, { "command": "zig test src/tri27/emu/test_encoder_fuzz.zig and test_comprehensive.zig", "result": "31 and 66 tests passed", "status": "passed", "evidence": "local run on the PR head, zig 0.15.2 as in CI" }, { "command": "zig test executor, smoke_tests, encoder_simple, emit_verilog, emit_zig", "result": "33, 37, 35, 2 and 2 tests passed respectively", "status": "passed", "evidence": "local run on the PR head, zig 0.15.2 as in CI" }, { "command": "gitleaks detect --log-opts=-1", "result": "one commit scanned, no leaks found", "status": "passed", "evidence": "run by hand on the PR head commit" } ], "limitations": [ "The recorded spec sha256 is the spec as it stands on gHashTag/t27#6895; if that PR changes the spec before it merges, this file has to be regenerated again.", "The generated file is not zig fmt clean, as on main; it is kept byte-identical to t27c output instead of being reformatted by hand." ], "tags": [ "tri27", "t27", "isa", "emulator" ], "blog": { "title": "A spec marker that retires itself once the emulator catches up", "summary": "The t27 encoding spec flagged that the Trinity emulator did not yet read the t27a field table. Once the decoder adopted it, the spec dropped the flag and the vendored code was regenerated to match.", "outline": [ "The t27 spec for the TRI-27 instruction word carried a constant named T27A_CONSUMER_GAP, an honest note that the emulator still decoded five opcodes the old way.", "Trinity pull request 1437 moved the emulator decoder onto the code t27c generates from that spec, so the note described a problem that no longer existed.", "The spec now names the consumer instead, and this change regenerates the vendored Zig table so the copy in Trinity says the same thing as its source.", "Every TRI-27 emulator suite, from the decoder to the encoder fuzzer and the executor, still passes under zig 0.15.2 with the regenerated table." ] } }🤖 Generated with Claude Code