Skip to content

[spec] CR-CHAT ring files use the shared trios-chat helpers instead of local copies #10841

Closed

Description

@gHashTag

Goal

The CR-CHAT ring files landed by #10175 drop their local copies of the shared byte helpers (ids32_equal, ids16_equal, zero_id16, bytes_equal, all_zero_bytes, approx_sqrt) and use port::trios::crates::trios-chat::common::helpers instead (#10161), as the #10175 review note asked.

Why this matters

Nineteen of the copies are byte-identical (dupe_scan flags them); the DRY rule says reuse the one that exists.

Source of truth

The sixteen ring files under specs/port/trios/crates/trios-chat/rings/CR-CHAT-03/src/ and CR-CHAT-04/src/ named in PR #10795; the helpers in specs/port/trios/crates/trios-chat/common/helpers.t27.

Deliverable

PR #10795.

Done when

The ring files carry no local copy of a shared helper; their tests pass unchanged; seals re-saved; required checks green.

How to verify

python3 -I tools/dupe_scan.py

Risks

None beyond the refactor; behaviour is unchanged by construction (identical bodies).

Links (issue, PR, ADR)

PR #10795, PR #10175, #10161; trackers #8883 and #8884.

User Scenarios

  • Given the CR-CHAT ring files contain local copies of shared byte helpers, when the refactor is applied, then each ring file uses use port::trios::crates::trios-chat::common::helpers instead of its own copy.
  • Given the shared helpers exist in specs/port/trios/crates/trios-chat/common/helpers.t27, when the ring files are updated, then python3 -I tools/dupe_scan.py reports zero byte-identical duplicates for those helpers.

Requirements

  • FR-001: Each of the sixteen CR-CHAT ring files MUST remove local definitions of ids32_equal, ids16_equal, zero_id16, bytes_equal, all_zero_bytes, and approx_sqrt.
  • FR-002: Each ring file MUST import the shared helpers via use port::trios::crates::trios-chat::common::helpers.
  • FR-003: The behavioural semantics of every ring file MUST remain unchanged after the refactor.
  • FR-004: All existing tests for the CR-CHAT rings MUST pass without modification.
  • FR-005: Seal files MUST be re-saved after the changes.

Success Criteria

  • python3 -I tools/dupe_scan.py exits with exit 0 and shows no duplicates for the six helper functions across the CR-CHAT ring files.
  • The test suite for specs/port/trios/crates/trios-chat/rings/CR-CHAT-03/ and CR-CHAT-04/ passes (16 test targets).
  • Seal files for all sixteen ring files are updated and committed.

Boundary

  • specs/port/trios/crates/trios-chat/common/helpers.t27
  • tools/dupe_scan.py

Activity

  1. added a commit that references this issue on Oct 19, 2026
    ad7df53
  2. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
  3. github-actions commented on Oct 19, 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: ## Boundary -- list every file this task may touch, one per line (- specs/x.t27); without it the Queen reserves nothing and no bee can take the issue
    • missing: ## User Scenarios -- at least one Given/When/Then scenario
    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  4. added a commit that references this issue on Oct 19, 2026
    2fc8ea4
  5. removed
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions