Repository navigation
refactor(reasons): declare the R6a reasons in ReasonTable rows - #4938
Conversation
This comment has been minimized.
This comment has been minimized.
|
The code in 9cce87a is ready to merge, and all 8 checks pass on that commit. The PR has merge conflicts with main, so it needs a rebase before it can merge. Not verified here: |
Migrates the 55 published error.details.reason values of the R6a packages into ReasonTable rows beside the code that classifies them, so every wire spelling is declared once and read as TABLE.member.reason: kernel timeouts, the device shell, device and web-session selection, host-kit artifact extraction, host commands, process stop and locks, host paths, script publication, request cancellation, the Swift helper cache, install-from-source, the device-selection resolver, the session event-log window, remote transfers and connections, the proxy transport, plugin manifests, and the React DevTools bridge. The React DevTools runtime no longer publishes an unknown injected-script spelling as the reason with a prose wrapper. An unknown spelling now publishes no reason, the spelling in details.runtimeReason, and a generic message; the known ones are the typed rows of REACT_DEVTOOLS_REASONS. Oversized hosts keep their line caps through type-only sibling modules, which add no module to any import closure. Regenerated website/docs/docs/error-reasons.md.
…main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9cce87a to
5b173f8
Compare
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 5b173f8. The verdict and the full list are in the summary comment.
Moves the host-command and install-source reason tables below their module's imports and puts the background-options doc block back on ExecBackgroundOptions; merges the two kernel errors imports in process-lock; renames the two private device-selection tables for the rule each covers; and drops the casts from scriptAncestryReason by comparing against the table row. already-profiling is the answer `profile start` gets while a recording is already running, which the command reports as a success result, so it is not a published error reason. It leaves REACT_DEVTOOLS_REASONS as a plain typed constant, the generated page loses its row, and the runtime failure map is keyed by the table's error rows alone. The answer the injected runtime gives is untrusted text: RuntimeFailure.reason is typed `string`, and only a row of REACT_DEVTOOLS_REASONS makes it a published `details.reason`. An undeclared spelling keeps publishing no reason and carries the raw text in `details.runtimeReason`, and the hint now says both.
|
Applied on 8679d99, one commit on top of
Checks: |
This comment has been minimized.
This comment has been minimized.
|
The earlier review at 9cce87a found nothing. At 8679d99 the two runtimeFailure threads are fixed, but one docs finding remains. CI is green: 21 checks, 0 not passing. There are no conflicts. The new reference row at website/docs/docs/error-reasons.md:249 says an unguarded shell or exec-out command was dispatched. It was not. Could react-devtools-connection.ts use a single lookup for runtime failure recognition and wording, with the existing RUNTIME_FAILURES map keyed by values from REACT_DEVTOOLS_REASONS and protected by an own-key check? Not verified here: The two threads on runtimeFailure details and RuntimeFailure.reason typing are fixed at this commit and can be resolved: #4938 (comment) and #4938 (comment). After the docs fix and regenerated page, nothing else stops the merge. |
…React DevTools reasons with one lookup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
At |
This comment has been minimized.
This comment has been minimized.
|
The The summary for That also means the claim that the R6a summaries describe every production path that emits their wire reason does not hold yet. After the fix, please re-check it against every emitter of each R6a reason, not only the Swift one. The new test in react-devtools-runtime.test.ts scans literal spellings in the injected source. It never calls Could The two resolved |
…test React DevTools reasons through the command Widen swift_cache_untrusted and eleven other summaries to cover every site that publishes their wire value. Exercise runtimeFailure through `react-devtools profile stop` for a declared and an undeclared spelling, and move the already-recording start result into react-profile-command.ts, its only consumer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed #4938 (comment) at dc941a9.
Audit of the other R6a rows. For each value I grepped the literal, the
The other rows already held at every emitter: device-selection (2), archive (7), Test. I added two command-path tests to
In
Item 4: yes, moved. Validation at dc941a9:
|
This comment has been minimized.
This comment has been minimized.
|
The earlier findings from a725f3e are fixed at dc941a9: the swift wording, the react-devtools test and the regenerated page all changed in the delta a725f3e..dc941a9 (#4938 (comment)). The code looks right, but the evidence is still pending. Not verified here: the tests and Not blocking: the new Could the connection's wording map use keys computed from The swift wording, react-devtools test and page threads no longer apply because they are fixed at dc941a9, so the author can resolve them: #4938 (comment) |
…LS_REASONS rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Evidence at
Optional items: |
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 fbf27ad has no open findings, and the evidence gap from the earlier review (#4938 (comment)) is now closed. All 21 checks pass. No conflicts are known. Nothing else must happen before merge. The approval at #4938 (comment) still stands. Not verified here: the tests, generate:reasons and typecheck were not run; they rest on the author's output and on green CI. |
…-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
…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
…android-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
…er-errors * 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
* 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
* 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: # packages/platform-harmonyos/src/app-lifecycle.ts # website/docs/docs/error-reasons.md
Summary
Declares the 55 published
error.details.reasonvalues of kernel, host-kit, host-swift, provision-kit, device-selection, session-journal, proxy, remote, plugins and react-native asReasonTablerows beside the code that classifies them, so each wire spelling is written once and every raise readsTABLE.member.reason. Owners are the CLI command that raises, or a subsystem:timeouts,device shell,device selection,web session naming,artifact extraction,host commands,process stop,process lock,host paths,script publication,request cancellation,Swift helper cache,install-from-source,remote transfer,remote connection,events,proxy,plugins,react-devtools.classifyBootFailureand values owned by other batches stay as they are.The one published-value change: the React DevTools runtime no longer publishes an unknown injected-script spelling as the reason behind a
React DevTools failed: ...sentence. An unknown spelling now publishes noreason, the raw spelling indetails.runtimeReason, and a generic message. The ten known spellings are unchanged.Value
55 literals become 22 tables and no raise-site literal in those packages.
website/docs/docs/error-reasons.mdgains 150 documented rows.Before / after
No observable change except the unknown-DevTools-spelling fallback above; wire spellings are byte-for-byte identical.
Validation
SHA 9cce87a (full lane):
pnpm lint,typecheck,build,check:layeringandcheck:fallowpass; the eager-closure (919) and reason-table guards pass; 21,558 unit tests pass, with one unrelated apple-runner preflight retry assertion that passes in isolation and for the whole project.Head dc941a9 (review fixes): typecheck, lint, affected package tests, reason-table guard and Fallow pass; CI validates it.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.