Skip to content

refactor(reasons): declare the daemon reasons in ReasonTable rows - #4936

Merged
thymikee merged 18 commits into
mainfrom
t3/daemon-typed-reasons
Nov 22, 2026
Merged

thymikee merged 18 commits into
mainfrom
t3/daemon-typed-reasons

Conversation

@thymikee

@thymikee thymikee commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Declares the R1 daemon reasons (51 values) in ReasonTable rows beside their classifiers. That adds 36 tables, and daemon_shutting_down joins DAEMON_LIFECYCLE_REASONS. The imported constants DAEMON_SHUTTING_DOWN_REASON, BOUNDED_COMPOSITE_RESOURCE_UNSUPPORTED_REASON and ALERT_WAIT_WINDOW_TOO_LONG_REASON become rows, and their readers switch to them. The device-claim conflict union now comes from its table.

Published-value change (prose reasons): the sparse-verdict refusals used to publish the runner's message as reason. Now:

The message moves to details.verdictReason and the code to details.verdictReasonCode. FIND_READ_REASONS lives in capture-kit/snapshot-quality-verdict.ts, declared byte-identically in #4930. Merge #4930 first so both find paths switch together.

Value

before (d6767e0) after
R89 values / sites (repo) 248 / 334 212 / 284
R89 values / sites (daemon) 42 / 57 6 / 7 (all R7)
Reason tables / rows 39 / 114 75 / 167

Before / after

Only the two prose reasons change, as listed above. Every other spelling is byte-for-byte unchanged.

Validation

  • pnpm typecheck passes.
  • pnpm generate:reasons: page regenerated and committed.
  • pnpm check:affected --run --head 478859bce8: all 11 runnable checks passed (exactCommit=true). Wire ledger re-pins handleArtifactDownload (value unchanged).

🤖 Generated with Claude Code


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

View guided diff Turn on auto-fix

thymikee and others added 2 commits November 21, 2026 22:12
Every error.details.reason the daemon raises now reads a ReasonTable row
declared beside the code that classifies the failure. Wire spellings are
unchanged except the two sparse-verdict refusals, which published the
runner's prose as the reason: find now answers find_snapshot_unreadable
and react-native dismiss-overlay answers overlay_snapshot_unreadable,
with the prose in details.verdictReason and the code in
details.verdictReasonCode.

The imported constants DAEMON_SHUTTING_DOWN_REASON,
BOUNDED_COMPOSITE_RESOURCE_UNSUPPORTED_REASON and
ALERT_WAIT_WINDOW_TOO_LONG_REASON become table rows, and the
device-claim conflict union derives from its table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in the artifact download digest

The reason-docs guard read DeviceClaimConflictReason as a literal union;
the union now derives from DEVICE_CLAIM_CONFLICT_REASONS, so the guard
reads that table's rows and the unused union extractor goes. The
artifact download handler reads artifact_size_mismatch from a table row,
so its wire digest moves while the published value stays the same; the
existing ack carries the new digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.51 MB 6.51 MB +3.2 kB
Package (unpacked) 6.51 MB 6.51 MB +3.2 kB
Package (download) 1.98 MB 1.98 MB +1.1 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 17.5 ms 19.4 ms +2.0 ms
CLI --help 37.6 ms 41.0 ms +3.5 ms

thymikee added a commit that referenced this pull request Nov 21, 2026
…here both find paths load it

The daemon find path (#4936) cannot import command-runtime, so the row lives in
capture-kit/snapshot-quality-verdict.ts, byte-identical to #4936's declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

#4930 now declares FIND_READ_REASONS in capture-kit/src/snapshot-quality-verdict.ts byte-identically to this PR, so the two merge in either order with one declaration. overlay_snapshot_unreadable for react-native dismiss-overlay is kept as its own value.

thymikee added a commit that referenced this pull request Nov 21, 2026
…here both find paths load it

The daemon find path (#4936) cannot import command-runtime, so the row lives in
capture-kit/snapshot-quality-verdict.ts, byte-identical to #4936's declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

@apex-sentinel-staging note The command-runtime find site (packages/command-runtime/src/commands/interaction/runtime/selector-read-utils.ts) is migrated in #4930, the R6b batch of this same migration: it publishes the same find_snapshot_unreadable value with the runner text under details.verdictReason and details.verdictReasonCode, declared byte-identically in capture-kit/src/snapshot-quality-verdict.ts. Changing that file here would conflict with #4930. Merging #4930 before this PR closes the window in which only the daemon path carries the new value.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 478859b. The code looks correct, and the two cancelled Body rules runs most likely come from a PR body edit that replaced an earlier run, since that job lints only the PR body. The remaining pending check is an external request-changes on the command-runtime find site, not a failing test. Not blocking, and can be taken or left: find ... exists|wait|get text still answers prose from sparseSelectorSnapshotError in selector-read-utils.ts while find ... click|fill answers find_snapshot_unreadable, so land #4930 before or together with this PR and reword the PR body to say read-only find follows in #4930; ALERT_WAIT_REASONS.windowTooLong in snapshot-alert.ts and BOUNDED_COMPOSITE_REASONS.resourceUnsupported in kernel errors.ts carry both a JSDoc block and a row comment, and only the row comment reaches the generated page; and the sparse test in find.test.ts could also assert verdictReasonCode: 'sparse-tree'. Re-run the cancelled Body rules check before merge. Not verified here: the byte-identical FIND_READ_REASONS declaration in #4930, typecheck, generate:reasons and the reason-table guard, and reason spellings outside the reason: '...' and X_REASONS.key.reason shapes.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 21, 2026
thymikee and others added 2 commits November 22, 2026 08:12
* 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
…rse verdict code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At 7f08fae (after merging main at 4c95ad3): the JSDoc blocks on ALERT_WAIT_REASONS.windowTooLong and BOUNDED_COMPOSITE_REASONS.resourceUnsupported are gone. Their user-relevant facts moved into the row summaries. The resourceUnsupported summary now also covers the audio and recovering-session-resource emitters in composite-resource-admission.ts, and names details.shape. The sparse find test asserts verdictReasonCode: "sparse-tree". The body now says read-only find follows in #4930, which merges first.

@apex-sentinel-staging

This comment has been minimized.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee

Copy link
Copy Markdown
Member Author

The earlier pass at 478859b found nothing (#4936 (comment)). At 7f08fae, one wire change is not covered by the PR's declared exceptions, so this needs a fix before merge.

find-target-capture.ts:77 now emits error.details.reason as find_snapshot_unreadable when target capture stays sparse after recovery. Base b03e32b emitted the verdict reason, sparse tree. The PR body declares this change for find click and fill. Find focus and find type go through the same sparse-capture return, so they change too. Callers that match the old value on those two actions can miss their recovery branch. The rule: the wire reason stays verdict.reason for every find action the PR does not declare. Either keep it for focus and type and apply the new reason only to click and fill, or add focus and type to the declared exception. The four mutating find actions listed in metadata.ts enumerate the sites.

The claim that the migration preserves daemon wire reason values outside the declared changes does not hold for this route. The find.test.ts cases at lines 191-259 cover the sparse path through the production handler. They would catch the change once they also assert focus and type.

Could packages/selectors/src/interaction-error.ts own the find sparse-capture refusal row next to the existing interaction error reasons? The daemon and command runtime could then share the command contract, while snapshot-quality-verdict.ts keeps ownership of capture evidence.

CI is green: 22 checks, 0 not passing. No conflicts. Not verified here: the tests and the docs generator were not run, the generated page cells were compared to the source comments by reading only, and the 80-file merge-from-main delta was not diffed in full. Range-diff and git show confirm the logical commit is the only non-main change. Once the wire reason is fixed, nothing else blocks merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

Addressed in 27357da: focus and type are now declared in the published-value exception and tested (the sparse-capture test runs over click, fill, focus and type, asserting find_snapshot_unreadable with verdictReason and verdictReasonCode 'sparse-tree'), so all four mutating find actions answer one reason. On moving the row to selectors/interaction-error.ts: it is possible, since selectors already depends on capture-kit and the module only type-imports ReasonTable, so the eager closure would not grow. But #4930 declares FIND_READ_REASONS byte-identically in capture-kit, and moving it here alone would declare the value in two places, which the reason-table guard refuses. I recommend keeping it and moving it in a follow-up after both PRs merge.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

One problem from the earlier review (7f08fae) remains at 27357da, and the rest is fixed. The new reason reference tells callers to retry with details.suggestedRef on plain_ref_requires_complete_frame, but that field is not always present (row comment, docs).

A bare ref outside the current partial frame produces this reason at ref-frame.ts:244-250. The touch route then passes it to interaction-ref-policy.ts:33-49. That code sets details.suggestedRef only when the scope contains the ref and the generation is known, and the existing test at :28-46 covers the omitted case. A caller who follows the docs has no ref to retry with and misses the right recovery. The row comment should recommend the pinned ref when details.suggestedRef is present, and a fresh interactive snapshot or a stable selector otherwise. Then regenerate the reference.

Could packages/selectors/src/interaction-error.ts own the shared sparse-find refusal reason? It already owns selector-facing reasons such as target_disabled. Both sparse-find response builders could read that row and keep the capture verdict as diagnostic detail. The capture-kit verdict reader and sparsity guard could then stay focused on classifying the capture.

The PR has merge conflicts with main. CI shows 21 checks with none failing. Not verified here: tests were not run locally, and the regression validity was read from the diff and base code. Once the docs fix is in and the conflicts are resolved, nothing else stands in the way of merge.

thymikee and others added 2 commits November 22, 2026 10:03
… one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* origin/main:
  refactor(reasons): declare the platform-android reasons in ReasonTable rows (#4928)

# Conflicts:
#	packages/replay-port/src/daemon-port/__tests__/session-replay-runtime-failure-response.test.ts
#	packages/replay-port/src/daemon-port/session-replay-runtime-failure-response.ts
#	website/docs/docs/error-reasons.md
@thymikee

Copy link
Copy Markdown
Member Author

At f4361e5:

  • The plain_ref_requires_complete_frame row now says to retry with details.suggestedRef when it is present, and otherwise to capture a fresh interactive snapshot or use a stable selector. That matches interaction-ref-policy.ts. The page is regenerated (fix in 6667e3c).
  • Merged main. The replay-port import conflict now keeps main's ANDROID_TEXT_CHANNEL_REASONS together with this PR's BOUNDED_COMPOSITE_REASONS, and the page is regenerated on top of main. Local runs: pnpm typecheck passes, and the replay-port failure-response test plus the reason-table guard pass (12/12).

On moving the sparse-find row into selectors/interaction-error.ts: not in this PR. #4930 declares the same FIND_READ_REASONS row byte-identically in capture-kit. Moving it here alone would leave the value declared in two places once both merge, and the reason-table guard refuses that. The move itself is sound: selectors already depends on capture-kit, and it adds no eager modules. I added it to #4937 as a follow-up for after #4930 and #4936 merge.

@apex-sentinel-staging

This comment has been minimized.

* origin/main:
  refactor(reasons): declare the R5 provider reasons in ReasonTable rows (#4932)

# Conflicts:
#	website/docs/docs/error-reasons.md
@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier findings from 27357da (#4936 (comment)) are addressed in f236a3d, but the change now drops replay diagnostics that the base kept. All 21 checks pass, and there are no conflicts.

A native .ad replay step such as find Search focus can hit sparse snapshots on the first capture and the retry. On the base, the find handler puts the verdict prose in details.reason, and pickSafeCauseDetails forwards it into REPLAY_DIVERGENCE. At f236a3d the handler moves that prose to details.verdictReason and adds details.verdictReasonCode, but the same projection excludes both fields. Replay callers lose the specific explanation, such as "sparse tree" or a capture budget failure, and see only the generic find_snapshot_unreadable classification. Please make the projection forward string verdictReason and verdictReasonCode through the existing replay variable scrubber, and keep the stable details.reason. A replay test that reaches a sparse find refusal and asserts both fields in the REPLAY_DIVERGENCE response would prove it.

The claim that the table migration preserves caller-visible error behavior outside the declared reason replacements does not hold for this route. An in-memory comparison of the producer and replay serializer at d1ace81 and f236a3d shows that a sparse verdict with reason "sparse tree" is visible on base replay and absent on head replay. The only change to the replay serializer in the diff swaps the bounded-composite constant, so nothing carries the new fields. Please fix the projection above, or explain why replay should lose this detail.

Could the shared find refusal row live in packages/contracts/src/interaction.ts, so the daemon, command runtime, and replay port share the command error vocabulary while capture-kit owns the underlying snapshot verdict?

Not verified here: the reason-table guard and typecheck were not run locally; CI results are relied on. Merge should wait until the replay projection is fixed.

…failure details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrives

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At 11c415c: the transfer_ingress_deadline_exceeded summary now says the upload request exceeded its aggregate deadline (details.timeoutMs), including processing after the body arrived. The page is regenerated, and the reason-table guard passes. On sparseFindRefusal: yes. That helper exists only on #4930, which is still open, so I will switch this PR's daemon find route to it when I merge main after #4930 lands. That merge is also where the expected conflict in this file resolves.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier findings from 35245ab are fixed at 11c415c, but one docs problem remains in the new reference. The 21 checks pass, and the PR has merge conflicts with main. Before merge, main must be merged after #4930 lands. Only the changes since 35245ab were line-reviewed here.

The error reference at error-reasons.md:483 says agent interactions wait until the human-control hold is released. That is not what the code does. During a hold, a state-changing call such as click is refused before dispatch: request-admission.ts:133 calls the registry, and lease-registry.ts:488 throws DEVICE_IN_USE with human_control_active. The HTTP test at human-control-http.test.ts:173 checks that click returns 423 while snapshot still succeeds, and commands.md:451 says the same. An agent that reads "wait" may treat the rejected click as pending and never resubmit it after release. Please change the HUMAN_CONTROL_REASONS row comment in human-control-contract.ts to say state-changing commands are refused while the hold is active and callers can retry after release, then regenerate the reference.

Could both find routes use the capture-kit's sparseFindRefusal that is already on the #4930 branch, with each route wrapping the same message and details in its own response or error type? Today the daemon builds the typed refusal in find-target-capture.ts, while selector-read-utils.ts builds the same refusal on its own with the verdict prose as its reason.

…e hold is released

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At 6868952: the human_control_active row now says state-changing commands are refused while the hold is active and can be retried after release, which matches request-admission.ts and lease-registry.ts. The page is regenerated, and the reason-table guard passes.

On sparseFindRefusal: adopting it. Both routes will wrap the same message and details, with errorResponse in find-target-capture.ts and AppError in selector-read-utils.ts. The helper exists only on #4930, which is still open, so the switch lands in the merge from main after #4930 merges, together with the expected conflict resolution in those files.

* 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
@thymikee

Copy link
Copy Markdown
Member Author

At 12fb86c: merged main (#4922, #4934, #4905). #4922 rewrote runner-refusal-reason-docs.test.ts onto the shared collector, so I took main's version and reapplied this PR's change on top. The guard reads DEVICE_CLAIM_CONFLICT_REASONS as a table, and the union kind, its fixtures and readUnionReasons are gone. The generated page is regenerated. Local runs: pnpm typecheck passes, the guard tests pass 8/8, and oxlint is clean. The sparseFindRefusal switch still waits for #4930 to merge.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier findings at 11c415c are fixed in 12fb86c, except one docs problem and one claim that still needs an answer. All 21 checks pass at this commit, with none failing. The merge commit's upstream content from #4922, #4934 and #4905 was not re-reviewed, and no tests or typecheck were run here.

The new row comment at errors.ts:329 says a step returning this reason drives a long-lived resource. That is not always true. A batch with a test step that has an attempt timeout returns the same reason with shape test:attempt-timeout before any test attempt or resource dispatch (composite-resource-admission.ts:237-240, pinned by composite-resource-admission.test.ts:741-761). The descriptor fallback also returns it as prepare:unclassified (:256-272). The generated reasons page now gives callers the wrong diagnosis for these two cases, at website/docs/docs/error-reasons.md lines 40, 229 and 320. Please describe the reason as a bounded composite refusing a step before dispatch. Say that details.shape names the refused operation or option and that details.standaloneCommandName gives the public command when available. Then regenerate the reasons page.

The claim "The bounded-composite refusal migration preserves the published contract while moving the reason into a ReasonTable row." did not hold up fully. The wire spelling is the same on base and head, from the producer in core/lease-context.ts through the batch, dispatch-disclosure, replay and test readers. The generated explanation overstates what that spelling means, as described above. Please either fix the explanation or explain why it is accurate.

Could packages/daemon/src/resources/human-control-contract.ts export its existing human-control refusal row for http-errors.ts:22 to use when selecting HTTP 423? The producer uses the row today and the HTTP reader repeats the literal. The resource contract could own the spelling while the HTTP layer owns the status mapping.

The sparseFindRefusal reuse question still waits on #4930 to merge, as the author said. After the docs fix, nothing else is needed before merge.

…HTTP reads the human-control row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At b109944:

  • The bounded_composite_resource_unsupported row now says the composite refused this step before dispatch because it must run as its own command, with recordings, traces, logs, audio and perf captures as examples rather than a closed list. details.shape names the refused operation or option, details.standaloneCommandName names the public command to run instead, and earlier steps may have run. All three page sections are regenerated.
  • On "preserves the published contract": the wire spelling and fields are unchanged from base, as you confirmed. What overstated things was the generated summary, which read as a closed list of resources and ignored refused options. The corrected row fixes that, so the claim holds: the spelling is preserved and the explanation now matches the producer.
  • Human-control question: adopted. HUMAN_CONTROL_REASONS is exported from human-control-contract.ts, and http-errors.ts maps HTTP 423 from HUMAN_CONTROL_REASONS.active.reason instead of repeating the literal.
  • Local runs: pnpm typecheck passes; human-control-http and the reason-table guard pass 9/9; the Fallow audit is clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

Correction on the human-control question, at 58847f4: reverted. statusCodeForNormalizedError is a pinned declaration in the wire-compat ledger, and replacing the literal with the row changed its digest, which failed Repo Guards. Keeping the change would need a re-pin plus a compatibleChanges rationale for something with no behavioral effect, so I put back the literal and the module-private row. The bounded-composite summary fix from b109944 stays. Locally, check:daemon-wire-compat exits 0 and pnpm typecheck is clean.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

One docs problem remains at 58847f4. The earlier findings from 12fb86c are otherwise fixed, and no threads are open. The new session_cleanup_incomplete row says the session was retired, but that is not always true. When close fails to finalize the application while the session holds a device claim, session-close.ts:462-477 throws this same reason before it retires the session. The error hint tells the caller the session was kept and to retry close, and session-close-claim-retry.test.ts:167-185 asserts the reason, the retained session and claim, and a successful retry. A caller who follows error-reasons.md:799 can skip the retry and leave the live session and device claim in place. The ReasonTable comment in packages/daemon/src/sessions/session-teardown.ts should say that cleanup was incomplete, that details.failedSteps lists the failed steps, and that the error hint says whether the session was kept and what to do next. Then regenerate the reason page. CI is green on all 21 checks, and the change since 12fb86c is comment and doc text only. Not verified here: a rerun of the doc generator to byte-compare the regenerated rows, though the three doc rows match the new row comment text. No conflicts. Once the comment is fixed and the page regenerated, nothing else stands in the way of merge.

…int says which

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At 31ede65: the session_cleanup_incomplete row no longer claims the session was retired. It now says cleanup was incomplete, details.failedSteps lists the failed steps, and the hint says whether the session was kept (retry close) or retired, and what to do next. That matches closeCleanupError(..., { sessionKept }) in session-close.ts and the claim-retry test. The page is regenerated, and the reason-table guard passes.

@apex-sentinel-staging

This comment has been minimized.

@thymikee

Copy link
Copy Markdown
Member Author

The earlier findings from 58847f4 (#4936 (comment)) are fixed at 31ede65, but one docs problem remains. CI is green: 21 checks, none failing. The new ref_frame_expired row in error-reasons.md says none of an expired frame's refs resolve. That is not true for reads. After a device action expires a frame, get text @e1 still resolves when the frame keeps evidence for e1, and it returns a staleness warning. The unchanged handler test at selector-runtime-get-reads.test.ts covers this route, and ADR 0014 requires it. The expiry refusal lives in admitRefMutation (ref-frame.ts). admitRefRead (ref-frame.ts) only checks issuance scope. Callers and agents who read this page may drop valid warned reads or recapture when they do not need to. The rule the row must satisfy: it describes mutations with an expired frame's refs as refused, and reads with retained evidence as allowed with a staleness warning. Update the REF_FRAME_REASONS.frameExpired row comment to say that, then regenerate the page. The docs generator was not rerun here to byte-compare the page. Not verified here: the page output after regeneration. Once that is fixed, nothing else stops this PR.

…dence warn

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member Author

At dcaa56d: the ref_frame_expired row now says a mutation that uses the expired frame's refs is refused (admitRefMutation in ref-frame.ts), while a read that still has retained evidence answers with a staleness warning instead. The page is regenerated, and the reason-table guard passes.

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of dcaa56d

Since the review of 31ede65: 0 new · 0 still open · 0 no longer raised

No open findings.

Reviewed with this repository's own Sentinel configuration (caa232e6ca2e).

💬 Talking to Sentinel

In a finding's thread, reply with:

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.

@thymikee

Copy link
Copy Markdown
Member Author

The ref_frame_expired row now says mutations are refused and reads with retained evidence get a staleness warning, which matches ref-frame.ts and the read test. This addresses the last finding; nothing else blocks dcaa56d.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit 15a4a8b into main Nov 22, 2026
21 checks passed
@thymikee
thymikee deleted the t3/daemon-typed-reasons branch November 22, 2026 16:22
thymikee added a commit that referenced this pull request Nov 22, 2026
* origin/main:
  fix(auth): send a stored CLI session only to the cloud that issued it (#4921)
  refactor(reasons): declare the daemon reasons in ReasonTable rows (#4936)
  fix(cli): drop --remote-config from auth and skip reading it for unsupported commands (#4957)
  refactor(snapshot): deduplicate system-surface projections and warnings (#4959)
  fix(find): enforce offscreen and non-hittable guarantees on focus (#4954)
  feat(auth): store a rotated CLI session credential and show the login code (#4833)
  fix(daemon): report Windows SIGTERM daemon exits as forced (#4659)

# Conflicts:
#	packages/capture-kit/src/snapshot-quality-verdict.ts
#	packages/command-runtime/src/commands/interaction/runtime/target-visibility-stages.ts
#	packages/contracts/src/device-inventory.ts
#	packages/daemon/src/execution/interaction/internal/__tests__/find.test.ts
#	packages/daemon/src/execution/interaction/internal/find-target-capture.ts
#	packages/replay-port/src/daemon-port/session-replay-runtime-failure-response.ts
#	website/docs/docs/error-reasons.md
thymikee added a commit that referenced this pull request Nov 22, 2026
* refactor(reasons): declare the R6b reasons in ReasonTable rows

Migrates the 59 published error.details.reason values of the R6b packages
into ReasonTable rows beside the code that raises them, so every wire
spelling is declared once and read as TABLE.member.reason.

Three sites published prose or an internal code as their reason and now
publish a typed value instead: the PNG and JPEG screenshot decoders
(png_decode_failed / jpeg_decode_failed, decoder message moved to
details.decoderError), the sparse-capture find refusal
(find_snapshot_unreadable, verdict prose moved to details.verdictReason),
and the snapshot router's cancelled rethrow (always request_canceled, the
kernel-owned value it already carried in details).

Regenerated website/docs/docs/error-reasons.md.

* refactor(reasons): declare find_snapshot_unreadable in capture-kit, where both find paths load it

The daemon find path (#4936) cannot import command-runtime, so the row lives in
capture-kit/snapshot-quality-verdict.ts, byte-identical to #4936's declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(reasons): keep the 15 module-local reason tables private

Nothing imports them; the reasons collector also reads tables that are not exported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(reasons): drop the settings app-not-consumed alias

Its only reader was a test, which now asserts the published spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(reasons): say a contact sheet could not obtain usable extracted frames

Also drops the JSDoc lines that repeated each row's summary comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(reasons): cover over-budget frames in the contact-sheet extraction summary

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(find): build the sparse-capture refusal once in capture-kit for both find routes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(replay): keep a sparse find refusal's scrubbed verdict in replay failure details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(replay): split the cause-detail projection to stay under the complexity limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(reasons): daemon_exit_unconfirmed covers every unconfirmed stop, not only a surviving process

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(reasons): png_decode_failed covers any input that is not decodable PNG; assert the read-only find verdict code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(replay): pass the sparse verdict code through unchanged, scrub only its prose

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(selectors): keep the off-screen reasons beside the module that publishes them

interaction-offscreen.ts imported interaction-error.ts only to read two reason rows,
which added a module to its eager closure and failed the closure budget. The rows
now live in the module's own ReasonTable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant