Repository navigation
fix(ci): Duplicate Body Ratchet green on master - #5501
Merged
Merged
Conversation
Eleven groups were in no ledger on master 756bcff. Scanner. tools/dupe_scan.py now reads the lexical forms t27c has: a declaration ending in ';' no longer borrows the next function's body (digest_for x8 and githubCiDeps_checkRuns_impl x5 were that), comments and string literals are masked, ';' at column 1 and '#' are line comments, and a single quote ends at the newline as the lexer ends it. The prototype, comment and literal repair comes from #5473. The quote and ';' rules are new: an apostrophe in "; the Queen's ..." opened a literal that hid three bodies in specs/queen/views.t27 and specs/tools/catalog.t27. Eleven self-test shapes pass; the #5473 lexer fails the two new ones. forwardPass x3: one empty-result literal in specs/hslm/forward_pass.t27 is shared (from #5473). Both seal files naming the spec are resealed with the t27c built from this tree; all four gen hashes equal the #5473 seals. rng_int_range x2: the gen_fuzz port had two 'return undefined;' stubs. They are now a xorshift64 generator (shifts and xors only: t27c emits u64 '+' and '*' without wrapping in Zig and Rust), and the port has five tests that can fail. Zig: 8/8 pass; five mutants are each caught. Seven copies across two files are ledgered, as #4497 did, because 'use a::b;' still generates no import (#4610): bytes_eq, session_status_str, led_config, validate_led_config, startup_config, update_oscillator_chain, shift_ir. Three rows whose groups no longer exist are dropped: generate_all, next, is_orphan. Refs #5497 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This was referenced Oct 2, 2026
dmitrii-f-t27
added a commit
that referenced
this pull request
Oct 2, 2026
Renaming OscillatorState in uart_echo_top.t27 makes its update_oscillator_chain body name UartOscillatorState, so the two bodies are no longer copies. The duplicate-body ratchet fails when a known group disappears and its row stays, so the row (update_oscillator_chain 2, added in #5501) leaves the ledger in this change. Refs #5497 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.
What
Duplicate Body Ratchetreported 11 unledgered groups on master756bcffc. After this PR,python3 tools/dupe_scan.pypasses on this branch and--self-testpasses 11 shapes.digest_forx8,githubCiDeps_checkRuns_implx5;borrowed the next bodyforwardPassx3specs/hslm/forward_pass.t27rng_int_rangex2return undefined;stubs in thegen_fuzzportbytes_eq,session_status_str,led_config,validate_led_config,startup_config,update_oscillator_chain,shift_ir(x2 each)use a::b;still generates no import (#4610), as in #4497Scanner
The prototype/comment/literal repair comes from #5473. Two rules are new, both taken from
bootstrap/src/compiler.rs:;followed by a space or tab at column 1, and#, are line comments.Without them, an apostrophe in
; the Queen's view ...opened a "literal" that ran up to forty lines and hid three bodies inspecs/queen/views.t27andspecs/tools/catalog.t27. Two new self-test shapes cover this, and the #5473 lexer fails both. On today's corpus the new scanner finds 4691 bodies, against 4689 for the #5473 version.gen_fuzz
The Zig original uses
std.Random.DefaultPrng(xoshiro256++), whose additions wrap.t27cemitsu64+and*without wrapping in Zig and Rust, so the port uses xorshift64 (13/7/17): shifts and xors, nothing to overflow. It keeps the contract (deterministic per seed, one byte per draw, inclusive integer range), not the original stream.t27c test-report(Zig 0.16.0): 8/8 pass. Five new tests replaceassert(x >= 0 || x < 0).return min(1), off-by-one span (1), the old stubs (2), state never updated (3).Seals
ForwardPass.jsonandhslm_ForwardPass.jsonwere vacuous (gen_hash=noneon all four). Resealed with thet27cbuilt from this tree;t27c seal --verifyreports all hashes MATCH, and every hash equals the #5473 seals produced on another machine.Ledger diff
+7rows for the cross-file copies above,-3rows whose groups no longer exist (generate_all,next,is_orphan). No existing group grows.Unchanged elsewhere
Against master:
check_duplicate_declarationspasses,check_specs_generatereports the same 15 specs, assertionless counts andtri types ratchetare identical.specs/hslm/forward_pass.t27is still listed as a parse failure indocs/reports/suite_expectations.json, although it parses on master too; that ledger is handled with the rest of the corpus ratchet.Refs #5497
🤖 Generated with Claude Code