Skip to content

test(mobile): repin the recording baseline to main after #19850 - #21092

Merged
Jinwoo-H merged 1 commit into
mainfrom
golden-repin-after-19850
Sep 16, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
golden-repin-after-19850

Conversation

@Jinwoo-H

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

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

What this is

A baseline repin of mobile's RPC recording corpus, the same shape as #21065.

Every golden under mobile/rpc-foundation/goldens/ carries a baseline header naming the commit its recording was made against, and --record refuses to run unless the working product tree equals that commit. The corpus was pinned to a28085adbfb65d3f27393cc7a0d78cfa2b4ff07e, main's tip at the time of #21065. Three commits have landed on a fenced path since:

$ git log --format='%H %s' a28085adbfb65d3f27393cc7a0d78cfa2b4ff07e..origin/main \
    -- mobile/src src/shared mobile/pnpm-lock.yaml ':!mobile/src/test-support/rpc-recording'
97aa5ff19b19231670ab7d06d070115640bb8f41 fix(mobile): open native chat when a new worktree launches a default agent (#19850)
f02d09c1ba054c8df6ab81dfdbea7f6660d8ae51 fix(native-chat): deliver queued messages while the chat pane is hidden (#20659)
36cdb34097a7075718abe41c29d559101841166a test(agent-status): pin each legacy-bypass detector to its own case (#21004)

So recording on main refuses:

Error: Product sources or lockfile differ from the pinned main baseline
    at <anonymous> (mobile/scripts/rpc-recording.mts:28:9)

Why the detached-pin recipe was not the answer here

#19850 did more than drift the product tree. It changed five golden bodies and twelve adapterSha256 headers, and it did not touch pilot-scenarios.json, so the corpus still named the older tree:

golden what moved
matrix-worktree.create-retry-worktree.create-1 body
matrix-worktree.runtime-capabilities-status.get-1 body, new agentLaunch: false capability member
tw-capabilities-advertised body, new agentLaunch: false capability member
tw-capabilities-cutover-retried body, new agentLaunch: false capability member
tw-capabilities-legacy-idempotency body, new agentLaunch: false capability member
12 matrix-settings.* and settings-* goldens adapterSha256 only

The README's other recipe records from a detached worktree at the pinned commit. Run at a28085adbf, that would have produced the pre-#19850 bodies and reverted all five, deleting a landed behaviour change from the corpus. Repinning forward to main's last fenced commit is what makes the corpus reproducible in place again.

The new pin

baseline in mobile/rpc-foundation/pilot-scenarios.json moves to 97aa5ff19b19231670ab7d06d070115640bb8f41, main's last commit to touch a fenced path, and the whole corpus is re-recorded against it.

No behaviour moved

Each golden was decoded through its own values pool against the origin/main copy, stripping the header keys baseline, lockfileSha256, recorderSha256, adapterSha256, scenarioSha256 and runnerVersion, and resolving 12-hex value references through the product's own resolveRecording before the comparison.

class count
header-only 705
body moved 0
added 0
deleted 0

baseline is the only header key that differs on any golden, and it differs on all 705. lockfileSha256, recorderSha256, adapterSha256 and scenarioSha256 are unchanged everywhere, which is what a pure repin looks like. The zero body moves also settle the open question about #19850: its recorded goldens do reproduce from its own product tree, they were simply pinned to an older one. The diff is 706 files, one line inserted and one deleted each.

Gates

Run from mobile/, all green.

gate result
tsc --noEmit clean
vitest run src/test-support/rpc-recording 17 files, 821 passed, 3 skipped
oxfmt --check . 2592 files correct

The full re-record itself passed 707 tests in 134s.

One recommendation

A PR that changes a golden body should repin baseline to its own last fenced commit and re-record in the same PR, which is the README's behaviour-change recipe. #19850 changed five bodies without repinning, so main carried a corpus that named a tree it was not recorded from until this follow-up.

Reproducing the typecheck in a fresh worktree needs mobile/src/terminal/terminal-webview-engine.generated.ts and mobile/src/components/pr-sidebar/mermaid-webview-engine.generated.ts, both gitignored postinstall artifacts. Running node scripts/build-terminal-webview-engine.mjs and node scripts/build-mermaid-webview-engine.mjs first clears the two TS2307 errors they otherwise cause.

@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

A header-only repin of mobile's RPC recording corpus, the documented follow-up after #19850 landed a fenced product change without moving baseline.

  • pilot-scenarios.json baseline moves to 97aa5ff (#19850's merge commit, main's last commit to touch a fenced path).
  • 705 goldens get the matching baseline header rewritten — 706 files, one line each, 706 insertions / 706 deletions.

I verified the repin is exact and safe to land:

  • Every added/removed line in the diff is a baseline line; the old side is uniformly a28085a… and the new side uniformly 97aa5ff…, so no golden body or other header (recorderSha256, adapterSha256, scenarioSha256, lockfileSha256) moved.
  • git diff 97aa5ff origin/main -- mobile/src src/shared mobile/pnpm-lock.yaml ':(exclude)mobile/src/test-support/rpc-recording' is empty, so --record's fence passes; the only commit after the pin (e6a3b5d) is docs-only.
  • 97aa5ff is an ancestor of origin/main, and no stale a28085a… reference remains anywhere in the tree.
  • Confirmed #19850 changed five golden bodies plus twelve adapterSha256 headers and left pilot-scenarios.json alone, so the corpus had named a tree it was not recorded from; its bodies reproduce byte-for-byte from 97aa5ff, which is exactly the fix this PR makes.

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

@Jinwoo-H
Jinwoo-H merged commit 66a894d into main Sep 16, 2026
23 checks passed
@Jinwoo-H
Jinwoo-H deleted the golden-repin-after-19850 branch September 16, 2026 21:11
Jinwoo-H added a commit that referenced this pull request Sep 16, 2026
Main repinned the recording baseline to 97aa5ff in #21092, which rewrote the `baseline` header of
all 705 goldens and the manifest. Every golden and the manifest are resolved to main's version: the
re-record in the next commit overwrites them, and taking main's side keeps the merge commit itself a
faithful copy of the repin rather than a half-merged corpus.

No non-golden conflicts.

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