refactor(reasons): declare the R3 apple-runner reasons in ReasonTable rows
Merged
TH
1h ago+662+662+012345678901234567890123456789-485-485-012345678901234567890123456789
Summary
R3, part 1 of 2: packages/apple-runner. Part 2, packages/platform-apple and the macOS helper, is #4924.
- 13 tables, 41 rows, owned by
apple runnerorprepare. Each sits beside its classifier: the 13 runner codeāreason mappings (RUNNER_ERROR_CODESrows readRUNNER_ERROR_REASONS), the startup-failure vocabulary, the lost reply, and the launch, cache, budget, transport, product, sequence, and session refusals.keyboard_dismiss_unavailablestays for R7. - Published-value change:
wrapPrepareHealthFailurepublishedreason: appErr.messageand overwrote any typed reason. It now publishesprepare_rebuilt_runner_unhealthy. The message moves torebuiltFailureMessageand the inner reason torebuiltFailureReason. RunnerCommandand its wire types move to the types-onlyrunner-command-types.ts, which keepsrunner-contract.tsunder the 1,000-line cap.chore(gates): the two runner reason-docs guards now read the tables.
Value
| base 4075dd1178 | head | |
|---|---|---|
| R89 untyped values / sites | 266 / 352 | 249 / 334 |
| Reason tables / rows | 20 / 74 | 33 / 115 |
Before / after
prepare ios-runner fails after the cached runner and its rebuild both fail the health check:
- before:
details.reason: "Runner health timed out" - after:
details.reason: "prepare_rebuilt_runner_unhealthy",details.rebuiltFailureMessage: "Runner health timed out"
Every other value keeps its spelling byte for byte.
Validation
At head 494f7bb546, these pass: typecheck, lint, check:layering, check:fallow, check:runner-error-codes (Swift unchanged), generate:reasons, the apple-runner tests (988), and both runner reason-docs guards. The base Coverage run failed only on those two guards. CI owns the full gate.
š¤ Generated with Claude Code