refactor(reasons): declare the durable capture outcomes in ReasonTable rows
Summary
Second R7 PR for #4937 (the first is #4976). It declares the durable cleanup and reattach outcome family as DURABLE_RESOURCE_REASONS rows: ownership-fence-lost, owner-unavailable, transport-failed, cleanup-unconfirmed, manual-recovery-required, descriptor-invalid, descriptor-version-unsupported and transport-not-reattachable.
CleanupPendingReason,ResourceUnreattachableReasonand the newDescriptorDecodeFailureReasonin contracts derive from the rows.- Every runtime, recovery, admission-ledger and perf-host site reads the table, and so does the gateway's
owner-unavailable. The summaries cover every producer. - Home:
kernel/errors. The gateway and the capture admission ledger load no contracts module in common. Thecontracts/durable-resourceentry checks its one value site withsatisfiesagainst the row instead of loading kernel errors.
This PR touches the same region of kernel/errors.ts as #4976, so whichever lands second needs a rebase.
Value
| Measure | base | head |
|---|---|---|
| R89 untyped reason sites | 58 | 53 |
| R89 untyped values | 21 | 18 |
| Reason table rows | 464 | 472 |
Before / after
No observable change. Wire spellings stay byte-identical.
Validation
Head d1848c5c28: typecheck, oxlint, format, generate:reasons, the reason-table guard, the eager-closure gate and wire-compat pass. fallow audit reports 0 dead code and 0 complexity; its 4 warn-level clone groups already existed in the touched files. 3,305 affected tests pass.
š¤ Generated with Claude Code