From e1b3a65a0f44447f491e7c4ff4264a798aaf8c5e Mon Sep 17 00:00:00 2001 From: Dmitrii Fedorov Date: Sat, 10 Oct 2026 20:27:56 -0300 Subject: [PATCH] docs(isa): mark S05 findings fixed upstream (Closes #5614) --- .trinity/seals/isa_Tri27Bytecode.json | 9 +-- .trinity/seals/isa_Tri27Machine.json | 9 +-- .../2026-10-10-tri27-fixed-findings-5614.md | 61 +++++++++++++++++++ specs/isa/tri27_bytecode.t27 | 11 ++++ specs/isa/tri27_machine.t27 | 11 ++++ 5 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 docs/reports/2026-10-10-tri27-fixed-findings-5614.md diff --git a/.trinity/seals/isa_Tri27Bytecode.json b/.trinity/seals/isa_Tri27Bytecode.json index 4faedce59c..1012f406cc 100644 --- a/.trinity/seals/isa_Tri27Bytecode.json +++ b/.trinity/seals/isa_Tri27Bytecode.json @@ -1,5 +1,5 @@ { - "built_by": "t27c-bootstrap@0.5.2+5d5d2cdef", + "built_by": "t27c-bootstrap@0.5.2+8db413a0d", "closure": [], "config": "gen=c,rust,verilog,zig;tests=zig", "gen_hash_c": "sha256:642560929a8194444335f20564d911bd310ca5411ed91193a57aa60e9b17e82f", @@ -9,16 +9,17 @@ "module": "Tri27Bytecode", "ring": 12, "seal_schema": 2, - "sealed_at": "2026-10-09T14:49:17Z", + "sealed_at": "2026-10-10T23:26:01Z", "sealed_by": "t27c-bootstrap@0.5.2", - "spec_hash": "sha256:ddade525fb5f57aa035780cb877afcc013077bbdf07f5ff155541fbaeb1f2176", + "spec_hash": "sha256:62a0dc69d82c96d8cbd706049abeb77309243e5c0e694de2594dc4c04ce97abc", "spec_path": "specs/isa/tri27_bytecode.t27", "tests": { "failed": 0, "failing": [], "forced": false, "passed": 6, - "total": 6 + "total": 6, + "vacuous": 0 }, "toolchain": { "test_runner": "sha256:1982ae948e24d00c5d221ccec12dfce1eb01204b53e37b0f857f93b16d64629d", diff --git a/.trinity/seals/isa_Tri27Machine.json b/.trinity/seals/isa_Tri27Machine.json index ea629b8336..d509ed5552 100644 --- a/.trinity/seals/isa_Tri27Machine.json +++ b/.trinity/seals/isa_Tri27Machine.json @@ -1,5 +1,5 @@ { - "built_by": "t27c-bootstrap@0.5.2+5d5d2cdef", + "built_by": "t27c-bootstrap@0.5.2+8db413a0d", "closure": [], "config": "gen=c,rust,verilog,zig;tests=zig", "gen_hash_c": "sha256:c432acdf678e39c88f1071d4513a57927d8906941d2ad1479eb539cc3c177f9a", @@ -9,16 +9,17 @@ "module": "Tri27Machine", "ring": 12, "seal_schema": 2, - "sealed_at": "2026-10-09T14:49:19Z", + "sealed_at": "2026-10-10T23:25:59Z", "sealed_by": "t27c-bootstrap@0.5.2", - "spec_hash": "sha256:0b6421d15fbd861e9ed918f564d10c2f87064e3c12c0386ffa0584ee28eb4e44", + "spec_hash": "sha256:8869da775e12c5cd5d0df3fcc9f2e508be64e0c2ece8f6bbcb462823fbd8ee46", "spec_path": "specs/isa/tri27_machine.t27", "tests": { "failed": 0, "failing": [], "forced": false, "passed": 10, - "total": 10 + "total": 10, + "vacuous": 0 }, "toolchain": { "test_runner": "sha256:1982ae948e24d00c5d221ccec12dfce1eb01204b53e37b0f857f93b16d64629d", diff --git a/docs/reports/2026-10-10-tri27-fixed-findings-5614.md b/docs/reports/2026-10-10-tri27-fixed-findings-5614.md new file mode 100644 index 0000000000..634f083436 --- /dev/null +++ b/docs/reports/2026-10-10-tri27-fixed-findings-5614.md @@ -0,0 +1,61 @@ +# S05 fixed-upstream notes (#5614) + +Author: Dmitrii Fedorov (@dmitrii-f-t27). Base: upstream master +102fe3b6dcc242660df9d8903d0de93f6bd58010. + +## Result and scope + +The two pinned S05 specs now distinguish findings at revision 976df517 from +fixes merged in gHashTag/trinity#1250 as +e7919fdc91bd9ff4aa7ab91dd2a6dd4218176357 on 2026-10-02. Its merge status and +actual executor, loader, decoder and numeric-comment diff were checked. + +Machine notes name CALL's next-instruction return address, the loader's +four-byte packing and pc 3, SACR's immediate mode and the corrected 3^9 labels. +Bytecode notes name the twelve-byte header agreement, CONSTANTS id/count/payload +layout and the loader placement/entry-point change. Finding numbers are explicitly +one-based. The CALL stack guard and the remaining findings are not declared fixed. + +Only comment blocks and ordinary generated seals change. PINNED_REVISION, +FINDINGS, FINDING_COUNT and all executable rules remain byte-identical after +removing comments and blank lines. Findings counts remain 15 and 8; the pin is +976df517419f918f05b78e73767e2fdf4aad14be. All four generated backend hashes are +unchanged from master. The spec hashes and sealing metadata reflect the new text. + +The Queen-runnable restatement of #5614 excludes the Python replay model and +JSON vectors. Neither is modified; this does not claim they now replay the newer +emulator, and it does not claim hardware or complete model inference. + +## Verification + +- Complete parse: zero discarded tokens in each spec. +- Reference Zig: machine 10/10, four compile-time invariants, 93 runtime asserts; + bytecode 6/6, four compile-time invariants, 32 runtime asserts. No vacuous tests. +- Native arm64 --check: machine 10/10, four held invariants, 97 runtime asserts; + bytecode 6/6, four held invariants, 36 runtime asserts. Interpreter/JIT agree. +- Both ordinary, unforced seal --save runs succeed. Subsequent --verify matches + each spec hash and all four backend hashes. No seal fields are hand-edited. +- Self-review confirms comment-only source diff, unchanged pinned rules and + explicit scope. No mirrored tests were added for a documentation-only change. + +Evidence: /Users/ssdm4/trinity-results/tri27-fixed-findings-5614/ and the locally +saved upstream PR diff in the spec-tests-7641 evidence directory. + +## Task-chain disposition + +1. Request: complete eligible own-author work; own issue #5614 supplies criteria. +2. Existing specs, pinned scope, instructions and upstream accepted fix checked. +3. Existing own issue used; no duplicate issue created. +4. Source annotations live in the existing .t27 specs. +5. No handwritten foreign source, replay-model or vector modification. +6. Existing tests, invariants, parse and normal seals verified above. +7. PR preparation is local; publication still needs the owner's outbound approval. +8. Diff reviewed against the upstream fix and unchanged executable text. +9. Latest-head CI remains pending until publication. +10. Maintainer action uses the authorized email procedure; no independent review + is required by the owner's standing rule. No unapproved message was sent. +11. Merge/issue closure remain pending until green CI and usable upstream access. +12. Applicable publication is acceptance of these spec annotations, not a service + deployment or an emulator replay update. +13. No hardware, customer activity or reward claim follows. +14. This report records checks and the remaining acceptance steps. diff --git a/specs/isa/tri27_bytecode.t27 b/specs/isa/tri27_bytecode.t27 index 83c08fac82..3b47052eac 100644 --- a/specs/isa/tri27_bytecode.t27 +++ b/specs/isa/tri27_bytecode.t27 @@ -10,6 +10,17 @@ ; and replays the loader vectors of conformance/trinity/tri27_programs.json. ASCII only (L3). ; phi^2 + 1/phi^2 = 3 | TRINITY +; FIXED_UPSTREAM (gHashTag/t27#5614): gHashTag/trinity#1250 merged as +; e7919fdc91bd9ff4aa7ab91dd2a6dd4218176357 on 2026-10-02. At that newer revision: +; - FINDINGS 7: writer and loader agree on the twelve-byte header; the loader +; skips the two padding bytes before reading the CODE payload. +; - FINDINGS 8: CONSTANTS reads id, then count, then count * 8 payload bytes. +; - CODE_PLACEMENT and LOAD_PC: one code word is packed per four-byte fetch unit +; at byte 12 + i * 4, with pc = 3, matching the writer's label addresses. +; Finding numbers here are one-based; the other findings are not declared fixed. +; PINNED_REVISION, FINDINGS and every executable rule below still describe +; 976df517; this note neither repins nor updates the replay model or JSON vectors. + module Tri27Bytecode; pub const KIND : str = "isa-bytecode"; diff --git a/specs/isa/tri27_machine.t27 b/specs/isa/tri27_machine.t27 index 93c241d63b..9cca885868 100644 --- a/specs/isa/tri27_machine.t27 +++ b/specs/isa/tri27_machine.t27 @@ -15,6 +15,17 @@ ; describe a machine the consumer does not run; they are cited, not copied. ASCII only (L3). ; phi^2 + 1/phi^2 = 3 | TRINITY +; FIXED_UPSTREAM (gHashTag/t27#5614): gHashTag/trinity#1250 merged as +; e7919fdc91bd9ff4aa7ab91dd2a6dd4218176357 on 2026-10-02. At that newer revision: +; - FINDINGS 13: CALL pushes pc + 1, so RET resumes after the call site. +; - FINDINGS 14: loader.load packs one code word per four-byte fetch unit at +; byte 12 + i * 4 and sets pc = 3; the interleaved padding NOPs are gone. +; - FINDINGS 15: SACR is decoded as an immediate instruction; its mode survives. +; - MODULUS_NOTE: the consumer's labels now correctly call 19683 the modulus 3^9. +; Finding numbers here are one-based. The CALL stack guard and the other findings +; are not declared fixed. PINNED_REVISION, FINDINGS and every executable rule below +; still describe 976df517; this note neither repins nor updates the replay model. + module Tri27Machine; pub const KIND : str = "isa-machine";