Repository navigation
refactor(reasons): declare the R3 apple-runner reasons in ReasonTable rows - #4922
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on ca33ea9. The verdict and the full list are in the summary comment.
|
Fixed the Fallow audit failure at |
Every `details.reason` the Apple runner host publishes now reads a ReasonTable row owned by `apple runner` (or `prepare`) beside the code that classifies it: the 13 runner code mappings in RUNNER_ERROR_CODES, the startup-failure vocabulary, the lost reply, and the launch, cache, budget, transport, product, sequence, and session refusals. `wrapPrepareHealthFailure` published the error message as the reason and overwrote any typed reason. It now publishes `prepare_rebuilt_runner_unhealthy`, with the message in `rebuiltFailureMessage` and the inner reason in `rebuiltFailureReason`. The RunnerCommand wire types move to runner-command-types.ts so runner-contract.ts stays under the file-line cap; the module is types only, so no import closure changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RUNNER_STARTUP_FAILURE_REASONS is now a ReasonTable, so the startup-reason docs guard reads it with collectReasonTables, the reader the error reasons page uses, instead of its own array parser. RUNNER_ERROR_CODES rows now read `RUNNER_ERROR_REASONS.member.reason`, so the refusal-docs guard resolves that reference to the row in the same file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
910dfe2 to
c332f7b
Compare
This comment has been minimized.
This comment has been minimized.
|
The code in c332f7b is ready. The renames keep every published reason spelling unchanged, and the only new value is the declared prepare_rebuilt_runner_unhealthy reason on the prepare failure path. CI shows all 22 checks passing at this commit, so nothing else must happen before merge. Not verified here: typecheck, tests, generate:reasons and the guards were not run locally, and the ReasonTable owner union including prepare was confirmed only through the passing typecheck in CI. No live device run was needed, since no dispatch, capture or lifecycle behavior changes. Not blocking, and fine to take or leave: the rebuilt-health failure in runner-lifecycle-prepare-artifact.test.ts has no typed reason, so the rebuiltFailureReason branch in runner-lifecycle.ts is never exercised; the row comment and generated error-reasons.md name rebuiltFailureMessage but not rebuiltFailureReason; and runner-contract.ts both imports and re-exports the four moved types, which leaves two spellings of one symbol in the package. The two earlier inline threads no longer apply at this commit, so they can be resolved: #4922 (comment) (the startup reasons test now reads the tables through collectReasonTables) and #4922 (comment) (the refusal reasons test now resolves TABLE.member.reason, with a fixture for R.busy.reason). |
…-reasons * origin/main: docs(commands): generate blocks for every public command and halve hand-written prose (#4919) fix(depgraph): budget the blast-radius query, not the whole-tree scan (#4920) refactor: remove dead exports and stale fallow exemptions (#4931) refactor(reasons): declare the R6a reasons in ReasonTable rows (#4938) # Conflicts: # website/docs/docs/error-reasons.md
This comment has been minimized.
This comment has been minimized.
|
The code at a0052db looks correct. The PR-owned code is identical to c332f7b, which the earlier clean review covered, and the merge changed nothing there. The two earlier resolved threads are benign for the same reason: #4922 (comment). CI is green: 21 checks, none failing. Not verified here: Not blocking: Could the legacy refusal-doc guard leave named ReasonTable row parsing with |
…ollector Build the macOS product repair reasons from their reason rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Head 9d6a695. On the previous head a0052db, |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 9d6a695. The verdict and the full list are in the summary comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
This PR is ready at 23117ce. Both items from the earlier review (#4922 (comment)) are fixed: the The thread #4922 (comment) no longer applies: All 21 checks pass. The PR has merge conflicts with main, and they must be resolved before merge. Not verified here: the guard tests, |
This comment has been minimized.
This comment has been minimized.
|
The R3 apple-runner reason rows look correct at a20a328, and the earlier review at 23117ce still holds. Required evidence is satisfied. All 21 checks pass, and there are no conflicts. Not verified here: the docs and guard tests were not re-run locally (CI and the empty apple-runner delta were used instead), and the android and provider upstream rows were not diffed because they came from main. Nothing remains before merge. Not blocking, and fine to take or leave: runner-error-classification.ts:355 repeats runner_forwarding_unavailable as both the rule label and the details.reason predicate, while the producer in runner-transport.ts:24 gets the same value from RUNNER_TRANSPORT_REASONS.forwardingUnavailable. The copies agree today, so this is only duplication. One shared row could feed the emitted reason, the predicate and the label. Could the HTTP forwarding failure marker live in the existing RUNNER_EXCHANGE_REASONS table in runner-error-classification.ts, which already owns the policy for it and is already imported by runner-transport.ts? |
… its rule and its producer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Adopted at |
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.
|
The code in 3fbf6c7 looks good, and the evidence gap from the earlier review is now closed. All 21 checks pass. No further changes are needed before merge. Not verified here: tests were not run locally; this review relies on the passing checks and the diff. |
* origin/main: feat(contracts): allow third-party snapshot producers (#4905) refactor(reasons): declare the R3 apple-runner reasons in ReasonTable rows (#4922) refactor(reasons): declare the R4 reasons in ReasonTable rows (#4934) refactor(snapshot): one shared model for occluding system surfaces (#4956) # Conflicts: # website/docs/docs/error-reasons.md
Summary
R3, part 1 of 2:
packages/apple-runner. Part 2,packages/platform-appleand the macOS helper, is #4924.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.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
Before / after
prepare ios-runnerfails after the cached runner and its rebuild both fail the health check:details.reason: "Runner health timed out"details.reason: "prepare_rebuilt_runner_unhealthy",details.rebuiltFailureMessage: "Runner health timed out"Every other value keeps its spelling byte for byte.
Validation
At head 494f7bb, 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