Skip to content

PROTO_trust-record-service-unreachable-exhausted-tails #237

Description

@flyingrobots

Migrated from Method backlog

GitHub Issues are now the live work tracker. Repository docs remain Method evidence.

Field Value
Source backlog docs/method/backlog/bad-code/OWN_trust-record-service-unreachable-exhausted-tails.md
Archived source docs/archive/backlog/github-issue-migration-2026-06-01/docs/method/backlog/bad-code/OWN_trust-record-service-unreachable-exhausted-tails.md
Original lane bad-code
Original id OWN_trust-record-service-unreachable-exhausted-tails
Original legend OWN
Original feature merge-strands-worldlines
Original release home v19.0.0

Original backlog card

PROTO_trust-record-service-unreachable-exhausted-tails

What stinks

src/domain/trust/TrustRecordService.js still ends both bounded retry loops with fallback throws:

  • appendRecordWithRetry() line 280
  • _persistRecord() line 407

Both sit after loops that already either return, throw on exhaustion, or throw on real CAS conflict.

Why it matters

  • Coverage time gets wasted chasing branches that the current control flow cannot honestly reach.
  • The extra throws suggest uncertainty about the function contracts even though the loops are already total.
  • Dead tails make it harder to tell whether a retry policy is deliberate or just defensive residue.

Suggested direction

  • Delete the unreachable tail throws, or
  • replace them with explicit assertions documenting why the code should be impossible to reach.

Evidence

  • After the cycle 0010 trust coverage tranche, TrustRecordService.js was reduced to exactly these two remaining uncovered lines while all reachable retry, CAS conflict, signature, read, and verification paths were covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimePrimary work area: runtime.priority:laterDeferred or speculative work.status:availableOpen and available for prioritization; not blocked or actively in progress.type:debtDebt, rot, or structural risk.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions