Skip to content

test(mobile): record the real worktree catalog snapshot result in the RPC recorder - #20873

Merged
Jinwoo-H merged 6 commits into
mainfrom
fix-wt-catalog-adapter
Sep 15, 2026
Merged

Jinwoo-H merged 6 commits into
mainfrom
fix-wt-catalog-adapter

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​79 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​79
Prod 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​80 $\color{#cf222e}{\Huge{\mathbf{−}}}$​34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46

Test infra only. No product source changes.

Diff composition (head ea3b3511d4, vs main)

Part Files Added Deleted What it is
Goldens, re-recorded 2 +77 -32 worktree-catalog-snapshot and its reply matrix: the fetch settlement now records the real result instead of pending, and the baked unhandled-rejection effect is gone
Goldens, header re-digest 4 +4 -4 Same adapter module, adapterSha256 only; zero body lines
Recorder adapter 1 +2 -1 adapters/worktree-catalog-mount-adapters.ts
Gate test 1 +79 0 golden-recorder-failure-absence.test.ts: fails the suite if any golden carries an unhandled-rejection effect or a recorder refusal text; non-driver, so recorderSha256 is untouched
Product source 0 0 0

What

The worktree.catalog-snapshot recording adapter returned the raw WorktreeCatalogFetchResult, which nests the live client under pending.client. The recorder's captureValue rejects function members, so both goldens for that operation recorded an unhandled-rejection effect carrying Unsupported observation: function and left the action's settlement pending forever. They proved less than their names claim: every reply partition whose result carries the pending catalog (the accepted and invalid-shape ones) recorded the same pending settlement, so the matrix could not tell those partitions apart. The request_failed and rejected partitions carry no client and were already recorded correctly.

The action now returns projectObservable(result). state() is unchanged; rejections still propagate, so both transport-rejection partitions keep their recorded errors. Same fix as #20667 applied to the pairing-race adapter.

Evidence

  • All 36 adapter files checked: every action return traced to its product function's declared result type. WorktreeCatalogFetchResult is the only result type in mobile that transitively carries a client. The other client-carrying types (HostClientStoreEntry, MobileHomeClientEntry, PendingFileDiff, LoadedHostStatusGates) are never returned by an adapter action.
  • Re-recorded from a detached worktree at main's pin c6a72169843e, no baseline repin, recorderSha256 unchanged on every golden (engine untouched).
  • grep -l 'Unsupported observation' mobile/rpc-foundation/goldens/*.json is empty.
  • The matrix golden now discriminates every partition: the full admission and each invalid-shape variant record their own projected result instead of one shared pending settlement.
  • Lead-reproduced: 6 M / 0 A / 0 D vs main, recorderSha256 moved on 0 goldens, recording suite 12 files / 579 passed, pnpm tc clean.

Gates

ORCA_BACKGROUND_LAUNCH=1 on mobile typecheck, mobile test (5350 passed, 6 skipped), pnpm tc, check:code-quality:changed, check:react-doctor:changed, oxfmt --check . from mobile/, oxlint on the changed file: all clean.

Review round 1 (2026-09-15)

Ship as-is. Verified independently: the two re-recorded goldens change only the fetch settlement and the effects list; the four others are adapterSha256-only; across all 509 goldens, Unsupported observation / unhandled-rejection appears in exactly the two fixed here at the merge base and in zero at head; sampled the transport, diff-review, host-screen and home adapters and none returns a client-carrying value; projectObservable is byte-identical to what state() already recorded, and a narrower projection would lose the fields that discriminate the matrix partitions. Corrected two over-precise partition counts in this body. One pre-existing gap accepted into this PR: a projection failure is recorded as data instead of failing the run, so the class re-lands silently on a revert plus re-record; added as 547cf9d8b4: golden-recorder-failure-absence.test.ts walks every golden through readGolden, fails on any unhandled-rejection effect or either recorder refusal text, opens with a positive control so a detector typo cannot make it vacuous, and asserts a non-empty golden set. Lead-reproduced: passes at head; restoring main's two broken goldens fails it with 14 findings; one recorderSha256 value across all 509 goldens.

Review round 2 (2026-09-15, fresh reviewer)

Ship after one deletion, applied as ea3b3511d4. The gate's detachedRejection detector was redundant (the refusal-text detector alone catches all 7 checkpoints of the real regression) and contradicted the README, which documents detached-rejection capture as the deliberate way to pin a real main bug in a golden. The gate now bans only the recorder's own refusal texts; the positive control seeds the shape both real defects took. Reviewer recomputed recorderSha256 at head and matched the value all 509 goldens carry; classified every changed golden line mechanically with empty residue. Lead-reproduced after the narrowing: passes at head, fails with 7 findings when main's two broken goldens are restored, tree clean.

`worktree.catalog-snapshot`'s action returned `WorktreeCatalogSnapshotClient.fetch`'s
raw result. That value nests the live `RpcClient` under `pending.client`, so
`captureValue` threw `Unsupported observation: function`: both goldens baked an
`unhandled-rejection` effect and left the action's settlement `pending`, proving
nothing about what the fetch returns.

Project the result through `projectObservable` on the settlement path, the same
way `state()` already shows it and the same way #20667 fixed
`transport.pairing-race`. Rejections still propagate unchanged, so the two
transport-rejection matrix partitions keep their recorded errors.

The matrix golden now discriminates all eleven reply partitions: a full
admission, six invalid ones, three `request_failed` codes and two rejections.
`recorderSha256` does not move; `adapterSha256` moves on the six goldens mounted
through this adapter module, four of which have no other change.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 20f06f54-48f2-4dd8-924a-22c5d934f5aa

📥 Commits

Reviewing files that changed from the base of the PR and between ea3b351 and 0e63004.

📒 Files selected for processing (6)
  • mobile/rpc-foundation/goldens/matrix-worktree.catalog-snapshot-worktree.ps-1.json
  • mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json
  • mobile/rpc-foundation/goldens/matrix-worktree.retired-names-worktree.listretirednames-1.json
  • mobile/rpc-foundation/goldens/worktree-catalog-snapshot.json
  • mobile/rpc-foundation/goldens/worktree-home-catalog.json
  • mobile/rpc-foundation/goldens/worktree-retired-names.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • mobile/rpc-foundation/goldens/matrix-worktree.retired-names-worktree.listretirednames-1.json
  • mobile/rpc-foundation/goldens/worktree-home-catalog.json
  • mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The snapshot fetch action now returns projectObservable(result). Golden recordings now capture fulfilled responses for worktree admissions and remove prior unhandled-rejection effects. Settled checkpoints reference the new settlements. Affected fixtures update their adapterSha256 values. A regression test checks all golden recordings for projection refusals.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 0e630

The updated recordings and regression gate preserve detection of projection refusals, including refusal text recorded in effects. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides strong technical detail about the change, rationale, evidence, testing, and review. However, it does not follow the required template structure and omits required information,… Update the description to include all required template sections. Add an issue reference using Fixes #..., or explain the applicable linked issue. Add ## Visual Proof with exactly N/A and a brief reason because this is not a UI or int…
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: recording the real worktree catalog snapshot result in the mobile RPC recorder.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides strong technical detail about the change, rationale, evidence, testing, and review. However, it does not follow the required template structure and omits required information, including a Linked Issue with a Fixes reference, Visual Proof marked N/A with a reason, the Agent skill upstream boundary section, Notes, and the Checklist. It also does not clearly provide the required ELI5 and AI Disclosure sections.

Resolution

Update the description to include all required template sections. Add an issue reference using Fixes #..., or explain the applicable linked issue. Add ## Visual Proof with exactly N/A and a brief reason because this is not a UI or interaction change. Add the Agent skill upstream boundary section and select the applicable option. Add Notes and complete the Checklist. Add concise ELI5 and AI Disclosure sections as applicable.

Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Verified all seven files of the diff, then re-recorded the touched goldens locally — every one of the five catalog-snapshot goldens compares clean against a fresh recording.

  • Recorder adapter returns an observable value — worktree.catalog-snapshot returns projectObservable(result) instead of the raw WorktreeCatalogFetchResult, whose pending.client is a live RpcClient. admit() still runs against the raw result, so admission and its client-identity comparison are unchanged.
  • worktree-catalog-snapshot and its reply matrix re-recorded — the fetch settlement goes from an eternal pending plus an unhandled-rejection effect to the real fulfilled result; the matrix now discriminates the full / invalid / request_failed / rejection partitions instead of collapsing them onto one pending settlement.
  • Four header-only re-digests — adapterSha256 only, since all six goldens of the family mount the one edited adapter; recorderSha256 and baseline are untouched.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…failure

A projection refusal settles as data, not as a failed run: `captureValue` throws
inside the action, the recorder captures it as an `unhandled-rejection` effect,
and `--record` writes a green golden whose action never settled. The class has
landed twice — `transport.pairing-race` in #20667 and `worktree.catalog-snapshot`
in the previous commit — and reverting either one plus a re-record would go green
with the broken golden back.

Read every golden and fail on an `unhandled-rejection` effect or on either of
`captureValue`'s refusal texts in any observation field. A positive control in the
same case asserts both detectors fire, so the absence claim is load-bearing rather
than vacuous.

Not a recording driver, so `recorderSha256` excludes it and no golden moves.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Re-reviewed the one commit added since the prior review (547cf9d8b4): a golden-corpus gate for recorder refusals. The adapter fix and its re-recorded goldens were covered in the prior review.

  • Added golden-recorder-failure-absence.test.ts — walks every golden through readGolden and fails on any golden carrying an unhandled-rejection effect or a captureValue refusal string in any observation field, with a seeded positive control that asserts both detectors fire before the corpus scan, plus non-empty golden-set and multi-checkpoint assertions to keep the corpus scan non-vacuous.

Verified independently: mobile/vitest.config.ts collects the file (src/**/*.test.ts); it passes at head and fails with four findings against a crafted golden carrying both refusal shapes; recorderSha256 is untouched because the new non-driver .test.ts is excluded by recorder-digest.ts's skippedTest, matching the unchanged headers on disk.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…t bugs

