Repository navigation
refactor(reasons): declare the R3 platform-apple reasons in ReasonTable rows - #4924
Conversation
…rows Every `details.reason` platform-apple publishes now reads a ReasonTable row beside the code that classifies it: app resolution, settings, open and launch confirmation, close, snapshot, snapshot capture, screenshot, logs, audit, orientation, and the foldable panel tables. The macOS helper's values move into one `macos helper` table: the five app-surface refusals and the seven failures only the Swift helper wrote (window-not-found, front-window-capture-excluded, front-window-not-shareable, context-menu-not-observed, window-list-unreadable, event_creation_failed, missing_button). Swift now spells the failures through a HelperFailureReason enum, and contracts/fixtures/macos-native-helper-outcomes.json pins both languages to the same list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
|
The code in c27329c looks ready. Not blocking, and fine to take or leave: the generator capitalizes only the first letter of an owner, so "macos helper" renders as "Macos helper" in error-reasons.md, and the macOS helper refusal set in helper.ts is split from the failures by row position instead of by separate tables. The two cancelled Body rules runs were superseded PR-body runs, and one other check is still in progress. None of these jobs exercises the changed source, Swift or docs paths. Not verified here: vitest, swift test and generate:reasons were not run, and the 19 tables, 40 rows and R89 numbers were not recounted. Page freshness and duplicate values rely on the reason-tables guard in CI. Before merge, wait for Body rules to rerun green and the remaining check to finish. #4922 also edits error-reasons.md, so whichever PR merges second needs a rebase and generate:reasons. |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
Summary
R3, part 2 of 2:
packages/platform-appleand the macOS helper. Part 1, apple-runner, is #4922.SIMCTL_SCREENSHOT_TIMEOUT_REASONbecome table members.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.alert-*,app-device-scope,request_canceled, and the runtime facts.Value
Before / after
No observable change. Every value keeps its spelling byte for byte, and the macOS helper JSON is unchanged.
Validation
Head c27329c 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 checkCI owns the full gate.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.