You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spec(port): share the duplicated CR-CHAT helpers blessed by #10098 #10159
Touches only .t27 specs under specs/port/trios/ (the CR-CHAT-03/04/07 ring specs, three trios lib specs, two new shared modules), the 29 matching .trinity/seals/*.json files and tools/duplicate_bodies_baseline.txt. No Rust, no gen/, no tooling code.
Background: PR #10098 folded 66 port PRs into one merge and blessed 12 duplicate-body groups into the ledger. Eight of them are plain copies of the same small helper (burst_ids_equal x13, emission_ids_equal x10, burst_id_zero x7, bytes_equal x5, all_zero_bytes x4, dest_zero x3, sched_sqrt x3, approx_sqrt x2). The other four (id_seen_before, obs_seen_before, dest_count, member_contains) read fields of ring-local record structs or use different integer widths, so they cannot be shared without generics or a type change.
Scenarios
A reader fixes a bug in a byte-equality helper: today they must find and patch 13 copies; after this change they patch one module.
A new CR-CHAT ring needs a 16-byte id comparison: it uses the shared module instead of pasting another copy.
CI runs the duplicate-bodies check: it is green and the ledger is eight lines shorter.
Requirements
Add specs/port/trios/crates/trios-chat/common/helpers.t27 (ids16_equal, ids32_equal, zero_id16, bytes_equal, all_zero_bytes, approx_sqrt) and specs/port/trios/common/newton_sqrt.t27, each with tests that execute asserts.
Replace every copy site with a use of the shared module; keep behaviour identical.
Reseal the touched specs and re-bless the ledger on the Railway lab.
State plainly in the PR that the four record-bound groups remain.
Criteria
Every touched spec passes the t27c test report with 0 failures and 0 vacuous passes.
tools/check_seal_coverage.py reports OK.
tools/dupe_scan.py reports no new duplicate body and no known group grown, after the re-bless.
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
Activity
github-actions commentedon Oct 18, 2026
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
exit 0, or a backticked commandspec(port): share the duplicated CR-CHAT helpers blessed by #10098 (C…