Repository navigation
feat(t27c): t27c asm / t27c disasm run specs/isa/t27a.t27 through gen-rust (Closes #6507) - #6862
Merged
Merged
Conversation
…-rust (Closes #6507) Owner, 2026-10-06, on issue #6507: "add the label yourself, do the work, do not ask about labels" -- label owner-approved-foreign. This lands the part of #6507 that was parked for that label. - bootstrap/gen/rust/isa/t27a.rs: `t27c gen-rust specs/isa/t27a.t27`, checked in. The T736 field table and every assemble/list decision live only in the spec; main.rs splits lines and prints. - bootstrap/src/main.rs: `t27c asm [file|-]` writes one 0x%08x word per instruction line and names each bad line; `t27c disasm [words...]` (or stdin) lists each word, `.word N` for an undefined byte. The old `asm` command is gone: it parsed a .t27 file and then emitted the same three hard-coded instructions whatever the input said. - bootstrap/src/compiler.rs: gen-rust indexes a `string` through `.as_bytes()` and types `x.len` as usize when `len` is not a struct field. Without both, t27a.rs did not compile (5 x E0277, 6 x E0308). FROZEN_HASH moves with it (3c78f3c7.. -> 0ec05a8c..). - bootstrap/tests/t27a_cli.rs: 7 tests -- the checked-in Rust is byte-identical to fresh gen-rust output; asm and disasm give the words the spec pins; disasm | asm returns all 256 low bytes and 2048 pseudo-random words; ill-formed lines and tokens are refused; a gen-rust fixture that indexes a string compiles under -D warnings and runs. - .trinity/seals: 104 seals resealed with the new binary and zig 0.16.0, because gen-rust output moved for 52 specs (and their twin seals) plus 8 outside specs/. Three seals that #6789 landed with absolute spec_path values (isa_T27a, isa_Tri27Encoding, theory_CompilerTheoryIsaRoundTrip) are relative now. - tools/policy/foreign-exceptions.txt lists the test and FROZEN_HASH under the approval (main.rs is already listed for #6509). Evidence, Railway t27c lab, never cargo on the Mac: - cargo test -p t27c --test t27a_cli: 7 passed. - cargo test --release -p t27c (whole crate, on master c4dfa27): 2919 passed, 0 failed. - check_seal_coverage: rc=0, 1472 seals, 1330 hold, 142 known-broken. - check_seal_currency: rc=0, 1347 current (base 1344), STALE 0. - rustc on gen-rust output, base vs this binary: t27a 11 -> 0 errors, lexer 2 -> 0, mse_loss 1 -> 0; tri/net/http and aho_corasick keep their pre-existing range-slice error one step later (33 -> 34, 28 -> 29). The trinity side (decoder.zig on the same table) is a separate PR in gHashTag/trinity (#1437); T27A_CONSUMER_GAP stays until it lands. Closes #6507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 6, 2026 13:54
This was referenced Oct 6, 2026
Open
Contributor
This was referenced Oct 6, 2026
Merged
ci(t27b): native arm64 t27b tests and corpus ratchet per PR; tri t27b ready reads them (#6444)
#6846
Merged
gHashTag
added a commit
that referenced
this pull request
Oct 6, 2026
Master's #6862 already resealed the three t27a seals with repo-relative paths; take master's copies. Only the orbitofrontal_value.t27 parse fix remains in this PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
Closed
gHashTag
added a commit
that referenced
this pull request
Oct 7, 2026
…ec outside it (Closes #6913) (#6925) * fix(t27c): seal records spec_path relative to the store, refuses a spec outside it (Closes #6913) compute_seal_hashes stored spec_path exactly as typed. #6789 sealed with absolute paths and committed three seals (isa_T27a, isa_Tri27Encoding, theory_CompilerTheoryIsaRoundTrip) naming the sealing agent's worktree; check_seal_coverage then failed every PR with "3 seal(s) newly do not hold [dangling]" until #6862 rewrote the three paths by hand. Second effect of the same line: run_seal's twin refresh matches spec_path by string, so an absolute-path --save left the repo-relative twins stale without a word. seal_spec_path() now records the path relative to the working directory (the directory .trinity/seals resolves against): `.` dropped, absolute and `..` forms canonicalized against the canonical cwd (macOS /var -> /private/var included), `/` separators. A spec outside the working directory is refused with the reason instead of recorded. seal_duplicates.rs pins it: an absolute, a ./ and a .. spelling of one spec each record specs/probe/dup.t27 and refresh the poisoned twin; a spec in another directory is refused and nothing is written. foreign-exceptions.txt gains the test file under the owner's standing approval (#6913). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(t27c): seal_spec_path names std::env and PathBuf in full; the file-scope imports sit in a nested module (Closes #6913) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(policy): drop the #6847 one-time block as master did in #6898, so master merges clean (Refs #6913) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(policy): take master's exception list plus the seal_duplicates.rs entry, so master merges clean (Refs #6913) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #6507
Owner approval, 2026-10-06, on #6507: "add the label yourself, do the work, do not ask about labels". Label
owner-approved-foreign.#6789 landed the spec half:
specs/isa/t27a.t27and the T736 table inspecs/isa/ternary_encoding.t27. This PR lands the two parts #6789 had parked, both on the Rust side. The emulator side is gHashTag/trinity#1437.What
t27c asm [file|-]andt27c disasm [words...](bootstrap/src/main.rs).specs/isa/t27a.t27, lowered byt27c gen-rustinto the checked-inbootstrap/gen/rust/isa/t27a.rs. The table has no second home..word N.asmcommand is removed. It parsed a .t27 file and then emitted the same three hard-coded instructions whatever the input was.bootstrap/src/compiler.rs, without which t27a.rs did not compile (5 x E0277, 6 x E0308):stringis indexed through.as_bytes();x.lenis typed usize whenlenis not a struct field.bootstrap/stage0/FROZEN_HASHmoves with compiler.rs to0ec05a8c..., per CONTRIBUTING "Build speed".bootstrap/tests/t27a_cli.rs, 7 tests:disasm | asmreturns all 256 low bytes and 2048 pseudo-random words;-D warningsand runs..trinity/seals: 104 resealed with the new binary and zig 0.16.0. gen-rust output moved for 52 specs plus their twin seals, and for 8 specs outside specs/. Three seals that feat(isa): t27a MVP -- TRI-27 assembler/disassembler round-trip (Refs #6507) #6789 landed with absolute/Users/...spec_path values are relative now.tools/policy/foreign-exceptions.txtlists the test and FROZEN_HASH under the approval. main.rs is already listed for t27c test-report: count executed asserts and flag vacuous passes (sieve C10, T730) #6509.specs/isa/t27a.t27header: the "parked" note now says where the CLI lives. Resealed, 10/10 tests.Evidence
All runs are on the Railway t27c lab. No cargo ran on the Mac. The lab tree was checked by sha256 against every tracked file of this commit before the runs.
cargo test --release -p t27c --test t27a_clicargo test --release -p t27c, whole crate on master c4dfa27tools/check_seal_coverage.pytools/check_seal_currency.pyrustc on gen-rust output, master binary vs this one:
gitleaks was run by hand on the commit: no leaks.
Not done here
T27A_CONSUMER_GAPinspecs/isa/ternary_encoding.t27stays until gHashTag/trinity#1437 merges. That PR is labelled, auto-merge is on, and it is waiting on checks. Removing the marker earlier would make a false claim, and editing that spec would also move the vendored generated file's hash.🤖 Generated with Claude Code