Repository navigation
Conversation
Add scripted sender recordings, guarded main goldens, reply matrices, lifecycle schedules, settings caller fixtures, and targeted B-seed mutants. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Keep lifecycle updates in separate act boundaries while wrapping direct stateful user actions. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Use the same trusted-source execution boundary as existing mobile VM test harnesses. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Important
Resolve the golden encoding before merge. The runner itself is in good shape — this is test infrastructure with no product-code changes, strong determinism evidence, and a clean mutant-kill story — but 18 MB of permanent history (one 6.7 MB file) deserves a decision now, before step 4 multiplies it.
Reviewed changes
- Recording runner —
runRecordingdrives real main hooks/operations through a scriptedsendRequesttransport, freezing per-checkpoint sender calls, payloads, settlements, projected state, and effects. - VM module loader —
operation-module-loadertranspiles real source with the TypeScript compiler API and evaluates it in a Node VM, sharing the realRpcClientRequestTrackerand the delivery-unknownWeakSetidentity (special-cased import). It also injects the three B-seed source mutants with an "applied exactly once" assertion. - Scripted transport —
ScriptedRpcTransportwrapscreateStableLogicalRpcClient, recording args/payloads and enforcing logical bindings for concurrent same-method calls. - Mount adapters — nine settings operations plus inventory/project/linear-detail adapters that mount the actual hooks under
react-test-renderervia a Proxy-backedobservableModel. - 61 goldens — pilot scenarios, reply matrices, sibling/lifecycle/interruption schedules; determinism pinned by two-run byte identity plus the b1/b2/b3 mutant seeds.
- Write fencing & checker exit — recording requires
--record+RPC_FOUNDATION_RECORD=1+ a clean pinned-main baseline;runStep1Exitruns candidate mode and asserts goldens are unchanged.
⚠️ Golden encoding adds ~18 MB of permanent history and compounds in step 4
The 61 goldens weigh ~18 MB, and matrix-settings.task-hydration.json alone is 6.7 MB / 251,664 lines because its 594 checkpoints re-serialize the full sender arguments and effects at every checkpoint rather than storing deltas. The content is correct; the encoding is redundant. Two concrete, separable costs: pretty-printing inflates every file (committed formatting is pure weight, since compareGolden re-serializes both sides via goldenBytes before comparing), and full-snapshot-per-checkpoint duplicates ~1.2 KB of args + ~2.2 KB of effects per checkpoint. I agree with the author's recommendation: drop pretty-printing now (trivial, roughly halves the cost) and delta-encode checkpoints before the directory grows in step 4.
Technical details
# Golden encoding
## Affected sites
- mobile/rpc-foundation/goldens/ — 61 files, ~18 MB; matrix-settings.task-hydration.json is 6.7 MB / 251,664 lines
- mobile/src/test-support/rpc-recording/golden-recording.ts:41-62 — goldenBytes pretty-prints (JSON.stringify indent 2), then oxfmt reformats; committed formatting is never compared directly (compareGolden normalizes both sides)
- mobile/src/test-support/rpc-recording/run-recording.ts:63-74 — every checkpoint captures the full sender array, payloads, settlements, state, and effects
## Required outcome
- Bound the committed golden weight so it does not compound with each migrated domain in step 4.
## Suggested approach
- Drop pretty-printing: write JSON.stringify(golden) + "\n" and skip the oxfmt pass for goldens.
- Delta-encode checkpoints: store diffs against the prior checkpoint for sender/effects/payloads, full snapshots at scenario boundaries; reconstruct on read for comparison.
## Open questions for the human
- Is ~18 MB acceptable as a one-time cost if step 4 adds no further golden weight, or must it be bounded now? (Recommendation: bound it now — git history is permanent.)ℹ️ Nitpicks
schedule-driver.ts:4exportsREQUIRED_SCHEDULESbut nothing imports it — looks like a roadmap/spec constant that was never wired to an assertion. Remove it or enforce it in a follow-up.
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
mobile/src/test-support/rpc-recording/family-recordings.test.ts:183(RIGHT) — file has no textual diff (binary, pure rename, or mode change)
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
One minor nit that couldn't be anchored inline (the diff tooling reports this file as having no textual hunks):
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (68)
💤 Files with no reviewable changes (10)
🚧 Files skipped from review as they are similar to previous changes (38)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds a deterministic mobile RPC recording framework with virtual time, scripted transport, hook adapters, scenario manifests, mutation checks, and golden-value pooling. Adds pilot scenarios and coverage mappings for inventory, Linear, project, and settings operations. Regenerates or adds versioned golden recordings with recorder hashes, timestamped settlements, deduplicated observations, and schedule outcomes. Updates recording tests, documentation, and the recording command. Merge Risk: 🟡 Moderate · up to The new test foundation can report incomplete or misleading certification because some required schedules cannot be generated and certain configuration can bypass recording runs. These issues should be resolved before relying on the goldens. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 13.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 25 files. (60 skipped: 60 unsupported.) Full details: Description checkExplanation The description provides detailed scope, rationale, changes, and verification results, but it does not follow the required template. It omits the required section headings, linked issue, visual-proof statement, checklist items, AI disclosure, review notes, and agent-skill boundary confirmation. Resolution Restructure the description using the repository template. Add an ELI5 section, What Changed, Why, a valid Linked Issue such as ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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: 5
🧹 Nitpick comments (3)
mobile/src/test-support/rpc-recording/golden-recording.ts (1)
42-42: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winWrite compact golden JSON.
goldenBytesadds indentation, andwriteGoldenformats the result again. The PR reports 17 MB of generated goldens.Use compact JSON with a final newline. Remove the formatter when formatted output is not required.
Proposed change
-import { format } from 'oxfmt' export function goldenBytes(golden: GoldenRecording): string { - return `${JSON.stringify(golden, null, 2)}\n` + return `${JSON.stringify(golden)}\n` } - const result = await format(path, goldenBytes(golden), { printWidth: 100, trailingComma: 'none' }) - if (result.errors.length) { - throw new Error('Cannot format golden') - } - writeFileSync(path, result.code) + writeFileSync(path, goldenBytes(golden))Also applies to: 57-61
mobile/src/test-support/rpc-recording/schedule-driver.ts (1)
4-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unused
REQUIRED_SCHEDULESconstant. No tracked code consumes it, and several entries do not match the names produced by the schedule generators. The mismatch does not currently break coverage because no coverage gate uses this constant.mobile/src/test-support/rpc-recording/run-step1-exit.ts (1)
75-77: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winReport the timeout distinctly.
runProcessresolves withtimedOut: trueand a null exit code when the 120 s budget expires, persrc/shared/child-process/run-process.ts. This branch then reportsStep 1 failed (null), which does not identify the timeout. The PR records 61 goldens across two suites, so exceeding 120 s on slower machines is plausible.♻️ Proposed change
if (result.code !== 0) { + if (result.timedOut) { + throw new Error(`Step 1 timed out after 120s:\n${result.stdout}\n${result.stderr}`) + } throw new Error(`Step 1 failed (${result.code}):\n${result.stdout}\n${result.stderr}`) }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: e4f71330-bfc1-43e7-b428-ad747dc1eef6
📒 Files selected for processing (85)
mobile/rpc-foundation/goldens/b1.jsonmobile/rpc-foundation/goldens/b2.jsonmobile/rpc-foundation/goldens/b3.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/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-legacy-inventory.jsonmobile/rpc-foundation/goldens/matrix-linear-detail-barrier.jsonmobile/rpc-foundation/goldens/matrix-project-explicit-false.jsonmobile/rpc-foundation/goldens/matrix-settings-agent-read.jsonmobile/rpc-foundation/goldens/matrix-settings-best-effort.jsonmobile/rpc-foundation/goldens/matrix-settings.bot-overrides.jsonmobile/rpc-foundation/goldens/matrix-settings.home-providers.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration.jsonmobile/rpc-foundation/goldens/matrix-settings.task-workspace.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-submit.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-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-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-refused.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-transport-error.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-fulfilled.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-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-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/rpc-foundation/settings-recording-coverage.jsonmobile/scripts/rpc-recording.mtsmobile/src/test-support/rpc-recording/README.mdmobile/src/test-support/rpc-recording/family-recordings.test.tsmobile/src/test-support/rpc-recording/golden-recording.tsmobile/src/test-support/rpc-recording/hook-mount.tsmobile/src/test-support/rpc-recording/observable-model.tsmobile/src/test-support/rpc-recording/operation-module-loader.tsmobile/src/test-support/rpc-recording/pilot-mount-adapters.tsmobile/src/test-support/rpc-recording/pilot-recordings.test.tsmobile/src/test-support/rpc-recording/recording-runner.test.tsmobile/src/test-support/rpc-recording/recording-scenario.tsmobile/src/test-support/rpc-recording/recording-values.tsmobile/src/test-support/rpc-recording/reply-matrix.tsmobile/src/test-support/rpc-recording/run-recording.tsmobile/src/test-support/rpc-recording/run-step1-exit.tsmobile/src/test-support/rpc-recording/scenario-input.tsmobile/src/test-support/rpc-recording/schedule-driver.tsmobile/src/test-support/rpc-recording/scripted-rpc-transport.tsmobile/src/test-support/rpc-recording/settings-mount-adapters.tsmobile/src/test-support/rpc-recording/unhandled-recording.tsmobile/src/test-support/rpc-recording/vitest-recording-scheduler.tsmobile/src/test-support/rpc-recording/workspace-settings-mounts.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| "version": 1, | ||
| "family": "legacy-inventory", | ||
| "sites": ["mobile/src/session/use-mobile-native-chat-file-search.ts"], | ||
| "schedules": ["a-b-a", "stale-inflight-cleanup"], |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Description: Compare declared schedules per scenario against emitted schedule goldens.
set -euo pipefail
echo '--- declared schedules per scenario ---'
jq -r '.scenarios[] | "\(.id)\t\(.schedules | join(","))"' mobile/rpc-foundation/pilot-scenarios.json
echo '--- schedules-* goldens present ---'
fd -t f 'schedules-.*\.json' mobile/rpc-foundation/goldens
echo '--- schedule driver handling of declared names ---'
fd -t f 'schedule-driver.ts|reply-matrix.ts|run-recording.ts' mobile/src/test-support/rpc-recording \
--exec rg -n -C6 'schedules|schedule'Repository: stablyai/orca
Length of output: 6200
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- schedule expansion implementation ---'
sed -n '1,150p' mobile/src/test-support/rpc-recording/schedule-driver.ts
echo '--- scenario and golden generation references ---'
rg -n -C5 'schedules|goldens|lifecycleSchedules|interruptionSchedules|schedule' \
mobile/src mobile/rpc-foundation --glob '*.ts' --glob '*.json' --glob '*.md' \
| head -n 400
echo '--- relevant scenario definitions ---'
sed -n '1,80p' mobile/rpc-foundation/pilot-scenarios.json
sed -n '150,260p' mobile/rpc-foundation/pilot-scenarios.jsonRepository: stablyai/orca
Length of output: 38232
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- all files that write or compare RPC goldens ---'
rg -n -C5 'write.*golden|golden|pilot-scenarios|runRecording|lifecycleSchedules|interruptionSchedules' \
mobile --glob '*.ts' --glob '*.js' --glob '*.json' --glob '*.md' \
| head -n 500
echo '--- golden inventory with scenario identifiers ---'
python3 - <<'PY'
import json
from pathlib import Path
p = Path('mobile/rpc-foundation/pilot-scenarios.json')
data = json.loads(p.read_text())
for s in data['scenarios']:
print(s['id'], s.get('schedules', []))
PY
for f in mobile/rpc-foundation/goldens/schedules-*.json; do
printf '%s: ' "$f"
jq -r '.scenario // .id // "no scenario field"' "$f"
doneRepository: stablyai/orca
Length of output: 40026
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '72,190p' mobile/src/test-support/rpc-recording/family-recordings.test.ts
echo '--- schedule-related scenario validation ---'
rg -n -C8 'REQUIRED_SCHEDULES|scenario\.schedules|schedules\.|schedule' \
mobile/src/test-support/rpc-recording --glob '*.ts' \
| head -n 300
echo '--- README schedule contract ---'
sed -n '35,75p' mobile/src/test-support/rpc-recording/README.mdRepository: stablyai/orca
Length of output: 30188
Validate declared schedules against generated schedule scenarios
RecordingScenario.schedules is never read. family-recordings.test.ts hard-codes the scenarios passed to siblingSchedules, lifecycleSchedules, and interruptionSchedules, so declarations such as b1’s a-b-a and stale-inflight-cleanup do not generate or validate goldens. Add validation that each declared schedule maps to a generated scenario and golden, or remove the declarations.
| { | ||
| "complete": "settings.get#2", | ||
| "params": { | ||
| "$undefined": true | ||
| }, |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Description: Check whether the coalescing golden records one or two settings.get requests.
set -euo pipefail
fd -t f 'settings-home-coalesced.json' mobile/rpc-foundation/goldens --exec sh -c '
echo "--- request names per checkpoint in $1 ---"
jq -r ".recording.checkpoints[] | \"\(.id): \" + ([.observation.sender[].name] | join(\", \"))" "$1"
' sh {}
echo '--- how the transport asserts unmatched scripted completions ---'
fd -t f 'scripted-rpc-transport.ts|run-recording.ts' mobile/src/test-support/rpc-recording \
--exec rg -n -C5 'unmatched|not found|Unknown request|pending'Repository: stablyai/orca
Length of output: 1227
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- scenario actions ---'
sed -n '1948,2072p' mobile/rpc-foundation/pilot-scenarios.json
echo '--- golden checkpoints and request observations ---'
jq '.recording.checkpoints[] | {id, sender: [.observation.sender[].name]}' mobile/rpc-foundation/goldens/settings-home-coalesced.jsonRepository: stablyai/orca
Length of output: 3945
Rename the scenario to reflect the recorded behavior.
The recording contains settings.get#1 and settings.get#2 after the two load actions. The loads do not coalesce.
|
|
||
| async function certify(id: string, scenarios: RecordingScenario[]) { | ||
| let first = '' | ||
| for (let run = 0; run < Number(process.env.RPC_FOUNDATION_DETERMINISM_RUNS ?? 2); run++) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Validate RPC_FOUNDATION_DETERMINISM_RUNS before the recording command launches Vitest. runStep1Exit validates its numeric option, but mobile/scripts/rpc-recording.mts forwards the inherited environment without validation. A malformed value becomes NaN, so both loops execute zero times. Their test callbacks then resolve without recording or checking a golden, and Vitest can report success if the unrelated tests pass. Parse and validate the count in a shared helper, require an integer of at least 2, and use it in both loops.
| 'settings-task-hydration-fulfilled', | ||
| 'settings-repo-metadata-fulfilled' | ||
| ]) { | ||
| const base = input.scenarios.find((scenario) => scenario.id === id)! |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Validate missing schedule IDs before collection.
readScenarios checks only the manifest shape and duplicate IDs. runStep1Exit checks only b1, b2, and b3, so a supported manifest can omit another hardcoded schedule ID. The lookup then returns undefined, and base.steps can throw during Vitest collection. Reject the manifest with an error naming the missing ID, or skip that schedule explicitly.
| const boundSteps = steps.flatMap((step): ScenarioStep[] => | ||
| 'complete' in step | ||
| ? [ | ||
| { bind: `lifecycle-${step.complete}`, request: step.complete, params: step.params }, | ||
| { ...step, complete: `lifecycle-${step.complete}` } | ||
| ] | ||
| : [step] | ||
| ) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Inspect the bind and complete resolution rules in the scripted transport.
fd -t f 'scripted-rpc-transport.ts' mobile | xargs -r ast-grep outline --items all
fd -t f 'scripted-rpc-transport.ts' mobile | xargs -r rg -n -C6 '\bbind\s*\(|logical binding|params mismatch'Repository: stablyai/orca
Length of output: 2670
🏁 Script executed:
#!/bin/bash
sed -n '1,155p' mobile/src/test-support/rpc-recording/scripted-rpc-transport.ts
printf '\n--- lifecycle schedule generation ---\n'
sed -n '55,90p' mobile/src/test-support/rpc-recording/schedule-driver.ts
printf '\n--- bind call contract ---\n'
sed -n '55,78p' mobile/src/test-support/rpc-recording/recording-runner.test.tsRepository: stablyai/orca
Length of output: 8128
Use the physical request identifier for lifecycle bindings.
ScriptedRpcTransport.bind looks up name directly in this.bindings. Lifecycle schedules pass a bare method name, such as settings.getSettings, while sendRequest stores bindings under physical names such as settings.getSettings#1. The bind therefore throws Invalid request binding, and the lifecycle schedule cannot run. Pass the matching physical request identifier to bind.
Golden format version 2 stores each distinct observation field value once in a `values` map keyed by a 12-hex sha256 of its sorted-key JSON, and a checkpoint references five hashes. Output stays pretty-printed; the reader rejects any other format version, resolves hashes back to values, and reports the scenario, checkpoint, field and JSON path on a mismatch. Generated variants now declare where their distinguishing input lands, so checkpoints observed before that point are recorded once in a `.prelude` scenario instead of once per reply partition. Reply matrices, interruption schedules and lifecycle schedules share the primitive, which asserts each variant's pre-divergence prefix matches the base. Equal-but-differently-reached checkpoints are untouched. 17.71 MB / 3,599 checkpoints / 58.4% intra-file duplicates becomes 4.21 MB / 1,961 checkpoints / 23.6%, with every file's set of distinct observations unchanged. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found. The new commit resolves the golden-encoding size concern from the prior review via value pooling and pre-divergence checkpoint hoisting, and clears the dangling
certifyargument nitpick.
Reviewed changes
- Value pooling (
golden-value-pool.ts, format v2) — distinct observation field values are interned into a sha256-keyedvaluesmap (12-hex key with explicit collision detection); checkpoints store five field hashes.readGoldenrefuses any othergoldenFormatVersionand resolves hashes back to values. - Detailed comparison —
compareGoldennow diffs header fields, checkpoint ids, and each observation field via sorted-key canonical JSON, reporting scenario, checkpoint id, field, JSON path, and both resolved values instead of a bare byte mismatch. - Prelude hoisting (
prelude-checkpoints.ts) — reply matrices, interruption schedules, and lifecycle schedules record their shared prefix once in a<base>.preludescenario and start each variant at its own divergence, asserting the pre-divergence prefix matches the base. - Schedule driver rework —
bindCompletionsis extracted;lifecycleSchedules/interruptionSchedulesreturnDivergingScenario[], and the family recordings test now passes a bound base and drops the dangling thirdcertifyargument. - Golden weight — goldens drop from ~18 MB to ~4.2 MB (
matrix-settings.task-hydration.jsonfrom 6.7 MB to ~1 MB), while staying pretty-printed for reviewability.
The hoisting and interning logic both check out: divergence indices are computed against the correct (bound vs unbound) step space per caller, hash collisions abort at record time, and the deterministic hash-ordered pool plus explicit collision checks keep recordings stable. The family-recordings.test.ts:183 dangling-argument issue is fixed.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 86a9bb92-7a88-4cbb-aad3-952d87f8808c
📒 Files selected for processing (71)
mobile/rpc-foundation/goldens/b1.jsonmobile/rpc-foundation/goldens/b2.jsonmobile/rpc-foundation/goldens/b3.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/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-legacy-inventory.jsonmobile/rpc-foundation/goldens/matrix-linear-detail-barrier.jsonmobile/rpc-foundation/goldens/matrix-project-explicit-false.jsonmobile/rpc-foundation/goldens/matrix-settings-agent-read.jsonmobile/rpc-foundation/goldens/matrix-settings-best-effort.jsonmobile/rpc-foundation/goldens/matrix-settings.bot-overrides.jsonmobile/rpc-foundation/goldens/matrix-settings.home-providers.jsonmobile/rpc-foundation/goldens/matrix-settings.repo-metadata.jsonmobile/rpc-foundation/goldens/matrix-settings.resume-metadata.jsonmobile/rpc-foundation/goldens/matrix-settings.task-hydration.jsonmobile/rpc-foundation/goldens/matrix-settings.task-workspace.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-context.jsonmobile/rpc-foundation/goldens/matrix-settings.workspace-submit.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-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-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-refused.jsonmobile/rpc-foundation/goldens/settings-repo-metadata-transport-error.jsonmobile/rpc-foundation/goldens/settings-resume-metadata-fulfilled.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-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-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/src/test-support/rpc-recording/README.mdmobile/src/test-support/rpc-recording/family-recordings.test.tsmobile/src/test-support/rpc-recording/golden-recording.tsmobile/src/test-support/rpc-recording/golden-value-pool.tsmobile/src/test-support/rpc-recording/pilot-recordings.test.tsmobile/src/test-support/rpc-recording/prelude-checkpoints.tsmobile/src/test-support/rpc-recording/recording-runner.test.tsmobile/src/test-support/rpc-recording/recording-scenario.tsmobile/src/test-support/rpc-recording/reply-matrix.tsmobile/src/test-support/rpc-recording/schedule-driver.ts
💤 Files with no reviewable changes (9)
- mobile/rpc-foundation/goldens/lifecycle-settings-task-hydration-fulfilled.json
- mobile/rpc-foundation/goldens/lifecycle-inventory-lifecycle.json
- mobile/rpc-foundation/goldens/lifecycle-b3.json
- mobile/rpc-foundation/goldens/schedules-settings-workspace-context-fulfilled.json
- mobile/rpc-foundation/goldens/schedules-settings-resume-metadata-fulfilled.json
- mobile/rpc-foundation/goldens/schedules-settings-repo-metadata-fulfilled.json
- mobile/rpc-foundation/goldens/lifecycle-settings-workspace-context-fulfilled.json
- mobile/rpc-foundation/goldens/matrix-project-explicit-false.json
- mobile/rpc-foundation/goldens/matrix-settings-best-effort.json
🚧 Files skipped from review as they are similar to previous changes (5)
- mobile/rpc-foundation/goldens/settings-workspace-context-refused.json
- mobile/rpc-foundation/goldens/settings-task-workspace-refused.json
- mobile/src/test-support/rpc-recording/pilot-recordings.test.ts
- mobile/rpc-foundation/goldens/settings-task-hydration-refused.json
- mobile/src/test-support/rpc-recording/README.md
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
| const index = expectedIds.findIndex((id, at) => id !== actualIds[at]) | ||
| throw new Error( | ||
| `Recording differs: ${scenario} checkpoint list (${expectedIds.length} expected, ${actualIds.length} actual)\n first divergence at index ${index}: expected ${JSON.stringify(expectedIds[index])}, actual ${JSON.stringify(actualIds[index])}` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Report the exact path for added or missing entries.
If expectedIds is a prefix of actualIds, findIndex returns -1. The error then reports divergence at index -1.
firstDifference also returns the parent path when an array has a missing element or an object has a missing key. Compute the common-prefix index and append the missing array index or object key to the returned path. Add tests for surplus and shortfall on both sides.
Also applies to: 157-158, 173-175
| const observation = {} as Observation | ||
| for (const field of OBSERVATION_FIELDS) { | ||
| const hash = checkpoint.observation[field] | ||
| if (!(hash in values)) { |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Require an own pool entry for each hash.
hash in values accepts inherited properties such as __proto__. A malformed golden can therefore reference a value that is absent from the pool. resolveRecording can then reconstruct an invalid observation instead of rejecting the golden.
Use Object.hasOwn(values, hash).
Proposed fix
- if (!(hash in values)) {
+ if (!Object.hasOwn(values, hash)) {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (!(hash in values)) { | |
| if (!Object.hasOwn(values, hash)) { |
| return JSON.stringify(steps, (_key, value: unknown) => | ||
| value === undefined ? '$undefined' : value | ||
| ) |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Use a collision-free prefix comparison.
The replacer maps both undefined and the literal string "$undefined" to the same JSON value. Such prefixes compare as equal even when their parameters differ. The helper can then hoist checkpoints after an actual divergence.
Use a structural equality check that distinguishes missing properties, undefined, and strings.
…every family The goldens carried no temporal information, so a request deadline could be cut to a third and all 61 files stayed byte-identical. Every threshold is now straddled by two advances with a checkpoint between them: the 30 s request deadline in both schedule drivers, the 120 ms search debounce in b1, and the 60 s repo-metadata cache TTL. Shortening any of them moves an observation. The record fence pinned product sources but excluded the whole recorder, so --record could rewrite every golden from a modified runner and report the baseline intact. Goldens now pin recorderSha256 over every non-markdown file in the runner plus pilot-scenarios.json, and the fence exemption shrinks to the one directory that digest covers. Mutation evidence covered 3 of 13 mounted operations. There is now one anchored mutant per adapter family, covering 11 operations and 51 of the 61 goldens; the two omitted are the pure async loaders whose entire output is their settlement. Anchors are asserted to match exactly one site, which caught the acceptance mutant silently half-applying against three identical guards. The archived-tree assertion pins each seed's visible state instead of merely differing from main, and error observations carry code and cause when present. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The previous commit made the reviewer's divide-by-three deadline mutant fail by placing checkpoints on each side of the 30 s deadline. That is a patch: a timing change that does not cross a hand-placed boundary stays invisible. Those scenario edits are reverted, and pilot-scenarios.json and schedule-driver.ts are byte-identical to what they were before them. The real defect was that the projection had no temporal dimension, so every settlement now carries startedAt and settledAt in virtual milliseconds on the pinned fake clock. Any transition the product schedules for itself is recorded at the time it actually fires, so a deadline or debounce change of any size, in either direction, moves a recorded number. A checkpoint's own clock is not recorded. It is always the sum of the scripted advances, so it is a function of the scenario rather than of the code under test; run-recording.ts asserts that equality at every checkpoint instead, which costs no bytes and fails loudly if it ever drifts. projectionVersion is 2 and all 61 goldens are re-recorded. With the added timestamps stripped, the distinct-observation set is identical to the previous recording, so the change is purely additive. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Recorded settlement times cover thresholds the product schedules for itself, but not one it only consults when something else makes it act. The repo-metadata TTL is the single such case: with probes only at 0 s and 60 s, a 20 s TTL and a 60 s TTL are both expired at 60 s and record identically, so a 3x cache-lifetime regression was invisible. settings-repo-cache-expiry now probes the cache at 59 s as well. This is coverage, not a substitute for recorded time: it bounds how small a TTL reduction is visible rather than making the reduction itself observable, and the README says so. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
ℹ️ No critical issues — one minor cross-platform note inline.
Reviewed changes
- Settlement timestamps —
projectionVersionbumped to2; every settlement now recordsstartedAt/settledAton the pinned virtual clock, so a changed request deadline or debounce moves a recorded number instead of depending on where a checkpoint happens to sit.run-recording.tsasserts the checkpoint clock equals the sum of scriptedadvancesteps. - Recorder provenance — a new
recorderSha256header hashes every non-markdown recorder source pluspilot-scenarios.json, socompareGoldennow fails on any recorder edit and forces a deliberate re-record. The write fence narrowed from:!mobile/src/test-supportto:!mobile/src/test-support/rpc-recording. - Mutant coverage — the three inline B-seed mutants moved into
operation-mutations.tsand expanded to one anchor per adapter family (12 total), each asserted to match exactly one source site.captureErrornow records a thrown error'scodeand a depth-boundedcausechain. - Reference pinning — the archived
bcba08b3e4corroboration now pins per-seed visible state instead of a bare "differs from main" assertion, and is gated onRPC_FOUNDATION_REFERENCE_ROOT.
Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
mobile/src/test-support/rpc-recording/recorder-digest.ts:38(RIGHT) — file has no textual diff (binary, pure rename, or mode change)
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
One minor cross-platform note that wouldn't anchor as an inline comment (the
Suggested fix: either normalize line endings before hashing (
|
…oduct
The reply matrix froze ~26 malformed envelopes crossed against every consumed
field and three boundary kinds, which is 163,925 lines of JSON pinning accidents
on inputs no desktop produces. `successResponse` always sets `result`, so a JSON
wire has no explicit-undefined slot, and no mounted handler returns a number, a
string, an array, a bare `{}` or a boolean: `settings.get` returns
`{settings: ...}`, and the seed methods return an object or nothing.
Each family now runs nine witnessed partitions once, with no field cross: a
normal result, an absent result, `null`, an inner `{ok: false}` envelope with a
string or an object error, an inner envelope missing `ok`, an outer refusal,
`method_not_found`, and a transport rejection. `null` stays because
`linear.getIssue` returns it for a missing issue and b2 is a shipped null-result
bug; it is also what carries the one named delta these goldens record.
`run-step1-exit.ts` had zero callers and shelled out to the same two Vitest
files as `rpc-recording.mts`, so it and its README paragraph go, along with
`MUTATION_NAMES`, which only it read.
In the module loader, the `rpc-delivery-ambiguity` escape is measured dead: over
every scenario, mutant and reference run it was taken once, by the test that
existed to take it. Golden comparison already fails loudly if a mounted module
ever imports the marker, so both go. The history-panel exposure moves into a
declarative table beside the mutation anchors, leaving the loader with one
source-text mechanism and no per-file branch.
The VM stays. Mount adapters load product sources from an arbitrary `root`, and
the archived bcba08b tree is bare `mobile/src` and `src` with no package.json
and no node_modules, so no bundler-resolved import can reach it and the seed
rejection gate cannot run without it. Direct import also swaps a 38-module lazy
graph for a 338-module eager one behind 20 native mocks, because
`mobile-tasks-dependencies.ts` re-exports from `react-native` and four other
native packages and `export *` enumerates.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Important
The reply-matrix and TTL changes are sound, but removing the rpc-delivery-ambiguity escape leans on a safety net that does not actually exist — see below.
Reviewed changes
- Reply-matrix simplification —
replyPartitions(normal)now records the nine reply shapes a host dispatcher can actually emit, dropping the cross-product against consumed fields and the unreachableundefined/number/string/array/boolean/{}results. I verifiedsuccessResponse(src/main/runtime/rpc/errors.ts:27) always setsresult, so the "no explicit-undefined slot" justification holds. - Loader cleanup — the hardcoded
MobileAgentSessionHistoryPanel.tsxexposure became the declarativeOPERATION_EXPOSUREStable, and therpc-delivery-ambiguityspecial-case was deleted. run-step1-exit.tsremoval — the candidate checker and itsMUTATION_NAMESreader are gone (zero remaining references).- Repo-metadata TTL probe —
settings-repo-cache-expirynow probes at 59 s (cache-warm) before the 60 s expiry, so a 20 s vs 60 sDate.now()TTL records differently.
⚠️ Removing the rpc-delivery-ambiguity escape is not covered by the safety net the PR describes
The PR body says the escape "was taken once, by the test that existed to take it" and that "golden comparison already fails if a mounted module ever imports the marker." The first claim is credible, but the second is not: nothing in the comparison path detects a mounted module importing the marker. runRecording records each settlement through captureError, which uses the real isRpcDeliveryUnknown from recording-values.ts, while a mounted operation that imported the marker would get a VM-compiled copy with its own module-level WeakSet (rpc-delivery-ambiguity.ts:4) — so its isRpcDeliveryUnknown(error) returns false for errors the scripted transport marked delivery-unknown. The golden would silently record the divergent behavior as if it were correct, with no failure. This is not just theoretical: use-new-workspace-create-submit.ts value-imports createBlankWorkspace → createWorktreeWithNameRetry → isRpcDeliveryUnknown. That path is dormant today only because the mount pins getWorktreeCreateCutoverSupport: () => false, which disables idempotency and throws before isRpcDeliveryUnknown is ever invoked. A step-4 scenario that enables idempotency (or any operation that consults delivery-ambiguity) would record a false golden.
Technical details
# Restore or replace the rpc-delivery-ambiguity singleton guard
## Affected sites
- mobile/src/test-support/rpc-recording/operation-module-loader.ts:85 — `load()` no longer special-cases `rpc-delivery-ambiguity.ts`; a mounted module that reaches it now gets a VM-compiled copy with a fresh `WeakSet`.
- mobile/src/test-support/rpc-recording/recording-values.ts:1,58 — `captureError` uses the real `isRpcDeliveryUnknown`, so the settlement and the mounted operation can disagree without anything failing.
- mobile/src/tasks/worktree-create-retry.ts:3,137 — real `isRpcDeliveryUnknown` value import, reachable from the mounted `use-new-workspace-create-submit.ts` via `blank-workspace-create.ts`.
## Required outcome
- A mounted operation that consults or marks delivery-ambiguity must share the real marker identity with the scripted transport, or the recording must fail loudly rather than silently encode divergent behavior.
## Suggested approach
- Restore the three-line escape (return the real `rpc-delivery-ambiguity` module when the loader is asked to compile it), which is correct and removes the false justification; or add a record-time assertion that throws if any mounted module ever loads the marker.
## Open questions for the human
- Is delivery-ambiguity handling expected to enter the mounted surface in step 4 (worktree-create with idempotency, chat send/stop)? If yes, the guard is needed before then.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…racle Every golden pinned `lockfileSha256`, so any dependency bump on main failed all 61 comparisons on the merge commit while the traces were identical. A dependency that changes behaviour changes the trace itself; one that does not must not fail a candidate. `platform` already had this exemption — `lockfileSha256` joins it. Recording still refuses to run unless the lockfile matches the pinned baseline, so goldens are still produced under frozen conditions. Verified against main's lockfile: 85 passed, previously 61 failed. The declared mutation set still reports every mutant killed. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Important
The lockfileSha256 provenance change is clean and well-tested, with no new issues in this commit. The rpc-delivery-ambiguity concern raised in the prior review remains unresolved, though, and this commit does not touch that path — so the PR is not yet mergeable.
Reviewed changes
lockfileSha256demoted to provenance —compareGoldennow overrideslockfileSha256(alongsideplatform) from the candidate before comparing, so a behavior-neutral dependency bump no longer fails candidate mode; thegoldenBytesbyte-equality check still catches any bump that genuinely changes the recorded trace.baselineandrecorderSha256remain pinned.- Regression test — a new case pins that a bumped lockfile hash passes while a changed
baselinestill throwsheader baseline. - Re-recorded headers and docs — all 61 goldens re-generated with the updated
recorderSha256(header-only; no recording content changed), and the README golden-schema prose now describesplatformandlockfileSha256as uncompared provenance.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Add three scenarios, preserve existing traces, remove unreachable archived checks, and document observed mutation kills and remaining adapter limitations. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
The audit file was mostly a point-in-time record of mutation runs that had already happened, in an artifacts directory, where it would go stale on the next scenario change. The durable part is which holes are still open and why they cannot be reached, which belongs beside the runner it describes. Markdown is outside recorderSha256, so no re-record; 88 passed | 3 skipped. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
Important
No new issues in this delta, but the previously raised blocking concern remains fully open: removing the rpc-delivery-ambiguity singleton escape from operation-module-loader.ts still leaves a path where a mounted operation that imports the delivery-unknown marker gets a VM-compiled copy with its own WeakSet and silently records a false golden. These commits do not touch the loader, so the PR is still not mergeable on that point.
Reviewed changes
- Added
inventory-repeat-query— new scenario and golden recording query normalization (" ALPHA "→"alpha"), a cache-served repeat emitting no new request, a stale in-flight reply being ignored after a newer query, and a cached repeat cancelling a pendingdeltadebounce. - Added
settings-repo-metadata-single-host— records that two repos sharing one SSH host skip thessh.listTargetSummarieslabel lookup. - Added
settings-bot-overrides-refresh-refused— records that a refusedsettings.getonresetretains the existing PR-bot overrides. - Scoped the archived-tree reference test —
rejects bcba08b3e4is now registered only for the three seeds with pinned reference states instead of an always-skipped test for the other nine mutants. - Documented known-open holes — README now lists two adapter-unreachable mutations (repo-metadata cross-module cache write, bot-overrides client-identity guard) and flags archived-tree corroboration as unproven in CI.
- Re-pinned
recorderSha256across all goldens sincepilot-scenarios.jsonfeeds recorder provenance.
The new scenarios are all genuine coverage: each drives real mount actions through the existing adapters (query/reset/load), and each golden asserts a projection that changes if the underlying behavior regresses. The schedules label remains descriptive only and is never read to drive the recording.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Superseded by #20521, which consolidated the recording runner and goldens and has merged. |

Record the reply shapes a host can send
The recorder froze how nine settings screens react to roughly 26 malformed reply envelopes,
crossed against every field each screen consumes and three boundary kinds. That was 163,925
lines of hash-interned JSON, 84% of the change, pinning accidental behavior on inputs no
desktop produces, and it would have blocked the retrofit it was built to protect: any cleanup
that normalizes malformed-reply handling trips all of it at once.
Each family now runs nine partitions once, with no field cross. The partitions are the shapes
the host dispatcher can actually emit.
successResponsealways setsresult, so a JSON wirehas no explicit-undefined slot;
settings.getreturns{settings: ...}, so a number, astring, an array, a bare
{}and a boolean are all unreachable; and the inner{ok, error}envelope the GitHub project mutations carry is only ever missing
okorfalse. What survivesis a normal result, an absent result,
null, an inner refusal with a string or an objecterror, an inner envelope missing
ok, an outer refusal,method_not_found, and a transportrejection.
nullis not hypothetical.linear.getIssuereturns it for a missing issue, regression seedb2 is a shipped null-result bug, and it is what carries the one named delta these goldens
record.
Goldens: 194,734 lines to 48,240. Recording: 18.9 s to 3.0 s. Net -146,682 lines.
Also removed
run-step1-exit.ts, zero callers, shelled out to the same two Vitest files asrpc-recording.mts. ItsMUTATION_NAMESreader went with it.rpc-delivery-ambiguityescape. Instrumented across every scenario,mutant and reference run, it was taken once, by the test that existed to take it. Golden
comparison already fails if a mounted module ever imports the marker.
table beside the mutation anchors, so the loader has one source-text mechanism and no
per-file
if.Kept, with evidence
The schedule goldens. They look like the fulfilled goldens with a different interleaving,
and the interleaving is the point. Mutating the request deadline to
/ 3or* 0.9is caughtby the seven
schedules-*and twointerruptions-*goldens and by nothing else: no plainper-operation golden and no matrix golden notices either mutant.
The Node VM in the module loader. Mount adapters load product sources from an arbitrary
root, and the archived pre-fix tree the seed gate runs against is a bare
mobile/srcplussrcwith nopackage.jsonand nonode_modules. No bundler-resolved import reaches it andvi.mockcannot introduce it, so the seeds could not be proven against the real defect withoutthis. Direct import would also swap a 38-module lazy graph for a 338-module eager one behind 20
native mocks, because the task dependency barrel re-exports from
react-nativeand four othernative packages and
export *enumerates.Unchanged: the ~41 plain per-operation goldens, the
recorderSha256andgoldenBytesprovenance headers, value pooling, elapsed-time settlement recording, and the three seeds with
their mutants.
Verification
Two consecutive
--recordruns byte-identical at manifest669af6c18f33b1cc69fb519daa0619bf5d44ca91b681e7a1034456fa8dad0340. b1/b2/b3 pass againstfrozen main and fail against the archived tree. All 11 family mutants killed, each applying
exactly once. Both deadline mutants still fail. Mobile typecheck,
oxfmt --check,check:code-quality:changedat 0 new findings, rootoxlintat 0 errors, and the full mobilesuite at 521 files / 4,322 tests.
REPORT-END
Cut summary
An over-engineering pass removed 146,682 lines from this PR. Goldens went from 4.44 MB to 1.10 MB and recording wall time from 18.9 s to 3.0 s. The 13 matrix goldens now record nine reply shapes a host can actually produce, justified against the host dispatcher rather than the client, instead of a cross product against every consumed field. All 61 goldens survive; none was orphaned.
All seven
schedules-*goldens were kept against an audit recommendation to delete them, and that turned out to be load-bearing: when either deadline mutant is applied, the nine goldens that catch it are seven schedules plus two interruption files. Not one plain per-operation golden and not one matrix golden detects a deadline change.The sandboxed module loader was kept after an attempted conversion to plain imports failed. Its irreducible capability is loading product sources from an arbitrary filesystem root: the archived
bcba08b3e4tree has no package.json and no node_modules and sits outside the project graph, so no import specifier orvi.mockcan reach it. The regression evidence that b1/b2/b3 fail against the old sources runs only through that path.