Repository navigation
refactor(reasons): declare the R4 reasons in ReasonTable rows - #4934
Conversation
Every details.reason the CLI src tree and the daemon client publish now reads a ReasonTable row beside the code that classifies the failure: the daemon-client lifecycle, config, and transport tables, the fill, logs, open, record, daemon, connection, host-runtime, platform-runtime, and Limrun tables, plus the limrun runner and download tables. No value's wire spelling moves, so the error reasons page gains rows and no behavior changes. REMOTE_DAEMON_UNAVAILABLE_REASON and DAEMON_CONTENDED_REASON are dropped as exports: the table is the one place each value is spelled. The two client wire-compat consumers whose bodies now read a table row carry their new digest and rationale in the ledger, as ADR 0006 asks of an additive client-side change.
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
Nothing imports it; the reasons collector also reads tables that are not exported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
The code at e803b0b does not yet meet the R4 invariant, and all 21 checks pass. The earlier Repo Guards failure was the unused The finding from the earlier review is unchanged, because this commit only drops that one export. Several This matters because these routes still publish reasons that are missing from the generated Error reasons page, while the PR body says the batch is complete. The affected routes are a remote daemon instance change, a daemon replacement that cannot be confirmed, a macOS app-device open with a non-app surface, an invalid WebDriver plugin, a missing runtime owner, a runtime contract violation, and an unreadable daemon-record owner. The rule is: every reason property inside an Not verified here: Before merge, the remaining AppError reasons need rows, or the PR body and the issue need to name the batch that will cover them. |
|
R89 filtered to |
…n-client-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 earlier review at e803b0b found no problems. Review of 41d20b8 now finds two issues that need fixing before merge. Five Limrun runner reasons are declared in the R4 rows, but production does not publish them from those rows. For example, when a USE_IP lookup returns an invalid IPv4 value, prepareLimrunRunnerProducts passes the literal The claim "Each in-scope R4 reason is emitted through its owning ReasonTable row while retaining its published spelling" does not hold at 41d20b8 for those five reasons. The existing R89 scan skips function parameters, so it cannot see this. The changed remote-health test at daemon-client-lifecycle-remote-health.test.ts:84 expects the same Could CI is green: 21 checks, 0 not passing. Not verified here: the generator was not re-run locally, so the consistency of |
… by key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
At |
This comment has been minimized.
This comment has been minimized.
|
One docs problem remains at 555c63e, and the code change itself is otherwise fine. The earlier findings from 41d20b8 are fixed. The new error reference promises that Not verified here: |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n-client-reasons * origin/main: refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928) # Conflicts: # website/docs/docs/error-reasons.md
|
At |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 91ccbb8. The verdict and the full list are in the summary comment.
…t is raised Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
…n-client-reasons * origin/main: refactor(reasons): declare the R5 provider reasons in ReasonTable rows (#4932) # Conflicts: # website/docs/docs/error-reasons.md
This comment has been minimized.
This comment has been minimized.
|
The restore reason from the earlier review (#4934 (comment)) is fixed at 47f41cc: it now has its own ReasonTable<'close'> at https://github.com/callstack/agent-device/blob/47f41cc/src/platform-runtime-android-application-tools.ts#L28-L34 and the page lists it under close. One finding remains. The new CONNECTION_DEVICE_CONFLICT row in https://github.com/callstack/agent-device/blob/47f41cc/website/docs/docs/error-reasons.md#L540 promises details.keys, but that field is absent on reachable conflicts. Opening against a live proxy lease for SIM-REMOTE with a matching device spec and --udid SIM-OTHER reaches leasedIdentityConflict in https://github.com/callstack/agent-device/blob/47f41cc/src/cli/commands/proxy-lease-device.ts#L252. It emits the reason with requestedDevice and deviceKey, without keys. The device selector mismatch at line 321 does the same. Only the spec comparison at line 240 supplies keys. The identity classifier from both revisions was run in memory and the field is absent in both. A caller following the reference can wait for a field that never arrives and misread a device mismatch as a device-spec mismatch. Please describe both spec and device conflicts in the source row at https://github.com/callstack/agent-device/blob/47f41cc/src/cli/commands/proxy-lease-device.ts#L47, state that details.keys is present only for device-spec mismatches, and regenerate the error reference. The existing proxy-lease-device-spec.test.ts:588 already follows the live lease route. Could daemon-client own DAEMON_TRANSPORT_REASONS in a package-local transport error module? Every production reference to the table or its six spellings outside the declaration is in daemon-client, including its request, timeout and fallback classifiers. The daemon HTTP contracts already own the shared request size and protocol vocabulary, while these markers describe local client failures. The code has the one finding above. All 21 checks are green. There are no conflicts. Not verified here: pnpm typecheck and the reason-table guard were not run locally, so CI is the evidence for them, and the merge commit's conflict resolution was not diffed line by line beyond its delta contents. Nothing else blocks merge once the finding is fixed. |
…nection device conflicts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 at 8eab9f0 looks good, and the earlier findings from #4934 (comment) are fixed. The |
* 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
* 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: # test/repo-guards/runner-refusal-reason-docs.test.ts # website/docs/docs/error-reasons.md
Summary
Every R4-batch
details.reasonin the CLIsrc/tree andpackages/daemon-clientnow reads aReasonTablerow beside its classifier. Seven values these trees share with other batches wait for batch R7 (#4937):remote_instance_mismatch,daemon_retirement_unconfirmed,owner-unavailable,runtime-contract-invalid,app-device-scope,invalid_plugin,daemon-owner-unrecognized.Tables land in the module that classifies the failure: the daemon-client lifecycle and config tables, a
daemon transporttable incontracts/daemon-http.ts(the wire vocabulary client, proxy and daemon all read), and per-owner tables forfill,logs,open,record,daemon lifecycle, remote connections, the host runtime, the platform runtime, and Limrun.REMOTE_DAEMON_UNAVAILABLE_REASONandDAEMON_CONTENDED_REASONstop being exports: the row is the one spelling.Value
ReasonTabledeclarations in production sources: 40 -> 49Before / after
Validation
Head 82249b2. Locally green:
check:quick,generate:reasons,check:command-docs,test/wire-compatandcheck:daemon-wire-compat,check:layering(R89 shrinks),check:package,check:production-exports,check:doc-prose, the fullsrcunit project. No independent reviewer ran: the brief disallowed subagents, so the diff was cold-read in one pass.🤖 Generated with Claude Code