The gate also failed on any effect named `unhandled-rejection`, which bans a real
observation: detached-rejection capture exists to pin a main bug in a golden, and
`unhandled-recording.test.ts` pins the capture precisely because no golden carries
one today. Banning the name would make recording a genuine product failure a test
failure.

Drop that detector. `refusalText` alone catches all seven checkpoints of the
worktree-catalog regression, because the refusal is the message of the captured
error rather than the effect's name. The positive control now seeds that shape —
the refusal inside a recorded error under `effects` — so the surviving detector is
still proven to fire. Vacuity guards on golden and checkpoint counts are unchanged.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Re-reviewed the one commit added since the prior pullfrog review (ea3b3511d4): the failure-absence gate now bans only the recorder's own refusal texts.

  • Dropped the unhandled-rejection detector from the gate — the detachedRejection helper and its assertion are gone; the gate now fails only on a captureValue refusal string in any observation field. A detached rejection is deliberately recordable (the README documents it as how a real main bug was pinned, and unhandled-recording.test.ts pins the capture), so banning it contradicted the corpus's sanctioned use.
  • Re-seeded the positive control to carry the refusal string inside the recorded effect's value.message, the shape both real defects took, so it now exercises the refusal-text detector on the exact path the corpus scan uses.

Verified independently: the narrowed detector alone still catches the real regression — restoring main's two broken goldens fails the gate with 7 findings, all …effects: recorder refused to project a value; golden-recorder-failure-absence.test.ts and unhandled-recording.test.ts pass at head; the two refusal strings appear only at captureValue's throw sites and in this gate.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

# Conflicts:
#	mobile/rpc-foundation/goldens/matrix-worktree.catalog-snapshot-worktree.ps-1.json
#	mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json
#	mobile/rpc-foundation/goldens/matrix-worktree.retired-names-worktree.listretirednames-1.json
#	mobile/rpc-foundation/goldens/worktree-catalog-snapshot.json
#	mobile/rpc-foundation/goldens/worktree-home-catalog.json
#	mobile/rpc-foundation/goldens/worktree-retired-names.json
…'s engine digest

#20874 re-digested `recorderSha256` on all 509 goldens, so the six goldens mounted
through the worktree catalog adapter had to be recorded again from the pin rather
than merged. Bodies and `adapterSha256` are unchanged from the pre-merge recording.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@Jinwoo-H
Jinwoo-H merged commit 0056161 into main Sep 15, 2026
22 checks passed
Jinwoo-H added a commit that referenced this pull request Sep 15, 2026
Main landed #20873 (0056161) while the first merge was in flight: the
worktree catalog adapter now records the real snapshot result, and
`golden-recorder-failure-absence.test.ts` fails any golden that carries a
recorder refusal. Merged clean; the re-record that follows is taken over this
adapter so the catalog goldens keep main's observation.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Jinwoo-H added a commit that referenced this pull request Sep 15, 2026
One record from a detached worktree at `e7206f62a8` — main's pin since #20895 —
with this branch's `rpc-recording/`, `pilot-scenarios.json` and
`scripts/rpc-recording.mts` laid over it, so the goldens are recorded against
main's product tree rather than a branch that edits the engine.

All 520 goldens now share one `recorderSha256`
(`0ddc0dc472e2efbe58004c6dfaf5360e368fed321e40dfe15c11a9ad1817dea4`) and one
`baseline`. Against main, 262 move on the header alone and 247 also gain the
`sent` ordinal on an effect, which is the whole of the body change; the nine
goldens #20895 re-digested carry a byte-identical body, and the six the new
worktree catalog adapter (#20873) recorded keep main's observation.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Jinwoo-H added a commit that referenced this pull request Sep 15, 2026
…tate in the RPC recorder (#20884)

* test(mobile): mount screens, declared device stores and declared OS state in the RPC recorder

Three recorder capabilities, each with a test, plus four holdout sites recorded against main's
product code to prove them. No product source changes.

- JSX compiles through the automatic runtime, which is what product sources use; the classic
  `React.createElement` emit threw `React is not defined` on the first render of every screen.
- An unlisted package answers `__esModule` as undefined, so a default import loads and the refusal
  defers to the first real member read instead of killing the module at load.
- The substitutes table gains the inert view packages a screen needs, split into
  `screen-native-substitutes.ts` behind the same rule: only what a screen reads is listed.
- A scenario may declare `deviceStore` and `deviceState.notificationTray`. Reads resolve the
  declaration or null and never a write; writes are recorded as effects. Undeclared is unchanged.
- `screenMount` mounts a component with a crash boundary, so a reply partition that takes a screen
  down is a recording rather than a suite failure.

Every pre-existing golden re-records byte-identical except `recorderSha256`, recorded from a
detached worktree at the pinned baseline.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): declare the crash boundary's state type instead of asserting it

The changed-code casting gate counts `null as string | null` as a type assertion. Re-records every
golden from the pinned baseline, because the edit moves `recorderSha256`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): refuse an unlisted native package by the member a mount reads

Both emitted interop helpers short-circuit on `__esModule`, so answering `true`
hands the refusing trap back unwrapped to `__importDefault` and `__importStar`.
All three import forms now load the importer and throw the named refusal at the
first member read, instead of a namespace import silently yielding `undefined`
and failing later at the call.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): run a task deferred past interactions instead of dropping it

An inert `runAfterInteractions` swallows whatever send the screen deferred, and
the recording then claims the screen sends nothing. It runs the task on a
microtask and returns the RN-shaped handle, so a cancel before the task runs
still prevents it. `Alert.alert` stays inert.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden for the two recorder engine changes

Only `recorderSha256` moves, from c58067de to a59b30e7. Recorded from a detached
worktree at the pinned baseline c6a7216 with this branch's recorder and
scenario file overlaid, so no golden body is a claim about migrated source.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): stop exporting three recorder symbols with no importer

`projectScreenTree`, `DeviceEffect` and `DeclaredNotification` are only used by
the file that declares them.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden for the dropped exports

Only `recorderSha256` moves, from a59b30e7 to 4df43aef. Recorded from a detached
worktree at the pinned baseline c6a7216 with this branch's recorder and
scenario file overlaid.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): list only the native members a recording is known to read

Instrumenting `partialNativeModule` across all 522 recordings found 68 declared
members and 23 read. The unread ones are gone: the whole react-native-svg,
react-native-reanimated and react-native-gesture-handler entries, two expo-router
hooks, and twelve react-native members including `InteractionManager` and
`Alert`. A member listed before a recording reads it turns a refusal that would
have forced a decision into a silent stand-in, which is how an inert scheduler
swallows a deferred send. Wave 3 re-adds each one with the recording that reads
it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): order each effect against the sends with a send count

Sender and effects are two independent lists, so a send reordered ahead of a
device write moved neither. Scheduling the codex journal write on a timer instead
of awaiting it left all 520 goldens byte-identical; with `sent` it moves two.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): report a boundary crash through the effect sink

A hook mount projects the hook's own value and never a crash, so an adapter that
never reads `crash()` recorded a screen that quietly stopped rendering. The
boundary now reports to the effect sink as well, which forces a cleanup
checkpoint and puts the crash in the golden with no adapter cooperation. Two
reply-matrix goldens gain the effect. Also folds the two near-identical tree
walkers into one `walk(tree, visit)`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): state the __esModule interop rule once

It was restated at four sites with four different answers. The canonical
paragraph is in `native-module-traps.ts`; the loader and the declared tray point
at it in a line. The loader comment also said the refusal names the member the
product read, which for a default import is `.default` instead.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record for the send ordinal, the crash effect and the pruned table

`recorderSha256` moves on all 520. Of the 509 pre-existing goldens, 260 are
header-only and 249 gain `sent` on their effects and nothing else; two of this
branch's own reply-matrix goldens also gain a `screen.crash` effect. Recorded
from a detached worktree at the pinned baseline c6a7216.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* fix(lint): drop Reflect.get from the native traps

main adopted anti-slop's `no-reflect-get` in #20874 and fixed the copy that lived
in `native-mounting-substitutes.ts`. This branch moved both traps into
`native-module-traps.ts`, so the rule lands here instead and the static-analysis
gate is red without the same narrowing.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record for the Reflect.get narrowing

`recorderSha256` only, 8ca81bc6 to 0ddc0dc4. No golden body moves, which is the
claim the narrowing makes: the trap reads the same member it always did.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden at main's new baseline pin

One record from a detached worktree at `e7206f62a8` — main's pin since #20895 —
with this branch's `rpc-recording/`, `pilot-scenarios.json` and
`scripts/rpc-recording.mts` laid over it, so the goldens are recorded against
main's product tree rather than a branch that edits the engine.

All 520 goldens now share one `recorderSha256`
(`0ddc0dc472e2efbe58004c6dfaf5360e368fed321e40dfe15c11a9ad1817dea4`) and one
`baseline`. Against main, 262 move on the header alone and 247 also gain the
`sent` ordinal on an effect, which is the whole of the body change; the nine
goldens #20895 re-digested carry a byte-identical body, and the six the new
worktree catalog adapter (#20873) recorded keep main's observation.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
… RPC recorder (stablyai#20873)

* test(rpc-recording): record the real worktree catalog snapshot result

`worktree.catalog-snapshot`'s action returned `WorktreeCatalogSnapshotClient.fetch`'s
raw result. That value nests the live `RpcClient` under `pending.client`, so
`captureValue` threw `Unsupported observation: function`: both goldens baked an
`unhandled-rejection` effect and left the action's settlement `pending`, proving
nothing about what the fetch returns.

Project the result through `projectObservable` on the settlement path, the same
way `state()` already shows it and the same way stablyai#20667 fixed
`transport.pairing-race`. Rejections still propagate unchanged, so the two
transport-rejection matrix partitions keep their recorded errors.

The matrix golden now discriminates all eleven reply partitions: a full
admission, six invalid ones, three `request_failed` codes and two rejections.
`recorderSha256` does not move; `adapterSha256` moves on the six goldens mounted
through this adapter module, four of which have no other change.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(rpc-recording): fail the suite when a golden records a recorder failure

A projection refusal settles as data, not as a failed run: `captureValue` throws
inside the action, the recorder captures it as an `unhandled-rejection` effect,
and `--record` writes a green golden whose action never settled. The class has
landed twice — `transport.pairing-race` in stablyai#20667 and `worktree.catalog-snapshot`
in the previous commit — and reverting either one plus a re-record would go green
with the broken golden back.

Read every golden and fail on an `unhandled-rejection` effect or on either of
`captureValue`'s refusal texts in any observation field. A positive control in the
same case asserts both detectors fire, so the absence claim is load-bearing rather
than vacuous.

Not a recording driver, so `recorderSha256` excludes it and no golden moves.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(rpc-recording): ban only the recorder's own refusals, not product bugs

The gate also failed on any effect named `unhandled-rejection`, which bans a real
observation: detached-rejection capture exists to pin a main bug in a golden, and
`unhandled-recording.test.ts` pins the capture precisely because no golden carries
one today. Banning the name would make recording a genuine product failure a test
failure.

Drop that detector. `refusalText` alone catches all seven checkpoints of the
worktree-catalog regression, because the refusal is the message of the captured
error rather than the effect's name. The positive control now seeds that shape —
the refusal inside a recorded error under `effects` — so the surviving detector is
still proven to fire. Vacuity guards on golden and checkpoint counts are unchanged.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(rpc-recording): re-record the worktree catalog goldens over main's engine digest

stablyai#20874 re-digested `recorderSha256` on all 509 goldens, so the six goldens mounted
through the worktree catalog adapter had to be recorded again from the pin rather
than merged. Bodies and `adapterSha256` are unchanged from the pre-merge recording.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…tate in the RPC recorder (stablyai#20884)

* test(mobile): mount screens, declared device stores and declared OS state in the RPC recorder

Three recorder capabilities, each with a test, plus four holdout sites recorded against main's
product code to prove them. No product source changes.

- JSX compiles through the automatic runtime, which is what product sources use; the classic
  `React.createElement` emit threw `React is not defined` on the first render of every screen.
- An unlisted package answers `__esModule` as undefined, so a default import loads and the refusal
  defers to the first real member read instead of killing the module at load.
- The substitutes table gains the inert view packages a screen needs, split into
  `screen-native-substitutes.ts` behind the same rule: only what a screen reads is listed.
- A scenario may declare `deviceStore` and `deviceState.notificationTray`. Reads resolve the
  declaration or null and never a write; writes are recorded as effects. Undeclared is unchanged.
- `screenMount` mounts a component with a crash boundary, so a reply partition that takes a screen
  down is a recording rather than a suite failure.

Every pre-existing golden re-records byte-identical except `recorderSha256`, recorded from a
detached worktree at the pinned baseline.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): declare the crash boundary's state type instead of asserting it

The changed-code casting gate counts `null as string | null` as a type assertion. Re-records every
golden from the pinned baseline, because the edit moves `recorderSha256`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): refuse an unlisted native package by the member a mount reads

Both emitted interop helpers short-circuit on `__esModule`, so answering `true`
hands the refusing trap back unwrapped to `__importDefault` and `__importStar`.
All three import forms now load the importer and throw the named refusal at the
first member read, instead of a namespace import silently yielding `undefined`
and failing later at the call.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): run a task deferred past interactions instead of dropping it

An inert `runAfterInteractions` swallows whatever send the screen deferred, and
the recording then claims the screen sends nothing. It runs the task on a
microtask and returns the RN-shaped handle, so a cancel before the task runs
still prevents it. `Alert.alert` stays inert.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden for the two recorder engine changes

Only `recorderSha256` moves, from c58067de to a59b30e7. Recorded from a detached
worktree at the pinned baseline c6a7216 with this branch's recorder and
scenario file overlaid, so no golden body is a claim about migrated source.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): stop exporting three recorder symbols with no importer

`projectScreenTree`, `DeviceEffect` and `DeclaredNotification` are only used by
the file that declares them.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden for the dropped exports

Only `recorderSha256` moves, from a59b30e7 to 4df43aef. Recorded from a detached
worktree at the pinned baseline c6a7216 with this branch's recorder and
scenario file overlaid.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): list only the native members a recording is known to read

Instrumenting `partialNativeModule` across all 522 recordings found 68 declared
members and 23 read. The unread ones are gone: the whole react-native-svg,
react-native-reanimated and react-native-gesture-handler entries, two expo-router
hooks, and twelve react-native members including `InteractionManager` and
`Alert`. A member listed before a recording reads it turns a refusal that would
have forced a decision into a silent stand-in, which is how an inert scheduler
swallows a deferred send. Wave 3 re-adds each one with the recording that reads
it.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): order each effect against the sends with a send count

Sender and effects are two independent lists, so a send reordered ahead of a
device write moved neither. Scheduling the codex journal write on a timer instead
of awaiting it left all 520 goldens byte-identical; with `sent` it moves two.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): report a boundary crash through the effect sink

A hook mount projects the hook's own value and never a crash, so an adapter that
never reads `crash()` recorded a screen that quietly stopped rendering. The
boundary now reports to the effect sink as well, which forces a cleanup
checkpoint and puts the crash in the golden with no adapter cooperation. Two
reply-matrix goldens gain the effect. Also folds the two near-identical tree
walkers into one `walk(tree, visit)`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): state the __esModule interop rule once

It was restated at four sites with four different answers. The canonical
paragraph is in `native-module-traps.ts`; the loader and the declared tray point
at it in a line. The loader comment also said the refusal names the member the
product read, which for a default import is `.default` instead.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record for the send ordinal, the crash effect and the pruned table

`recorderSha256` moves on all 520. Of the 509 pre-existing goldens, 260 are
header-only and 249 gain `sent` on their effects and nothing else; two of this
branch's own reply-matrix goldens also gain a `screen.crash` effect. Recorded
from a detached worktree at the pinned baseline c6a7216.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* fix(lint): drop Reflect.get from the native traps

main adopted anti-slop's `no-reflect-get` in stablyai#20874 and fixed the copy that lived
in `native-mounting-substitutes.ts`. This branch moved both traps into
`native-module-traps.ts`, so the rule lands here instead and the static-analysis
gate is red without the same narrowing.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record for the Reflect.get narrowing

`recorderSha256` only, 8ca81bc6 to 0ddc0dc4. No golden body moves, which is the
claim the narrowing makes: the trap reads the same member it always did.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

* test(mobile): re-record every golden at main's new baseline pin

One record from a detached worktree at `e7206f62a8` — main's pin since stablyai#20895 —
with this branch's `rpc-recording/`, `pilot-scenarios.json` and
`scripts/rpc-recording.mts` laid over it, so the goldens are recorded against
main's product tree rather than a branch that edits the engine.

All 520 goldens now share one `recorderSha256`
(`0ddc0dc472e2efbe58004c6dfaf5360e368fed321e40dfe15c11a9ad1817dea4`) and one
`baseline`. Against main, 262 move on the header alone and 247 also gain the
`sent` ordinal on an effect, which is the whole of the body change; the nine
goldens stablyai#20895 re-digested carry a byte-identical body, and the six the new
worktree catalog adapter (stablyai#20873) recorded keep main's observation.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant