refactor(reasons): declare the durable capture outcomes in ReasonTable rows

Merged
TH
5d ago
+284-127

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, ResourceUnreattachableReason and the new DescriptorDecodeFailureReason in 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. The contracts/durable-resource entry checks its one value site with satisfies against 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

Measurebasehead
R89 untyped reason sites5853
R89 untyped values2118
Reason table rows464472

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