refactor(reasons): declare the R3 platform-apple reasons in ReasonTable rows
Merged
TH
17h ago+393+393+012345678901234567890123456789-130-130-012345678901234567890123456789
Summary
R3, part 2 of 2: packages/platform-apple and the macOS helper. Part 1, apple-runner, is #4922.
- 19 tables, 40 rows. Each sits beside its classifier: app resolution, settings, open and launch confirmation, close, snapshot, snapshot capture, screenshot, logs, audit, orientation, and the foldable panels. Constants such as
SIMCTL_SCREENSHOT_TIMEOUT_REASONbecome table members. - The macOS helper's 5 refusals and its 7 native-only failures (
window-not-found,front-window-*,context-menu-not-observed,window-list-unreadable,event_creation_failed,missing_button) now share onemacos helpertable. Swift spells the failures through a newHelperFailureReasonenum.macos-native-helper-outcomes.jsongainsfailureReasons, and the Swift and TS tests both hold to it. - No Swift generator: the fixture already pins both sides with a small test in each language.
- Skipped as R7:
alert-*,app-device-scope,request_canceled, and the runtime facts.
Value
| base | head | |
|---|---|---|
| R89 untyped values / sites | 266 / 352 | 248 / 334 |
| Reason tables / rows | 20 / 74 | 39 / 114 |
Before / after
No observable change. Every value keeps its spelling byte for byte, and the macOS helper JSON is unchanged.
Validation
Head c27329ccdd passes:
pnpm typecheck,pnpm lintcheck:layering,check:fallow,check:production-exportsgenerate:reasons, with the page committedvitest run packages/platform-apple test/repo-guards/reason-tables.test.ts: 1756 passedswift test --filter BackgroundInteractionTestsinapple/macos-helper: 10 passed, including the fixture check
CI owns the full gate.
🤖 Generated with Claude Code

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