Skip to content

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

Closed as not planned

Description

@gHashTag

Boundary

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

  1. 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.
  2. A new CR-CHAT ring needs a 16-byte id comparison: it uses the shared module instead of pasting another copy.
  3. CI runs the duplicate-bodies check: it is green and the ledger is eight lines shorter.

Requirements

  1. 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.
  2. Replace every copy site with a use of the shared module; keep behaviour identical.
  3. Reseal the touched specs and re-bless the ledger on the Railway lab.
  4. 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.
  • The ledger loses eight lines.

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 18, 2026
  2. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    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
  3. added a commit that references this issue on Oct 18, 2026
    45decd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions