Repository navigation
refactor(mobile): send the github.* PR surface and the diff-review loaders through typed RpcOperations - #20668
Conversation
…e migrating them
Scenarios and goldens for the step-4 `src/session/` first half, recorded
against main's unmigrated product code so the migration that follows has a
frozen parity oracle instead of an assertion.
- 20 scenarios over seven new families: the seven `github.*` PR reads, the
twelve PR mutations split by their three reply contracts (`{ok}` envelope,
bare boolean, slug-addressed comment edit), the triage createTerminal+send
launch, the PR branch-context chain and the review screen's three loaders.
- Two new sender-style mount adapters. Both mount exported async functions
taking a client, so no React host is needed and the recorded state is each
wrapper's own outcome.
- 50 new goldens: 20 pilot, 30 reply-matrix sites. `recorderSha256` moved on
all 153 existing goldens because the adapters are in the whole-recorder
digest; no other line in any of them changed.
Text diffs are deliberately unscripted: highlighting one reaches `lowlight`,
which the module loader refuses as an unspecified native dependency.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… through RpcOperation
The step-4 first half for `src/session/`: eight files, 38 references to the raw
request port, all replaced with declared operations. No behaviour change — the
50 goldens recorded in the previous commit do not move, which is the claim.
- 21 operations over 21 methods. The seven PR reads keep their defensive
parsers as readers; the ten status-envelope mutations share one reader
because the `{ok, error}` convention is one host convention, not ten; the two
bare-boolean mutations read the payload unchecked because `=== true` is the
caller's confirmation rule.
- Four second readers, each justified in place: git.status and git.branchCompare
for the PR branch context (a refusal costs a fallback, not the screen),
git.branchCompare and git.branchDiff for review (the projection is not a
superset of the verbatim payload), and worktree.show for the review notes the
summary reader drops.
- Every failure text is preserved, including the two main kept apart: a refusal
with no message falls back to the screen's copy, a transport drop with no
message surfaces its empty message verbatim. `sendRaw`'s callers replaced
theirs a second time, so those fall back on both paths.
- No retry, and no operation reads a dropped reply as a failed mutation: the
rejection reaches each wrapper's catch as the original object.
- `github-pr-mutations.ts` split along the action/comment seam it already had
in its consumers, so no file needs a max-lines bump.
Inventory: src/session/ 47 files / 114 references -> 39 / 76.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The barrier mutation census found one survivor: moving `reviewWorktreeMetadataRead.interpret` inside the `Promise.all` in `loadMobileDiffReviewSnapshot` changed nothing any golden observed. The base scenario answers the branch-base legs before the notes leg, so by the time the notes reply lands the compare leg has already sent `git.branchCompare` and the two orders record the same sender list. This scenario answers the notes leg first, while the compare leg is still resolving its base ref, and checkpoints before the rest. At that checkpoint the barrier is the whole difference: the correct order has nothing settled, the early interpretation has already rejected the action. The mutation now fails it. Recorded from a detached checkout of the previous commit, which carries main's unmigrated product code with this branch's recorder over it, so the parity claim stays non-circular. One new golden; no existing golden moved, because the family base is unchanged and `scenarioSha256` is per golden. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
Pullfrog stalled The agent stopped emitting events for 125s and was killed by the activity-timeout watchdog. The model produced no output at all before the stall — the request was sent but nothing came back. This is usually transient; re-running often succeeds.
|
|
Too many files changed for review (236 files, 100 file limit). Bypass the limit by tagging |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (57)
🚧 Files skipped from review as they are similar to previous changes (8)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change migrates mobile GitHub PR, diff-review, branch-context, and terminal RPC calls to typed deferred operations. Shared readers and settlement helpers normalize success, refusal, invalid-response, and transport outcomes. New recording adapters and pilot scenarios exercise these flows. The change adds and updates golden fixtures, including format-version and recorder metadata updates, and removes migrated entries from the raw RPC inventory. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to PR triage can report that a prompt was sent when the host rejected or did not confirm it, so this should be corrected before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 35.85% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 53 functions across 24 files. (45 skipped: 45 unsupported.) Full details: Description checkExplanation The description gives detailed scope, rationale, implementation notes, testing results, and review history. It does not include the required Linked Issue with a Fixes reference, the required Visual Proof section with N/A or attachments, or the repository checklist and related consideration sections. Resolution Add the required template sections and complete them. Include a linked issue using
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 673cd420-88b1-4185-81db-98766c883a23
📒 Files selected for processing (226)
mobile/rpc-foundation/goldens/b1.jsonmobile/rpc-foundation/goldens/b2.jsonmobile/rpc-foundation/goldens/b3.jsonmobile/rpc-foundation/goldens/diff-review-branch-compare.jsonmobile/rpc-foundation/goldens/diff-review-branch-file-diff.jsonmobile/rpc-foundation/goldens/diff-review-notes-refused-before-compare.jsonmobile/rpc-foundation/goldens/diff-review-refused-file-diff.jsonmobile/rpc-foundation/goldens/diff-review-snapshot.jsonmobile/rpc-foundation/goldens/diff-review-status-unavailable.jsonmobile/rpc-foundation/goldens/diff-review-worktree-file-diff.jsonmobile/rpc-foundation/goldens/interruptions-inventory-lifecycle.jsonmobile/rpc-foundation/goldens/interruptions-settings-bot-overrides-fulfilled.jsonmobile/rpc-foundation/goldens/inventory-lifecycle.jsonmobile/rpc-foundation/goldens/inventory-repeat-query.jsonmobile/rpc-foundation/goldens/lifecycle-b3.jsonmobile/rpc-foundation/goldens/lifecycle-inventory-lifecycle.jsonmobile/rpc-foundation/goldens/lifecycle-settings-bot-overrides-fulfilled.jsonmobile/rpc-foundation/goldens/lifecycle-settings-task-hydration-fulfilled.jsonmobile/rpc-foundation/goldens/lifecycle-settings-workspace-context-fulfilled.jsonmobile/rpc-foundation/goldens/matrix-git.base-ref-chain-repo.baserefdefault-1.jsonmobile/rpc-foundation/goldens/matrix-git.base-ref-chain-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-git.base-ref-chain-worktree.show-1.jsonmobile/rpc-foundation/goldens/matrix-git.commit-message-ai-git.generatecommitmessage-1.jsonmobile/rpc-foundation/goldens/matrix-git.history-read-git.history-1.jsonmobile/rpc-foundation/goldens/matrix-git.remote-prerequisite-git.push-1.jsonmobile/rpc-foundation/goldens/matrix-git.review-preparation-git.status-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-comment-mutation-github.addissuecomment-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-comment-mutation-github.addprreviewcommentreply-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-comment-mutation-github.project.deleteissuecommentbyslug-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-comment-mutation-github.project.updateissuecommentbyslug-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-comment-mutation-github.resolvereviewthread-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.mergepr-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.removeprreviewers-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.requestprreviewers-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.rerunprchecks-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.setprautomerge-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-mutation-github.updateprstate-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.listassignableusers-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prcheckdetails-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prchecks-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prforbranch-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.reposlug-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.workitemdetails-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-hostedreview.forbranch-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-title-mutation-github.updateprtitle-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-chain-git.push-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-chain-hostedreview.create-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-chain-worktree.set-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.bulkstage-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.commit-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.generatecommitmessage-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.push-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-2.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-3.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-4.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.create-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-2.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-worktree.set-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.eligibility-hostedreview.getcreationeligibility-1.jsonmobile/rpc-foundation/goldens/matrix-legacy-inventory-files.searchpaths-1.jsonmobile/rpc-foundation/goldens/matrix-legacy-inventory-files.searchpaths-2.jsonmobile/rpc-foundation/goldens/matrix-legacy-inventory-fresh-inventory.jsonmobile/rpc-foundation/goldens/matrix-legacy-inventory-old-inventory.jsonmobile/rpc-foundation/goldens/matrix-linear-detail-barrier-linear.getissue-1.jsonmobile/rpc-foundation/goldens/matrix-linear-detail-barrier-linear.issuecomments-1.jsonmobile/rpc-foundation/goldens/matrix-project-explicit-false-github.project.updateissuebyslug-1.jsonmobile/rpc-foundation/goldens/matrix-session.diff-review-base-ref-show.jsonmobile/rpc-foundation/goldens/matrix-session.diff-review-git.branchcompare-1.jsonmobile/rpc-foundation/goldens/matrix-session.diff-review-git.status-1.jsonmobile/rpc-foundation/goldens/matrix-session.diff-review-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-session.diff-review-review-show.jsonmobile/rpc-foundation/goldens/matrix-session.pr-branch-context-git.branchcompare-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-branch-context-git.status-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-branch-context-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-branch-context-worktree.show-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-triage-session.tabs.createterminal-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-triage-terminal.send-1.jsonmobile/rpc-foundation/goldens/matrix-session.tab-reveal-session.tabs.activate-1.jsonmobile/rpc-foundation/goldens/matrix-session.tab-reveal-session.tabs.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings-agent-read-preflight.detectremoteagents-1.jsonmobile/rpc-foundation/goldens/matrix-settings-agent-read-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings-agent-read-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings-best-effort-settings.update-1.jsonmobile/rpc-foundation/goldens/matrix-settings.bot-overrides-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.home-providers-linear.status-1.jsonmobile/rpc-foundation/goldens/matrix-settings.home-providers-preflight.check-1.jsonmobile/rpc-foundation/goldens/matrix-settings.home-providers-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata-host.platform-1.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata-ssh.listtargetsummaries-1.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata-folderworkspace.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata-projectgroup.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata-repo.list-1.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata-worktree.ps-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration-linear.status-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration-preflight.check-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration-status.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration-ui.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.task-workspace-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context-linear.status-1.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context-preflight.check-1.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context-ui.get-1.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-submit-settings.get-1.jsonmobile/rpc-foundation/goldens/matrix-worktree.review-link-worktree.set-1.jsonmobile/rpc-foundation/goldens/pr-branch-identity.jsonmobile/rpc-foundation/goldens/pr-branch-repo-context.jsonmobile/rpc-foundation/goldens/pr-comment-mutation.jsonmobile/rpc-foundation/goldens/pr-comment-resolve-unconfirmed.jsonmobile/rpc-foundation/goldens/pr-mutation-in-band-failure.jsonmobile/rpc-foundation/goldens/pr-mutation-status.jsonmobile/rpc-foundation/goldens/pr-read-fork-routing.jsonmobile/rpc-foundation/goldens/pr-read-surface.jsonmobile/rpc-foundation/goldens/pr-read-upstream-error.jsonmobile/rpc-foundation/goldens/pr-title-mutation.jsonmobile/rpc-foundation/goldens/pr-title-unconfirmed.jsonmobile/rpc-foundation/goldens/pr-triage-invalid-terminal.jsonmobile/rpc-foundation/goldens/pr-triage-launch.jsonmobile/rpc-foundation/goldens/pr-triage-send-locked.jsonmobile/rpc-foundation/goldens/probe-new-tab-both-refused.jsonmobile/rpc-foundation/goldens/probe-new-tab-null-sibling-refused.jsonmobile/rpc-foundation/goldens/probe-new-tab-refused-sibling-rejects.jsonmobile/rpc-foundation/goldens/probe-new-tab-rejects-sibling-refused.jsonmobile/rpc-foundation/goldens/sc-base-ref-default.jsonmobile/rpc-foundation/goldens/sc-base-ref-repo-fallback.jsonmobile/rpc-foundation/goldens/sc-base-ref-unavailable.jsonmobile/rpc-foundation/goldens/sc-base-ref-worktree-hit.jsonmobile/rpc-foundation/goldens/sc-commit-message-cancel-rejected.jsonmobile/rpc-foundation/goldens/sc-commit-message-canceled.jsonmobile/rpc-foundation/goldens/sc-commit-message-generated.jsonmobile/rpc-foundation/goldens/sc-create-existing-review.jsonmobile/rpc-foundation/goldens/sc-create-intent-stage-commit-push-create.jsonmobile/rpc-foundation/goldens/sc-create-link-failure-is-non-fatal.jsonmobile/rpc-foundation/goldens/sc-create-pushes-then-creates.jsonmobile/rpc-foundation/goldens/sc-create-refused-empty-message.jsonmobile/rpc-foundation/goldens/sc-create-rejected-empty-message.jsonmobile/rpc-foundation/goldens/sc-eligibility-fetched.jsonmobile/rpc-foundation/goldens/sc-history-loaded.jsonmobile/rpc-foundation/goldens/sc-pr-link-hosted-review.jsonmobile/rpc-foundation/goldens/sc-pr-link-read.jsonmobile/rpc-foundation/goldens/sc-pr-link-set.jsonmobile/rpc-foundation/goldens/sc-prefill-unavailable-on-refusal.jsonmobile/rpc-foundation/goldens/sc-prefill-unavailable-on-rejection.jsonmobile/rpc-foundation/goldens/sc-prerequisite-force-with-lease.jsonmobile/rpc-foundation/goldens/sc-prerequisite-publish.jsonmobile/rpc-foundation/goldens/sc-prerequisite-push.jsonmobile/rpc-foundation/goldens/sc-prerequisite-skipped.jsonmobile/rpc-foundation/goldens/sc-reveal-first-poll.jsonmobile/rpc-foundation/goldens/sc-reveal-timeout.jsonmobile/rpc-foundation/goldens/sc-review-commit-inner-failure.jsonmobile/rpc-foundation/goldens/sc-review-commit-refused-empty-message.jsonmobile/rpc-foundation/goldens/sc-review-commit-rejected.jsonmobile/rpc-foundation/goldens/sc-review-commit.jsonmobile/rpc-foundation/goldens/sc-review-status-entries-not-array.jsonmobile/rpc-foundation/goldens/sc-review-status-normalized.jsonmobile/rpc-foundation/goldens/schedules-b3.jsonmobile/rpc-foundation/goldens/schedules-settings-home-providers-fulfilled.jsonmobile/rpc-foundation/goldens/schedules-settings-new-tab-ssh.jsonmobile/rpc-foundation/goldens/schedules-settings-repo-metadata-fulfilled.jsonmobile/rpc-foundation/goldens/schedules-settings-resume-metadata-fulfilled.jsonmobile/rpc-foundation/goldens/schedules-settings-task-hydration-fulfilled.jsonmobile/rpc-foundation/goldens/schedules-settings-workspace-context-fulfilled.jsonmobile/rpc-foundation/goldens/settings-bot-overrides-fulfilled.jsonmobile/rpc-foundation/goldens/settings-bot-overrides-refresh-refused.jsonmobile/rpc-foundation/goldens/settings-bot-overrides-refused.jsonmobile/rpc-foundation/goldens/settings-bot-overrides-transport-error.jsonmobile/rpc-foundation/goldens/settings-home-coalesced.jsonmobile/rpc-foundation/goldens/settings-home-providers-fulfilled.jsonmobile/rpc-foundation/goldens/settings-home-providers-refuse-after-data.jsonmobile/rpc-foundation/goldens/settings-home-providers-refused.jsonmobile/rpc-foundation/goldens/settings-home-providers-transport-error.jsonmobile/rpc-foundation/goldens/settings-new-tab-refused.jsonmobile/rpc-foundation/goldens/settings-new-tab-ssh.jsonmobile/rpc-foundation/goldens/settings-new-tab-transport-error.jsonmobile/rpc-foundation/goldens/settings-repo-cache-expiry.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-fulfilled.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-refuse-after-data.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-refused.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-single-host.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-transport-error.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-fulfilled.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-refuse-after-data.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-refused.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-transport-error.jsonmobile/rpc-foundation/goldens/settings-task-hydration-fulfilled.jsonmobile/rpc-foundation/goldens/settings-task-hydration-refuse-after-data.jsonmobile/rpc-foundation/goldens/settings-task-hydration-refused.jsonmobile/rpc-foundation/goldens/settings-task-hydration-transport-error.jsonmobile/rpc-foundation/goldens/settings-task-workspace-fulfilled.jsonmobile/rpc-foundation/goldens/settings-task-workspace-refused.jsonmobile/rpc-foundation/goldens/settings-task-workspace-transport-error.jsonmobile/rpc-foundation/goldens/settings-task-write.jsonmobile/rpc-foundation/goldens/settings-workspace-context-fulfilled.jsonmobile/rpc-foundation/goldens/settings-workspace-context-refuse-after-data.jsonmobile/rpc-foundation/goldens/settings-workspace-context-refused.jsonmobile/rpc-foundation/goldens/settings-workspace-context-transport-error.jsonmobile/rpc-foundation/goldens/settings-workspace-submit-fulfilled.jsonmobile/rpc-foundation/goldens/settings-workspace-submit-refused.jsonmobile/rpc-foundation/goldens/settings-workspace-submit-transport-error.jsonmobile/rpc-foundation/pilot-scenarios.jsonmobile/src/session/github-pr-comment-mutations.tsmobile/src/session/github-pr-mutation-operations.tsmobile/src/session/github-pr-mutation-outcome.tsmobile/src/session/github-pr-mutations.tsmobile/src/session/github-pr-parsers.tsmobile/src/session/github-pr-read-operations.tsmobile/src/session/github-pr-repo-slug.tsmobile/src/session/github-pr-rpc.tsmobile/src/session/mobile-diff-review-loaders.tsmobile/src/session/mobile-diff-review-operations.tsmobile/src/session/mobile-review-terminal-operations.tsmobile/src/session/mobile-session-rpc-sender.tsmobile/src/session/pr-ai-triage-launch.tsmobile/src/session/use-mobile-pr-actions.tsmobile/src/session/use-mobile-pr-branch-context.tsmobile/src/session/use-mobile-pr-comment-actions.tsmobile/src/session/use-mobile-pr-title-action.tsmobile/src/test-support/rpc-recording/diff-review-mount-adapters.tsmobile/src/test-support/rpc-recording/github-pr-mount-adapters.tsmobile/src/test-support/rpc-recording/pilot-mount-adapters.tsmobile/src/transport/unvalidated-rpc-request-port-inventory.ts
💤 Files with no reviewable changes (1)
- mobile/src/transport/unvalidated-rpc-request-port-inventory.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
| const created = await client.sendRequest('session.tabs.createTerminal', { | ||
| // Each request is awaited outside its catch so a transport drop propagates as the original | ||
| // error object; only a refusal is rewritten into the step's own copy. | ||
| const createdReply = await reviewTerminalCreateRun.request(client, { |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add deadlines to both terminal RPCs.
Both requests omit timeout options. The recordings confirm $rpc: "absent" for session.tabs.createTerminal and terminal.send. If either request remains pending during reconnect handling, createTerminalAndSendPrompt never settles and the PR triage action remains blocked.
Pass an explicit timeout or end-to-end deadline to both requests. Convert timeout failures into stable user-facing errors.
Based on learnings, terminal sends and analogous session.tabs.createTerminal calls require explicit timeout and UX behavior.
Also applies to: 32-32
There was a problem hiding this comment.
Out of scope for this PR by design: it is a no-behaviour-change migration and the goldens pin what main already does at the baseline commit (no timeout options on either RPC, and the same readMobileReviewTerminalSendAccepted check on the send result). Changing either would move recorded product behaviour inside a refactor PR. Tracked as a follow-up on the step-4 plan for a behaviour-change PR with its own re-record.
There was a problem hiding this comment.
@Jinwoo-H, understood. This PR preserves the baseline behavior and its recordings.
The timeout change remains a valid follow-up for the behavior-change PR. I will keep this thread open because the current PR does not implement the change.
Would you like me to open a GitHub issue for the step-4 follow-up?
🧠 Learnings used
Learnt from: brennanb2025
Repo: stablyai/orca PR: 11035
File: mobile/src/session/use-mobile-diff-review-send-actions.ts:80-82
Timestamp: 2026-07-28T01:55:36.171Z
Learning: When reviewing mobile session code that performs terminal/native-chat sends (e.g., diff-review send actions), ensure the *main* unbounded RPC such as `terminal.send` has explicit timeout/end-to-end deadline behavior. Don’t assume a preceding “healing” step (e.g., `healMobileNativeChatStaleInput`) makes the overall flow bounded—if healing runs with its own internal budget but the subsequent `terminal.send` has no timeout, the request can hang through reconnect indefinitely. Add timeout behavior for the terminal/send RPC itself and include a corresponding UX policy for how the diff-review flow should behave on timeout (e.g., message/result handling, user feedback). Apply the same timeout/UX consistency checks to analogous terminal-related calls in this flow, such as `session.tabs.createTerminal` and `session.tabs.list`.
You are interacting with an AI system.
…er domain The branch-context read declared its own `statusProjectionReader` with the same parser, the same 'normalized-status' variant and the same empty salvage as source-control's `gitStatusProjectionReader`, while its doc block claimed "one reader serves both". Export the source-control reader and bind it here so the claim is true; the doc now names the reader and keeps the part that is actually different, which is what a refusal means on each policy. No wire change and no golden moves: the reader is the same function value the copy computed. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… no longer forces The split was made when the migrated file measured 319 lines. It does not any more: `sendRaw`, `sendGithubPrMutation` and `extractMutationError` moved to github-pr-mutation-outcome.ts and the prRepo/headSha allow-lists to github-pr-repo-slug.ts, so the merged file is 293 lines against the 300 limit and oxlint is clean. Nothing imported github-pr-comment-mutations directly — every consumer went through the re-export hub in github-pr-mutations — so the seam bought a reader one extra file to open and nothing else. Merge it back and drop the hub. Product-only: same wrappers, same params, same settle shapes, no golden moves. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…mutations `GitHubPrMutationOperation` and the private `GitHubPrReadOperation` declared the same two members for the same reason: a settle shape needs a bound operation's method and its interpret, nothing else. Keep one, `GitHubPrSettleableOperation`, and import it into the read settle. `extractMutationError` goes back to private, as it was on main; it never had an importer outside its own file. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The oracle does not observe param key order: `captureValue` in recording-values.ts sorts keys, and no golden carries a raw frame string, so "the sender recordings pin the bytes" was not a fact the evidence supports. The assertion stays for the reason already in the doc — the builder is method-generic and returns a record. `GitHubPrParamOptions` goes back to private; nothing outside the module names it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…hecked reader `mutationConfirmationReader` spelled out what `rpcUncheckedPayloadReader` already returns, under the same 'pr-mutation-confirmation' variant that eleven other operations in this tree get from the helper. Same function value, same variant, so no golden moves. The comment explaining why the payload is left unread stays. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…ias each `MobileSessionRpcSender` and `MobileSourceControlRpcSender` were the same type with the same doc, each derived from whichever operation its domain happened to own. Replace both with `RpcOperationSender` in transport, derived from `settingsRead` there, and name it for what it is: what a bound operation needs to send with. Still derived rather than restated, so no module names the raw request port to accept a client; the port inventory and its ratchet are untouched. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Conflict resolution, per the merge block: - The 153 pre-existing goldens take main's version; this branch's own goldens stay and are re-recorded in a later commit. - pilot-scenarios.json keeps both sides' scenarios: main's 109 and this branch's 21, no id collisions and no base scenario changed by either side. - pilot-mount-adapters.ts takes main's version, which now merges the register rather than spreading adapters itself. github-pr-mount-adapters.ts and diff-review-mount-adapters.ts move into adapters/ and are registered in adapters/mounted-operation-modules.ts, so each is pinned by adapterSha256 on the goldens that mount it instead of by recorderSha256 on every golden. No engine file edited. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… and register them The merge commit carried the two adapter files into adapters/ with their old specifiers and left the register untouched, so this completes the move: the relative imports climb one more level, and both modules are registered in adapters/mounted-operation-modules.ts as identifiers imported from their own source, which is what adapter-seam.test.ts checks. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…seam The merge brought #20568's per-golden scenario digest and #20662's per-golden adapter digest, so the 51 goldens this PR owns move on four header fields and nothing else: baseline, goldenFormatVersion, recorderSha256, and the newly added adapterSha256. No recorded byte outside those headers changed. baseline stays at main's own pin c6a7216 rather than moving to 6a11a0b. Repinning rewrites the baseline line in all 208 goldens main owns, which this branch must leave byte-identical. Recording at either commit produces identical bytes everywhere except that one line, so the pin costs no coverage. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the three commits added since the prior review — a merge of main, the test-support relocation, and the golden re-record. No product code changed, and I verified the golden provenance directly rather than taking the PR body's word for it.
- Merged
main's adapter seam (116a3f678b, #20662) into the branch, adopting the per-goldenadapterSha256scheme and the engine/adapter directory split. - Moved both session mount adapters into
adapters/and registered them (4e8323923d):diff-review-mount-adapters.tsandgithub-pr-mount-adapters.tsnow import../recording-scenario/../operation-module-loaderand the../../../session/*type specifiers, and both are registered as identifiers imported from their own source inadapters/mounted-operation-modules.ts— the shapeadapter-seam.test.tsenforces. - Re-recorded the 51 session goldens (
6944d2b20a): verified header-only — each file moves exactly +4/−3 onbaseline,recorderSha256,goldenFormatVersion(4→5) and the newadapterSha256; novaluesorscenarioSha256byte changed.
Checked independently: both adapterSha256 values recompute exactly from the moved module bytes (a8016eb6… diff-review, f560ff15… github-pr); no branch golden retains the stale 6859a6cd… recorder digest or the old e53f1557… baseline; every registration pairs its source with the file declaring its mounts. The lone pilot-scenarios.json line change and the mass golden-deletion noise in the range-diff belong to main's history, not this branch — the branch's diff against main for that file is additive-only.
Gates could not be re-run in this environment (mobile/tsconfig.json cannot resolve expo/tsconfig.base.json from the installed deps), but the golden-header invariant that the seam tests assert was verified directly.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Two conflicts, both resolved as the union of the two sides. The adapter register takes all four new modules, main's file-request, host-screen and host-worktree-action alongside this branch's github-pr. pilot-scenarios.json keeps main's 130 scenarios and this branch's 21, 151 in all with no id collision and no base entry changed by either side. baseline is c6a7216 on both sides and stays there. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed the one commit added since the prior approval — a merge of main after #20705. No product code changed; I verified the two conflict resolutions and the golden/ratchet invariants directly rather than trusting the merge message.
- Merged
mainafter #20705 (039d8926), which advances the merge base to36ef93a6. - Resolved
adapters/mounted-operation-modules.tsas a union: main'sfile-request,host-screen,host-worktree-action(plusnew-workspace,worktree-catalog) entries alongside this branch'sdiff-reviewandgithub-pr, each as an identifier imported from its own module — the shapeadapter-seam.test.tsenforces. - Resolved
rpc-foundation/pilot-scenarios.jsonas a union: 151 scenario ids (130 main + 21 branch), zero duplicates, one shared baselinec6a72169. - Kept the port-inventory ratchet consistent: the net change against main is exactly the 8 migrated
src/session/entries removed, with main's additions intact. - Confirmed both branch adapter digests still recompute exactly from the adapter module bytes (
f560ff15…github-pr,a8016eb6…diff-review), matching every golden header, so the 51 re-recorded goldens remain internally consistent after the merge.
Gates could not be re-run here (mobile/node_modules is absent), but the invariants the seam tests assert were verified directly.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
One conflict, `pilot-scenarios.json`, resolved as a verified union: 130 shared, 21 from #20668, 19 from here, 170 total, no id collision and no scenario edited or removed on either side. The register and the port inventory auto-merged into the union each side intended. #20668 changed no recorder engine file, so this branch's `recorderSha256` is unchanged and only the 51 goldens it added need the header re-digest that the next commit records. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…race 66 goldens moved, in four groups: - 51 from #20668, `recorderSha256` only and zero non-header lines: they carry main's engine digest and adopt this branch's. - 10 other `transport-status` goldens, `adapterSha256` only and zero non-header lines: their adapter module changed, their recordings did not. - `transport-pairing-race-relay-wins-when-direct-refused` and the two `matrix-transport.pairing-race-*` goldens: the race settlement is now fulfilled with `'relay'`/`'direct'` instead of pending, and the `Unsupported observation: function` unhandled-rejection effect is gone. The two matrix goldens also move `scenarioSha256`, having inherited the base scenario's renamed checkpoint. - `transport-pairing-race-direct-wins` is renamed to `transport-pairing-race-relay-completes-first`, and `transport-pairing-race-direct-completes-first` is new. `transport-pairing-race-both-refused` did not move: its race rejects, and a rejection was always serializable. `recorderSha256` moved nowhere except in those 51, which is the proof the engine is untouched by this step. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…h typed RpcOperations (#20667) * test(mobile): record the transport pairing and status domain against main Adds seven recording families for `mobile/src/transport/`, recorded from main's unmigrated product code before any refactor: the protocol-gate hook, the retrying capability probe, the pairing candidate race, credential rotation, direct-to-relay upgrade, startup pairing recovery and first pairing. The relay modules build their `defaultDependencies` at module scope, so merely referencing `Platform.OS` or a storage-backed loader threw before an adapter could override it. `native-mounting-substitutes.ts` separates reference from use: react, zod and @noble/hashes are the real libraries, expo-crypto routes through the Web Crypto the scheduler already pins, and the two secret stores throw when called. `baseline` repins to fc525c3 because main's tree no longer matches the pinned 50e752f. All 241 goldens re-recorded; main's 208 move only `baseline` and `recorderSha256`, and no `scenarioSha256` or recording body moves. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): send the transport pairing and status domain through typed RpcOperations Migrates 11 of the 18 raw-port references in `mobile/src/transport/`: the protocol gate, the runtime capability probe, the pairing candidate race, credential rotation, the direct-to-relay upgrade, startup pairing recovery and first pairing. Three operations over three methods, zero new acceptance policies. `status.get` gains a third named policy — `status.transport-probe-or-skip` — because all three transport callers treat a refusal as an absent answer, which is the Tasks create-drawer policy but not the Tasks hydration one; transport cannot import tasks, and the name is what a decode failure reports. `pairing.provisionRelay` and `pairing.getEndpoints` are `require-result-or-throw`, which reuses the same `code: message` text the four call sites each spelled by hand. Three sites read the raw envelope for `method_not_found` before interpreting, because an unknown method means "this build has no relay" rather than "the install failed". Reply parsing stays at the call sites: the readers are unchecked and the zod contract schemas run where they ran before. No wire change and no behaviour change: all 241 goldens replay green and this commit touches none of them. Two files stay on the raw port and now carry their own reason in the inventory. `pairing-relay-candidate.ts` decorates a PairingCandidateClient with director recovery, so it implements the port rather than calling it; its one chosen method string now comes from hostStatusProbe. `mobile-runtime-capability-negotiation.ts` sends over the physical clients' pre-`connected` authenticated path, which no recording can reach. `runtime-capability-probe.ts` drops to its parameter type alone. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): pin the capability probe's cutover re-ask against the frozen baseline The reply matrix drives every scripted reply, so it already covers a transport rejection at each migrated site. It cannot cover the one signal the probe reads out of a rejection: `isLogicalClientCutoverError` chooses a 250 ms re-ask over the 1 s failure backoff, and no golden made that choice observable. `transport-capability-probe-cutover-reasks-fast` migrates the logical client mid-probe and binds the replacement request at exactly 250 ms, so a re-ask moved in either direction fails the binding rather than recording a different number. The recorded rejection carries `LogicalClientCutoverError`, its `Connection closed` cause and `isRpcDeliveryUnknown`. Recorded from a `git archive` of the pinned baseline with this branch's recorder laid over it, per the recorder README: the migrated tree can no longer satisfy the fence. The same run reproduced the other 241 goldens byte-for-byte. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): read the pairing sends top to bottom Five pairing sites nested `parse(interpret(await request(...)))` three deep with the await innermost, so the send was the last thing a reader found. Bind the reply first and interpret it on its own line, which is the shape main had before the migration. No behaviour change: the request still settles before interpretation and the barrier is unmoved, so no golden shifts. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): make an unlisted native member throw instead of recording undefined Three substitutes were plain object literals standing in for whole modules, so any member the table did not list read as `undefined` rather than failing — the opposite of what the file's own default proxy does, and a silent one: `react-native` alone is requested 354 times across the goldens, and `platformSelect`, `view` and `styleSheet` all read undefined. A recording that reaches an unsubstituted native member is not evidence of anything, because the product on a device would call it. Also drops the `expo-secure-store` substitute, which no recording requests, and corrects the doc's "fails loudly" claim: the throw is real, but `host-app-version-store.ts` catches it and degrades to its unread state, which is what it does on a device too. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): keep one credential hash and only the fixtures someone reads Nine fixture constants and `relayEndpoint` were exported with no reader outside their own module, and `credentialHash` was copied verbatim into both relay adapter modules. The adapter seam forbids one module under `adapters/` from importing a sibling, so the shared form has to live with the fixtures both already import. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record every golden at main's tip Repins `baseline` to 6a11a0b and records all 242 from a detached worktree of that commit with this branch's recorder overlaid, per the README's migration-branch procedure. Two header fields move and nothing else: `baseline`, and `recorderSha256` for the 208 goldens main also carries, because this branch adds `native-mounting-substitutes.ts` and `relay-pairing-fixtures.ts` to the engine and teaches the loader to consult the first. Against the pre-merge tree every one of the 242 is header-only, so no recorded byte moved. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): let the interop marker through the native substitute proxy `import * as ExpoCrypto from 'expo-crypto'` transpiles to an interop helper that reads `__esModule` before copying members, so throwing on it fails the module system's own probe rather than an unsubstituted API read. Four relay families could not record. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): read the substitute through Reflect instead of a cast The changed-code casting gate rejects `key as string`, and the trap has a typed read that needs no assertion. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record for the substitute's typed read `recorderSha256` only; every recorded byte is unchanged from the previous re-record. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): restore main's baseline pin and re-record The merge brought main's pin c6a7216. Repinning it to the branch's own merge-base rewrote the `baseline` header of all 208 pre-existing goldens for no behavioural reason, so put main's pin back and re-record at that commit through a detached baseline worktree with this branch's recorder overlaid. Only `baseline` moved in all 242 goldens; no recorded frame, settlement or sender line changed. Against origin/main the 208 pre-existing goldens now differ in `recorderSha256` alone, which this branch's two added engine files force. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): let a default import of the secret store reach its members The store substitute answered every key with a throwing function, including `__esModule`. TypeScript's `__importDefault` reads that marker and, finding it truthy, binds the default import to the trap's own function instead of the module record, so all five consumers saw `AsyncStorage.getItem` as undefined. A recording that reached `host-app-version-store.ts` failed with `TypeError: AsyncStorage.getItem is not a function` rather than the named `Native store reached during recording: ….getItem`, and an `await import()` of the store rejected on `.then` for the same reason. Both traps now leave the marker undefined, and the doc states that invariant. Also drop `recordingRandomBytes`: its body and the `expo-crypto` substitute's are the same call into the seeded `getRandomValues`, and both relay entry points already default `randomBytes` to `ExpoCrypto.getRandomBytes`, so the two injections were passing the default back to itself. Its orphaned doc comment, left stacked above `credentialHash` by the dedupe commit, goes with it. The new suite does not record, so `recorderSha256` does not pin it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record for the secret-store and randomBytes fixes `recorderSha256` moved in all 242 goldens, and `adapterSha256` in the 10 `relay.credential-rotation` and `relay.direct-upgrade` goldens whose adapter stopped injecting `randomBytes`. Nothing else moved: no recorded frame, settlement, effect or sender line differs, which is the claim that the default the adapter was passing back to itself and the substitute it resolved to were always the same function. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): adopt this branch's recorder digest in main's new goldens Only the 47 goldens #20705 added moved, and only on `recorderSha256`: they carry main's engine digest, and this branch adds two files to the engine. The other 242 came back byte-identical, so the merge changed nothing any of them observed. No recorded frame, settlement, effect or sender line differs anywhere. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): record the pairing race's decision and name its scenarios truthfully The race adapter returned the raw `PairingCandidate`, whose `client` is a live object the recorder cannot serialize, so `captureValue` threw and every pairing-race golden baked an `Unsupported observation: function` unhandled-rejection effect and left the race settlement `pending`. It now settles on `winner.path`, which is the entire decision, and rethrows so the both-refused rejection keeps its identity. `transport-pairing-race-direct-wins` also did not record a tie. The runner flushes after every step, so the two completions can never land in one microtask and the scenario only ever exercised relay completing first. Rather than change the engine to script a simultaneous delivery, the scenario and its checkpoint are renamed to what they record, and a mirror scenario completes direct first. The two matrix checkpoints inherit the base's name, so they follow. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record the merge's headers and the repaired pairing race 66 goldens moved, in four groups: - 51 from #20668, `recorderSha256` only and zero non-header lines: they carry main's engine digest and adopt this branch's. - 10 other `transport-status` goldens, `adapterSha256` only and zero non-header lines: their adapter module changed, their recordings did not. - `transport-pairing-race-relay-wins-when-direct-refused` and the two `matrix-transport.pairing-race-*` goldens: the race settlement is now fulfilled with `'relay'`/`'direct'` instead of pending, and the `Unsupported observation: function` unhandled-rejection effect is gone. The two matrix goldens also move `scenarioSha256`, having inherited the base scenario's renamed checkpoint. - `transport-pairing-race-direct-wins` is renamed to `transport-pairing-race-relay-completes-first`, and `transport-pairing-race-direct-completes-first` is new. `transport-pairing-race-both-refused` did not move: its race rejects, and a rejection was always serializable. `recorderSha256` moved nowhere except in those 51, which is the proof the engine is untouched by this step. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): name the module the throwing-on-call substitute stands in for The paragraph called it "the secret store", which is `expo-secure-store` — not in the table, and handled by the loader's throw-on-read default. The substitute that answers with throwing functions is async storage. This is an engine file, so the next commit re-digests every golden. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-digest every golden for the substitutes doc reword `recorderSha256` in all 341 and nothing else: the reworded paragraph is a comment in an engine file, so it moves the digest without moving a recording. No frame, settlement, effect or sender line differs anywhere. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
#20667 transport, #20668 github PR surface and #20705. Resolved as unions: the adapter register keeps both sides' entries, `pilot-scenarios.json` keeps main's 171 and this branch's 36 for 207 with `baseline` still main's c6a7216, and the 208 pre-existing goldens take main's bytes because this branch re-records them from that same pin anyway. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…aders through typed RpcOperations (stablyai#20668) * test(mobile): record main's github.* PR and diff-review loaders before migrating them Scenarios and goldens for the step-4 `src/session/` first half, recorded against main's unmigrated product code so the migration that follows has a frozen parity oracle instead of an assertion. - 20 scenarios over seven new families: the seven `github.*` PR reads, the twelve PR mutations split by their three reply contracts (`{ok}` envelope, bare boolean, slug-addressed comment edit), the triage createTerminal+send launch, the PR branch-context chain and the review screen's three loaders. - Two new sender-style mount adapters. Both mount exported async functions taking a client, so no React host is needed and the recorded state is each wrapper's own outcome. - 50 new goldens: 20 pilot, 30 reply-matrix sites. `recorderSha256` moved on all 153 existing goldens because the adapters are in the whole-recorder digest; no other line in any of them changed. Text diffs are deliberately unscripted: highlighting one reaches `lowlight`, which the module loader refuses as an unspecified native dependency. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): send the github.* PR surface and the review loaders through RpcOperation The step-4 first half for `src/session/`: eight files, 38 references to the raw request port, all replaced with declared operations. No behaviour change — the 50 goldens recorded in the previous commit do not move, which is the claim. - 21 operations over 21 methods. The seven PR reads keep their defensive parsers as readers; the ten status-envelope mutations share one reader because the `{ok, error}` convention is one host convention, not ten; the two bare-boolean mutations read the payload unchecked because `=== true` is the caller's confirmation rule. - Four second readers, each justified in place: git.status and git.branchCompare for the PR branch context (a refusal costs a fallback, not the screen), git.branchCompare and git.branchDiff for review (the projection is not a superset of the verbatim payload), and worktree.show for the review notes the summary reader drops. - Every failure text is preserved, including the two main kept apart: a refusal with no message falls back to the screen's copy, a transport drop with no message surfaces its empty message verbatim. `sendRaw`'s callers replaced theirs a second time, so those fall back on both paths. - No retry, and no operation reads a dropped reply as a failed mutation: the rejection reaches each wrapper's catch as the original object. - `github-pr-mutations.ts` split along the action/comment seam it already had in its consumers, so no file needs a max-lines bump. Inventory: src/session/ 47 files / 114 references -> 39 / 76. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): record the review snapshot answering its notes leg first The barrier mutation census found one survivor: moving `reviewWorktreeMetadataRead.interpret` inside the `Promise.all` in `loadMobileDiffReviewSnapshot` changed nothing any golden observed. The base scenario answers the branch-base legs before the notes leg, so by the time the notes reply lands the compare leg has already sent `git.branchCompare` and the two orders record the same sender list. This scenario answers the notes leg first, while the compare leg is still resolving its base ref, and checkpoints before the rest. At that checkpoint the barrier is the whole difference: the correct order has nothing settled, the early interpretation has already rejected the action. The mutation now fails it. Recorded from a detached checkout of the previous commit, which carries main's unmigrated product code with this branch's recorder over it, so the parity claim stays non-circular. One new golden; no existing golden moved, because the family base is unchanged and `scenarioSha256` is per golden. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): bind one git.status projection reader, not a copy per domain The branch-context read declared its own `statusProjectionReader` with the same parser, the same 'normalized-status' variant and the same empty salvage as source-control's `gitStatusProjectionReader`, while its doc block claimed "one reader serves both". Export the source-control reader and bind it here so the claim is true; the doc now names the reader and keeps the part that is actually different, which is what a refusal means on each policy. No wire change and no golden moves: the reader is the same function value the copy computed. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): undo the github-pr-mutations split, which max-lines no longer forces The split was made when the migrated file measured 319 lines. It does not any more: `sendRaw`, `sendGithubPrMutation` and `extractMutationError` moved to github-pr-mutation-outcome.ts and the prRepo/headSha allow-lists to github-pr-repo-slug.ts, so the merged file is 293 lines against the 300 limit and oxlint is clean. Nothing imported github-pr-comment-mutations directly — every consumer went through the re-export hub in github-pr-mutations — so the seam bought a reader one extra file to open and nothing else. Merge it back and drop the hub. Product-only: same wrappers, same params, same settle shapes, no golden moves. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): one settleable-operation type for the PR reads and mutations `GitHubPrMutationOperation` and the private `GitHubPrReadOperation` declared the same two members for the same reason: a settle shape needs a bound operation's method and its interpret, nothing else. Keep one, `GitHubPrSettleableOperation`, and import it into the read settle. `extractMutationError` goes back to private, as it was on main; it never had an importer outside its own file. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * docs(mobile): drop the key-order claim from the PR param builder The oracle does not observe param key order: `captureValue` in recording-values.ts sorts keys, and no golden carries a raw frame string, so "the sender recordings pin the bytes" was not a fact the evidence supports. The assertion stays for the reason already in the doc — the builder is method-generic and returns a record. `GitHubPrParamOptions` goes back to private; nothing outside the module names it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): read the bare-boolean mutations with the shared unchecked reader `mutationConfirmationReader` spelled out what `rpcUncheckedPayloadReader` already returns, under the same 'pr-mutation-confirmation' variant that eleven other operations in this tree get from the helper. Same function value, same variant, so no golden moves. The comment explaining why the payload is left unread stays. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): one RpcOperationSender for both domains, not one alias each `MobileSessionRpcSender` and `MobileSourceControlRpcSender` were the same type with the same doc, each derived from whichever operation its domain happened to own. Replace both with `RpcOperationSender` in transport, derived from `settingsRead` there, and name it for what it is: what a bound operation needs to send with. Still derived rather than restated, so no module names the raw request port to accept a client; the port inventory and its ratchet are untouched. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): point the moved PR and diff-review adapters at the seam and register them The merge commit carried the two adapter files into adapters/ with their old specifiers and left the register untouched, so this completes the move: the relative imports climb one more level, and both modules are registered in adapters/mounted-operation-modules.ts as identifiers imported from their own source, which is what adapter-seam.test.ts checks. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record the session goldens against stablyai#20662's adapter seam The merge brought stablyai#20568's per-golden scenario digest and stablyai#20662's per-golden adapter digest, so the 51 goldens this PR owns move on four header fields and nothing else: baseline, goldenFormatVersion, recorderSha256, and the newly added adapterSha256. No recorded byte outside those headers changed. baseline stays at main's own pin c6a7216 rather than moving to 6a11a0b. Repinning rewrites the baseline line in all 208 goldens main owns, which this branch must leave byte-identical. Recording at either commit produces identical bytes everywhere except that one line, so the pin costs no coverage. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…h typed RpcOperations (stablyai#20667) * test(mobile): record the transport pairing and status domain against main Adds seven recording families for `mobile/src/transport/`, recorded from main's unmigrated product code before any refactor: the protocol-gate hook, the retrying capability probe, the pairing candidate race, credential rotation, direct-to-relay upgrade, startup pairing recovery and first pairing. The relay modules build their `defaultDependencies` at module scope, so merely referencing `Platform.OS` or a storage-backed loader threw before an adapter could override it. `native-mounting-substitutes.ts` separates reference from use: react, zod and @noble/hashes are the real libraries, expo-crypto routes through the Web Crypto the scheduler already pins, and the two secret stores throw when called. `baseline` repins to fc525c3 because main's tree no longer matches the pinned 50e752f. All 241 goldens re-recorded; main's 208 move only `baseline` and `recorderSha256`, and no `scenarioSha256` or recording body moves. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): send the transport pairing and status domain through typed RpcOperations Migrates 11 of the 18 raw-port references in `mobile/src/transport/`: the protocol gate, the runtime capability probe, the pairing candidate race, credential rotation, the direct-to-relay upgrade, startup pairing recovery and first pairing. Three operations over three methods, zero new acceptance policies. `status.get` gains a third named policy — `status.transport-probe-or-skip` — because all three transport callers treat a refusal as an absent answer, which is the Tasks create-drawer policy but not the Tasks hydration one; transport cannot import tasks, and the name is what a decode failure reports. `pairing.provisionRelay` and `pairing.getEndpoints` are `require-result-or-throw`, which reuses the same `code: message` text the four call sites each spelled by hand. Three sites read the raw envelope for `method_not_found` before interpreting, because an unknown method means "this build has no relay" rather than "the install failed". Reply parsing stays at the call sites: the readers are unchecked and the zod contract schemas run where they ran before. No wire change and no behaviour change: all 241 goldens replay green and this commit touches none of them. Two files stay on the raw port and now carry their own reason in the inventory. `pairing-relay-candidate.ts` decorates a PairingCandidateClient with director recovery, so it implements the port rather than calling it; its one chosen method string now comes from hostStatusProbe. `mobile-runtime-capability-negotiation.ts` sends over the physical clients' pre-`connected` authenticated path, which no recording can reach. `runtime-capability-probe.ts` drops to its parameter type alone. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): pin the capability probe's cutover re-ask against the frozen baseline The reply matrix drives every scripted reply, so it already covers a transport rejection at each migrated site. It cannot cover the one signal the probe reads out of a rejection: `isLogicalClientCutoverError` chooses a 250 ms re-ask over the 1 s failure backoff, and no golden made that choice observable. `transport-capability-probe-cutover-reasks-fast` migrates the logical client mid-probe and binds the replacement request at exactly 250 ms, so a re-ask moved in either direction fails the binding rather than recording a different number. The recorded rejection carries `LogicalClientCutoverError`, its `Connection closed` cause and `isRpcDeliveryUnknown`. Recorded from a `git archive` of the pinned baseline with this branch's recorder laid over it, per the recorder README: the migrated tree can no longer satisfy the fence. The same run reproduced the other 241 goldens byte-for-byte. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * refactor(mobile): read the pairing sends top to bottom Five pairing sites nested `parse(interpret(await request(...)))` three deep with the await innermost, so the send was the last thing a reader found. Bind the reply first and interpret it on its own line, which is the shape main had before the migration. No behaviour change: the request still settles before interpretation and the barrier is unmoved, so no golden shifts. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): make an unlisted native member throw instead of recording undefined Three substitutes were plain object literals standing in for whole modules, so any member the table did not list read as `undefined` rather than failing — the opposite of what the file's own default proxy does, and a silent one: `react-native` alone is requested 354 times across the goldens, and `platformSelect`, `view` and `styleSheet` all read undefined. A recording that reaches an unsubstituted native member is not evidence of anything, because the product on a device would call it. Also drops the `expo-secure-store` substitute, which no recording requests, and corrects the doc's "fails loudly" claim: the throw is real, but `host-app-version-store.ts` catches it and degrades to its unread state, which is what it does on a device too. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): keep one credential hash and only the fixtures someone reads Nine fixture constants and `relayEndpoint` were exported with no reader outside their own module, and `credentialHash` was copied verbatim into both relay adapter modules. The adapter seam forbids one module under `adapters/` from importing a sibling, so the shared form has to live with the fixtures both already import. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record every golden at main's tip Repins `baseline` to 6a11a0b and records all 242 from a detached worktree of that commit with this branch's recorder overlaid, per the README's migration-branch procedure. Two header fields move and nothing else: `baseline`, and `recorderSha256` for the 208 goldens main also carries, because this branch adds `native-mounting-substitutes.ts` and `relay-pairing-fixtures.ts` to the engine and teaches the loader to consult the first. Against the pre-merge tree every one of the 242 is header-only, so no recorded byte moved. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): let the interop marker through the native substitute proxy `import * as ExpoCrypto from 'expo-crypto'` transpiles to an interop helper that reads `__esModule` before copying members, so throwing on it fails the module system's own probe rather than an unsubstituted API read. Four relay families could not record. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): read the substitute through Reflect instead of a cast The changed-code casting gate rejects `key as string`, and the trap has a typed read that needs no assertion. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record for the substitute's typed read `recorderSha256` only; every recorded byte is unchanged from the previous re-record. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): restore main's baseline pin and re-record The merge brought main's pin c6a7216. Repinning it to the branch's own merge-base rewrote the `baseline` header of all 208 pre-existing goldens for no behavioural reason, so put main's pin back and re-record at that commit through a detached baseline worktree with this branch's recorder overlaid. Only `baseline` moved in all 242 goldens; no recorded frame, settlement or sender line changed. Against origin/main the 208 pre-existing goldens now differ in `recorderSha256` alone, which this branch's two added engine files force. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): let a default import of the secret store reach its members The store substitute answered every key with a throwing function, including `__esModule`. TypeScript's `__importDefault` reads that marker and, finding it truthy, binds the default import to the trap's own function instead of the module record, so all five consumers saw `AsyncStorage.getItem` as undefined. A recording that reached `host-app-version-store.ts` failed with `TypeError: AsyncStorage.getItem is not a function` rather than the named `Native store reached during recording: ….getItem`, and an `await import()` of the store rejected on `.then` for the same reason. Both traps now leave the marker undefined, and the doc states that invariant. Also drop `recordingRandomBytes`: its body and the `expo-crypto` substitute's are the same call into the seeded `getRandomValues`, and both relay entry points already default `randomBytes` to `ExpoCrypto.getRandomBytes`, so the two injections were passing the default back to itself. Its orphaned doc comment, left stacked above `credentialHash` by the dedupe commit, goes with it. The new suite does not record, so `recorderSha256` does not pin it. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record for the secret-store and randomBytes fixes `recorderSha256` moved in all 242 goldens, and `adapterSha256` in the 10 `relay.credential-rotation` and `relay.direct-upgrade` goldens whose adapter stopped injecting `randomBytes`. Nothing else moved: no recorded frame, settlement, effect or sender line differs, which is the claim that the default the adapter was passing back to itself and the substitute it resolved to were always the same function. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): adopt this branch's recorder digest in main's new goldens Only the 47 goldens stablyai#20705 added moved, and only on `recorderSha256`: they carry main's engine digest, and this branch adds two files to the engine. The other 242 came back byte-identical, so the merge changed nothing any of them observed. No recorded frame, settlement, effect or sender line differs anywhere. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): record the pairing race's decision and name its scenarios truthfully The race adapter returned the raw `PairingCandidate`, whose `client` is a live object the recorder cannot serialize, so `captureValue` threw and every pairing-race golden baked an `Unsupported observation: function` unhandled-rejection effect and left the race settlement `pending`. It now settles on `winner.path`, which is the entire decision, and rethrows so the both-refused rejection keeps its identity. `transport-pairing-race-direct-wins` also did not record a tie. The runner flushes after every step, so the two completions can never land in one microtask and the scenario only ever exercised relay completing first. Rather than change the engine to script a simultaneous delivery, the scenario and its checkpoint are renamed to what they record, and a mirror scenario completes direct first. The two matrix checkpoints inherit the base's name, so they follow. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-record the merge's headers and the repaired pairing race 66 goldens moved, in four groups: - 51 from stablyai#20668, `recorderSha256` only and zero non-header lines: they carry main's engine digest and adopt this branch's. - 10 other `transport-status` goldens, `adapterSha256` only and zero non-header lines: their adapter module changed, their recordings did not. - `transport-pairing-race-relay-wins-when-direct-refused` and the two `matrix-transport.pairing-race-*` goldens: the race settlement is now fulfilled with `'relay'`/`'direct'` instead of pending, and the `Unsupported observation: function` unhandled-rejection effect is gone. The two matrix goldens also move `scenarioSha256`, having inherited the base scenario's renamed checkpoint. - `transport-pairing-race-direct-wins` is renamed to `transport-pairing-race-relay-completes-first`, and `transport-pairing-race-direct-completes-first` is new. `transport-pairing-race-both-refused` did not move: its race rejects, and a rejection was always serializable. `recorderSha256` moved nowhere except in those 51, which is the proof the engine is untouched by this step. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): name the module the throwing-on-call substitute stands in for The paragraph called it "the secret store", which is `expo-secure-store` — not in the table, and handled by the loader's throw-on-read default. The substitute that answers with throwing functions is async storage. This is an engine file, so the next commit re-digests every golden. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb * test(mobile): re-digest every golden for the substitutes doc reword `recorderSha256` in all 341 and nothing else: the reworded paragraph is a comment in an engine file, so it moves the digest without moving a recording. No frame, settlement, effect or sender line differs anywhere. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

Diff composition (head
039d89260a, vs merge-base with main)The line count is almost entirely recorded golden JSON, not code. Product source is the small row.
recorderSha256header line moved; zero body lines changed (verified with the inert-proof diff in the sections below)pilot-scenarios.json.test.tsfiles andmobile/src/test-support/rpc-recording/adaptersmobile/srcnon-test filesWhat
Step 4,
sessiondomain, first half: the GitHub PR surface and the diff-review loaders inmobile/src/session/move onto typedRpcOperations. 27 operations over 26 methods (git.branchCompareis the only method with two operations inside this PR), 14 readers, zero new acceptance policies. Commit6f845d182f's message says "21 operations over 21 methods"; that count was wrong and this body is authoritative.In this PR:
github-pr-rpc.ts(9 refs),github-pr-mutations.ts(16; the migration shrank it, since the send/settle helpers moved togithub-pr-mutation-outcome.tsand the allow-list togithub-pr-repo-slug.ts, so no split was needed),pr-ai-triage-launch.ts(3),use-mobile-pr-branch-context.ts(2),mobile-diff-review-loaders.ts(5), and the three PR hooks whose only reference was aPick<RpcClient, 'sendRequest'>annotation (3).Second half, not here: the remaining 39 files / 76 refs, including the five diff-review and session React hooks. Those import
expo-haptics,expo-clipboardandreact-native, which the recorder's module loader refuses by design; recording them first needs new adapter capability, which does not belong inside a migration PR.Reply parsing stays where it was (step 7): readers return
unknownviarpcUncheckedPayloadReader.Inventory
src/session/: 47 files / 114 refs → 39 files / 76 refs.Evidence
Oracle parity. Commit 1 records 20 scenarios and 50 goldens against main's product code with two sender-style adapters; commit 2 is product only and
git show --statcontains norpc-foundation/goldenspath; commit 3 adds one scenario, recorded from a detached checkout of the baseline, that closes a barrier hole the census found. The recording suite replays 258 green on the migrated tree.Mutation census, each applied / run / reverted:
The barrier survivor is an equivalent mutant: moving the
isMobileGitUnavailableread into the catch commutes, because the reader is total sointerpretthrows exactly when!reply.ok. Control: deleting that read outright kills 2 goldens, so the site is observed. The delivery-unknown check coverssession.tabs.createTerminalandterminal.send, where 32 goldens recordisRpcDeliveryUnknownon the propagated rejection.Reply matrix. All seven new families matrixed;
family-recordings.test.tsandderived-goldens.test.tsgreen.Judgement calls for review
git.branchCompare,git.branchDiff,worktree.show— each justified at its definition inmobile-diff-review-operations.ts: the incumbents return the payload verbatim asunknownor drop the review notes, so these are different shapes, not different names.git.statusbinds source-control'sgitStatusProjectionReaderdirectly (a duplicate the first review caught is gone).{ ok, error }is one host convention.githubPrRequestParamsholds the PR's one type assertion: the params builder is method-generic and returns a record, so per-call literals would mean one assertion per wrapper instead of one here. (An earlier claim that the recordings pin param key order was wrong: the recorder sorts keys before capture, so no golden observes order.)errorobject throws a TypeError where main fell back to a string. The wire type forbids it, the inbound shape gate drops such frames, and no matrix partition produces it. Ticket.Measurements
73 min start to green · 27 ops / 14 readers / 0 new policies · goldens 153 → 204 (30 matrix, 21 pilot), 3.0 MB → 4.9 MB.
Branched from
50e752fc66(pre-#20568); adapters are placed where main had them. This branch merges main and re-records once when #20662 (adapter digest) lands.Review round 1
Three deletions applied (
cda6c002a1,6fb2aaa19f,12cee87077; +142/−173, one fewer file, zero goldens): the duplicatedgit.statusreader, thegithub-pr-mutations.tssplit (293 lines merged, under the 300 limit; zero importers of the comment module existed), and two exports with no importer, one of which duplicated a private type and is now the singleGitHubPrSettleableOperation.Review round 2
Ship as-is; four deletions applied (
ab20f4ffe6,7eb4a7825b,467606554a; zero goldens): the false key-order justification, a dead export, a five-line reader replaced byrpcUncheckedPayloadReader('pr-mutation-confirmation'), and the two per-domain sender aliases replaced by oneRpcOperationSenderinmobile/src/transport/rpc-operation-sender.ts, derived from an operation so no module names the raw port to accept a client. That last commit touches ten pilot files undermobile/src/source-control/for the alias rename and import line only; the port-inventory ratchet is unchanged.Gates
pnpm --dir mobile typecheckclean ·pnpm --dir mobile test581 files, 5017 passed / 6 skipped ·pnpm tcclean ·check:code-quality:changed0 over 30 files ·check:react-doctor:changedclean ·oxfmt --check .frommobile/clean ·oxlinton changed files clean.After #20662 landed (2026-09-15)
Merged main (
116a3f678b), moved the PR-surface and diff-review adapters intoadapters/and registered them (4e8323923d), re-recorded the 51 session goldens at main's pinc6a72169843e(6944d2b20a). Against main: 51 goldens added, 0 modified; no recorder engine file touched. Against the pre-merge head the 51 moved on header fields only (baseline,goldenFormatVersion,recorderSha256, newadapterSha256;scenarioSha256unchanged). Recording suite 325 passed; full mobile suite 5096 passed, 6 skipped; all gates green.