refactor(reasons): declare the R6b reasons in ReasonTable rows

TH
31m ago
+745-252

Summary

Declares the 59 published error.details.reason values of the R6b packages in ReasonTable rows beside the code that classifies them, so every wire spelling is declared once, documented by its row comment, and read as TABLE.member.reason.

Three sites published prose or an internal code as their reason. They now publish a typed value, and the old text moved to another details key. These are published-value changes:

  • PNG / JPEG screenshot decode: png_decode_failed / jpeg_decode_failed, decoder message in details.decoderError.
  • find on a sparse capture, on both the read-only and the daemon (click, fill, focus, type) routes: find_snapshot_unreadable, with the verdict prose in details.verdictReason and its code in details.verdictReasonCode. Both routes build this from one capture-kit helper, sparseFindRefusal.
  • Snapshot-router cancelled rethrow: request_canceled always, the value its details already carried; the internal abort-signal code never reached callers.

Value

59 values / 66 sites became table rows. Tables went 18 -> 43 and the generated page 76 -> 138 documented rows.

Before / after

Before: literals and one-off consts, three prose reasons, one undeclared router value.
After: one row per value, each read at its raise sites; the router reuses the kernel's exported REQUEST_CANCELED_REASON.

Validation

pnpm build, check:quick, check:layering (R89: 313 sites in 165 files against 352 in 185 at merge-base), generate:reasons committed, reason-table and repo guards, and the affected suites.

🤖 Generated with Claude Code


Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.