Repository navigation
t27b: the body walks of lower.rs move to specs/tri/t27b/ast_walk.t27 (Closes #8249) - #8258
Merged
Merged
Conversation
…loses #8249) name_count, name_mentions (with its word_in), discard_count, mentions, mutated, zig_mutates, shadow_names' declaration count, is_value_stmt and zig_renders are now t27c gen-rust of specs/tri/t27b/ast_walk.t27 (gen/rust/tri/t27b/ast_walk.rs), mounted in lower.rs as `aw`. gen-rust passes only a []const u8 parameter by reference (#8102) and takes no Rust struct, so a list of nodes reaches the spec as bytes: a fixed record per node in preorder (kind, subtree end, eight text spans), then the text. `flat` in lower.rs writes them; a compile-time assert pins NodeKind's discriminants to the spec's codes. Each walk keeps its Rust signature as one line of glue. A differential of the deleted walks against the generated ones agrees on 5,600,000 random (forest, name) pairs and on all 35 node kinds. Hand Rust under cli/t27b: 96 lines deleted, 31 added, net -65. See #6198. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This was referenced Oct 9, 2026
Merged
No conflict; it moves the head onto a master whose corpus receipt the lab signs, so the lane compare has a base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-09 17:46:37 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
Merged
Merged
AGENTS.md keeps both remainder entries, #8050 then this one, re-measured with wc -l (14698 plus 1222, tests 8284). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-09 19:00:27 UTC
Summary
Seal Status
|
AGENTS.md keeps both remainder entries, #8248 then this one, re-measured with wc -l (14629 plus 1222, tests 8284). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-09 19:10:43 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
Merged
This was referenced Oct 9, 2026
…#8249) AGENTS.md keeps both remainder entries, #7876 then this one, re-measured with wc -l (14622 plus 1222, tests 8284). docs/reports/t27b_expectations.json gets the rows of the two lane specs without one: specs/tri/t27b/ast_walk.t27 passes in t27b, and specs/tri/t27b/source_text.t27 (#8252) is blocked on `type i128` (unimplemented); max_not_pass 19 -> 20 for that one blocked spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 9, 2026 19:45
Contributor
PR DashboardGenerated at: 2026-10-09 19:59:42 UTC
Summary
Seal Status
|
This was referenced Oct 9, 2026
gHashTag
disabled auto-merge
October 9, 2026 20:06
gHashTag
enabled auto-merge (squash)
October 9, 2026 20:06
13 tasks
gHashTag
pushed a commit
that referenced
this pull request
Oct 9, 2026
…7812) Master brings #8258 (lower.rs's body walks move to ast_walk.t27). Conflicts were the AGENTS.md remainder line (re-measured with wc -l) and the ledger (rows kept from both sides, max_not_pass recounted from the rows). Hand lines under cli/t27b against ab5b3b7: net -21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Oct 9, 2026
…ed (Closes #7902) Master brings #8258 (lower.rs's body walks move to ast_walk.t27). Conflicts were the AGENTS.md remainder line (re-measured with wc -l) and the ledger (rows kept from both sides, max_not_pass recounted from the rows). Hand lines under cli/t27b against ab5b3b7: net -5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Oct 9, 2026
…Closes #7909) Master brings #8258 (lower.rs's body walks move to ast_walk.t27). Conflicts were the AGENTS.md remainder line (re-measured with wc -l) and the ledger (rows kept from both sides, max_not_pass recounted from the rows). Hand lines under cli/t27b against ab5b3b7: net -7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
dmitrii-f-t27
added a commit
that referenced
this pull request
Oct 9, 2026
…ll; 12 t27b rows (#8375) Closes #8361 duplicate-bodies: has_at (specs/tri/t27b/ast_walk.t27, #8258) is the body of starts_with (source_text.t27). An import typechecks and ast_walk's 18 tests pass, but t27c gen-rust emits the call without a `use`, and cli/t27b/src/lower.rs mounts ast_walk.rs as its own module, so cli/t27b would not build. One line, has_at 2. scan: the skill read `git -C /Users/playom/t27 config --get core.hooksPath`; every worktree shares that config, so `git config --get core.hooksPath` says the same without a developer's home path. t27b-native-ratchet: rows for the 12 specs the ratchet listed as UNLISTED in run 37993522616 (t27b-native on ef75683), each as that run judged it with the reference passing: 10 pass, base/types.t27 blocked on `type [N]T`, math/constants.t27 blocked on `ExprCall(@Rem)` (both unimplemented). max_not_pass 18 -> 20, the two new blocked rows; no existing row moves.
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 #8249. Port slice of #6198 (t27b written in t27), under #6063 and #5980. It follows #8235, whose
specs/tri/t27b/type_text.t27it reuses (use tri::t27b::type_text).What moved
cli/t27b/src/lower.rswalked a fn body of the t27c AST with hand-written recursions overcompiler::Node. These walks move tospecs/tri/t27b/ast_walk.t27:name_count: uses of a name, or of a dotted path starting with it;name_mentionswith itsword_in: those uses, plus size, type, field and return-type texts that name it as a word. The occurrences followstr::match_indices: left to right, no overlap, and an empty name at every char boundary.discard_count:_ = name;statements;mentions: an identifier with that name;mutated: the reference'scollect_mutable_names;zig_mutates, with itsrooted;shadow_names;is_value_stmtandzig_renders.How the AST reaches the spec. gen-rust takes no Rust struct, and passes only a
[]const u8parameter by reference. Any other slice it passes by value (#8102), and a walk calls its helpers many times. So a list of nodes reaches the spec as two byte texts:flatinlower.rswrites them in 17 lines. A compile-timeassert!pinsNodeKind's discriminants to the spec'sK_codes, so a reorderedNodeKindstops the build instead of misreading a kind. A node's children run from its index + 1 to its subtree end, each child's own end naming the next. Every walk here is a count or ananyover the whole tree, so the order of the visit does not matter.t27c gen-rustwritesgen/rust/tri/t27b/ast_walk.rs, mounted inlower.rsasaw. Each walk keeps its Rust signature, with a one-line body:let (a, t) = flat(ns); aw::....This byte form is how later ports can reach the collectors that remain, such as
array_locals,calls_in,ref_mutable_namesandstrength_reduced.Lines
cli/t27b/src/lower.rs)cli/t27b/src/lower.rs, the only foreign file:flat, the assert, the mount, nine bodies)cli/t27b/lower.rs8021 -> 7956)gen/rust/tri/t27b/ast_walk.rs).t27(specs/tri/t27b/ast_walk.t27).trinity/seals/t27b_T27bAstWalk.json, closure:type_text.t27)The AGENTS.md remainder line goes from 14694 plus 1222 (15916) to 14629 plus 1222 (15851), with tests unchanged at 8284 (
wc -l, after merging master 3ac8bef from master's side, which includes #8252).Gate
Both gates ran with master's
gen/c/policy/own_language.c(with #8236's net rule):check_budgetongit diff --numstat --no-renames: exit 0. That is 31 added and 96 deleted foreign lines, all in one file.check_allwithorigin/master:tools/policy/foreign-exceptions.txt: exit 0.Evidence that nothing changed
Oracle. The spec's tests build small trees by hand. Their expected values are what the deleted Rust returns on the same trees.
Differential (t27c lab, a throwaway program, not committed). It used a copy of master's
NodeKindandNode, master's walks copied verbatim, andflatplus the generated walks, with debug assertions and overflow checks.x,_,xyz.w,x.push,*,undefinedand the empty name. The ops included=,+=and&. The texts included[N]u8,xNandé N.is_value_stmtandzig_renderswere also checked on all 35 kinds.Every result is identical.
t27c test-report. 18 of 18 pass, 0 vacuous.tri mutate spec. 272 mutants: 257 killed, 0 survived, 12 hung and 3 unviable.Seal.
t27c seal --save, then--verify: all hashes MATCH.cargo test --release -p t27bon the t27c lab (x86_64), at the head f0610d9 (master 3ac8bef merged in): 138 passed, 0 failed, no warnings.Corpus receipts (#7686)
t27b-receipt-f0610d9cuntil it ran. https://t27b-lab-production.up.railway.app/runs/f0610d9c056523bf6c390dc0ec23e1f8c216aeaf.receipt.json was requested with a fresh challenge.On the t27b lab, from
/work/t27, with/work/t27c-master corpus-receipt compare BASE HEAD --challenge <mine> --challenge-head <mine>:Verdict: IMPROVED_ONLY (exit 3). The only lane line is the new spec itself, which t27b passes (18 of 18). Every other file keeps its verdict and its
t27b asmdigest. A strict EQUIVALENT (exit 0) is not possible for a port that adds a spec underspecs/.Ledger. The final head 26e9194 merged master 95ae4bc in from master's side. It added the rows of the lane's two specs that had none:
ast_walk.t27(pass), andsource_text.t27from #8252 (blocked ontype i128, unimplemented).max_not_passwent from 19 to 20 for that one blocked spec.cargo test --release -p t27bat 26e9194: 138 passed, 0 failed, no warnings.gen-rust gaps
No new one is filed. #8102 (a read-only slice parameter becomes an owned
Vec) is why the u32 fields of a record are read from bytes. If #8102 is fixed, the records could become[]const u32.🤖 Generated with Claude Code