Repository navigation
spec(port): share the duplicated CR-CHAT helpers blessed by #10098 (Closes #10159) - #10161
Merged
Merged
Conversation
…loses #10159) Move the eight copied helper groups into two shared modules and `use` them from every copy site: - trios-chat/common/helpers.t27: ids16_equal, ids32_equal, zero_id16, bytes_equal, all_zero_bytes, approx_sqrt - trios/common/newton_sqrt.t27: newton_sqrt (was sched_sqrt, ternary_sqrt_newton, sqrt_newton32) 29 CR-CHAT specs resealed. Ledger: eight lines dropped. The four record-bound groups (id_seen_before, obs_seen_before, dest_count, member_contains) stay: they read fields of ring-local structs or differ in integer width, and t27 has no generics to share them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 02:33
Contributor
This was referenced Oct 18, 2026
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 #10159
What
PR #10098 blessed 12 duplicate-body groups into
tools/duplicate_bodies_baseline.txt. This PR removes the eight that are plain copies by moving the helper into one shared module anduse-ing it from every copy site.specs/port/trios/crates/trios-chat/common/helpers.t27:ids16_equal,ids32_equal,zero_id16,bytes_equal,all_zero_bytes,approx_sqrt(6 tests, all executing asserts).specs/port/trios/common/newton_sqrt.t27:newton_sqrt(1 test), replacingsched_sqrt,ternary_sqrt_newtonandsqrt_newton32in the three trios lib specs.useline added. 32 files, +200 / -689 lines.ids16_equal/ids32_equalzero_id16newton_sqrtDeviation from the brief: 4 groups stay, ledger loses 8 lines, not 12
id_seen_before,obs_seen_before,dest_countandmember_containsare scans over ring-local record structs (different struct types per ring) or differ in integer width (usize vs u64). t27 has no generics, so sharing them would mean changing the port types, which is out of scope here.One side effect: with the equality helpers unified,
padding_class_transition_entropy_guard::id_seen_beforeandcover_traffic_size_distribution_guard::obs_seen_beforenow normalize to the same body, so theid_seen_beforeledger entry went from2to2,2. This is the same class of record-bound scan, not new duplication. A follow-up (generics or a shared id-array scan) would remove all four.Verified on the Railway lab
t27c test-reporton all 34 touched/new specs: 0 failures, 0 vacuous passes.t27c seal <spec> --saveon the 29 sealed specs, rc=0 each;tools/check_seal_coverage.pyreports OK (2507 seals, 2385 hold, 122 known-broken, all in the baseline).tools/dupe_scan.py --self-testok; after--bless, the check reports no new duplicate body and no group grown.Not run:
tri seals twins/sync-twins(the lab binary has no such subcommand); the seal coverage gate passes without it.🤖 Generated with Claude Code