Skip to content

spec(port): share the duplicated CR-CHAT helpers blessed by #10098 (Closes #10159) - #10161

Merged
gHashTag merged 1 commit into
masterfrom
claude/kind-hofstadter-d4338e
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/kind-hofstadter-d4338e

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

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 and use-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), replacing sched_sqrt, ternary_sqrt_newton and sqrt_newton32 in the three trios lib specs.
  • 29 CR-CHAT-03/04/07 ring specs and 3 lib specs: local copies deleted, calls renamed, use line added. 32 files, +200 / -689 lines.
  • 29 seals regenerated; ledger re-blessed.
group copies now
burst_ids_equal, emission_ids_equal 13, 10 ids16_equal / ids32_equal
burst_id_zero, dest_zero 7, 3 zero_id16
bytes_equal, all_zero_bytes 5, 4 shared module
sched_sqrt 3 newton_sqrt
approx_sqrt 2 shared module

Deviation from the brief: 4 groups stay, ledger loses 8 lines, not 12

id_seen_before, obs_seen_before, dest_count and member_contains are 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_before and cover_traffic_size_distribution_guard::obs_seen_before now normalize to the same body, so the id_seen_before ledger entry went from 2 to 2,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-report on all 34 touched/new specs: 0 failures, 0 vacuous passes.
  • t27c seal <spec> --save on the 29 sealed specs, rc=0 each; tools/check_seal_coverage.py reports OK (2507 seals, 2385 hold, 122 known-broken, all in the baseline).
  • tools/dupe_scan.py --self-test ok; after --bless, the check reports no new duplicate body and no group grown.
  • Nothing was built or run on the Mac.

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

…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>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 02:33:53 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3b53d48ddb52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec(port): share the duplicated CR-CHAT helpers blessed by #10098

1 participant