Skip to content

test(mobile): repin RPC goldens to main after #22956's squash - #23046

Merged
Jinwoo-H merged 1 commit into
mainfrom
fix/rpc-recording-repin-main
Sep 26, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
fix/rpc-recording-repin-main

Conversation

@Jinwoo-H

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

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

ELI5

The mobile app's recorded test traffic (the "goldens") names the exact commit it was recorded against. #22956 recorded against one of its own branch commits, and the squash merge left that commit out of main's history. The pin check now fails on main and on every open PR. This points the goldens at main's current tip.

What Changed

Before: mobile/rpc-foundation/pilot-scenarios.json baseline = c5c1477ad4d, which is unreachable from main, so the "RPC recording pin" job fails everywhere.

After: baseline = 02a55944347 (main's tip, the #22956 squash). All goldens were re-recorded with RPC_FOUNDATION_RECORD=1 ... rpc-recording.mts --record.

Across the 788 golden files, only two header lines change:

Every recorded body is byte-identical, so no behaviour moved.

Why

This is the standard repin fix: one repin commit on main's tip, as its own PR. It can't be folded into #23039, because that PR changes product sources, and the recorder refuses to record against a baseline whose sources differ.

Linked Issue

Follow-up to #22956. Unblocks #23039 and any other open PR whose pin job is red.

Visual Proof

N/A: test fixture headers only.

Testing

  • The recording run passed: 789 tests.
  • Before re-recording, confirmed the new baseline is recordable: git diff --quiet <main tip> -- mobile/src src/shared mobile/pnpm-lock.yaml returned 0.
  • git diff -U0 over the goldens shows only baseline and lockfileSha256 lines.

Agent skill upstream boundary

  • Not applicable

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A for screenshots, with reason
  • Self-reviewed
  • Cross-platform/SSH impact: none

#22956 re-recorded with baseline = its own branch commit c5c1477, which
the squash merge left unreachable from main, so the RPC recording pin guard
fails on main and every open PR. Repin to main's tip and re-record: only
baseline and lockfileSha256 (main's lockfile moved in #22961/#22964) change;
every recorded body is identical.

@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

This is a mechanical repin of the mobile RPC recording corpus after #22956's squash left the pinned branch commit unreachable from main. I verified the change set independently rather than trusting the description.

  • Manifest repin — mobile/rpc-foundation/pilot-scenarios.json baseline moves c5c1477a… → 02a55944347346065453e179e071e64d9ae861dc, which is the PR base and current main tip.
  • 787 goldens re-headered — across mobile/rpc-foundation/goldens/*.json, every changed line is baseline (now the same 02a55944…) or lockfileSha256 (1327605e… → 9317f3a9…). No recorded body changed.

Verification performed

  • Extracted every added/removed content line from the formatted diff: the only fields touched are baseline and lockfileSha256. All 788 changed files live under mobile/rpc-foundation/.
  • 02a55944… is an ancestor of the head (git log 02a55944..HEAD is exactly the one repin commit), so the ancestry guard will pass on main and on branches cut from this tip.
  • sha256sum mobile/pnpm-lock.yaml at head equals the new 9317f3a9… value; lockfileSha256 is masked as provenance by compareGolden anyway.
  • All 787 goldens carry one identical baseline, and no baseline field exists elsewhere under mobile/.

This has no product surface — test-fixture headers only — and the pin/corpus invariant holds.

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

@Jinwoo-H
Jinwoo-H merged commit 27ca6a2 into main Sep 26, 2026
25 checks passed
brennanb2025 added a commit that referenced this pull request Sep 29, 2026
… pull request (#23720)

* fix(ci): keep a squash-merged RPC recording pin reachable through its pull request

Main's "RPC recording pin" check has been red since #22762: that branch pinned
the recording corpus to its own commit 03995ae, and the squash-merge left that
commit out of main's history. Every behaviour-change squash did the same, and
each needed a hand-made repin PR to clear it (#23565, #23535, #23046 and more).

The guard now accepts a pin that is either in this history or in the head of the
pull request whose squash wrote it into the manifest. It finds that pull request
from the `(#n)` subject of the commit that added the pin and fetches
`refs/pull/<n>/head`, which GitHub keeps after the branch is deleted. The
reproduce step uses the same lookup, so it can still check the pinned tree out.

* fix(ci): give the recording pin lookup room to walk a blobless clone

In CI's blobless clone, `git log -S` fetches the manifest's blobs one commit at a
time, a few seconds each. Under the 30 s process default the walk was killed after
a handful of manifest commits, which main's history already exceeds (up to 7
manifest commits between a pin landing and the next pin change), and the guard
then failed with an empty "Could not find the commit that pinned" error. The
lookup and the pull request fetch now carry explicit budgets and say when they
timed out.

The not-an-ancestor instruction now names the pull request whose head was
checked, or says the commit that pinned it names none.

Adds the two merge-preview shapes the guard runs on: a branch opened after a
squash resolves main's pin through the squash's pull request, and a branch whose
rebase dropped its own pinned commit fails on its pull request instead of on main.

* fix(mobile): tell a missing recording pin apart from product drift

After a squash the pinned commit can live only in its pull request's head, so a
clone that never fetched it makes `git diff --quiet <baseline>` exit 128. The
recorder reported that as "Product sources or lockfile differ from the pinned
main baseline", which sends the developer to repin a tree that may match. It now
prints git's error and the command that fetches the pin.

* fix(ci): ask GitHub which pull request holds a squash-dropped recording pin

The recording pin guard found the pull request that keeps a squash-dropped
pin by walking main's first-parent history for the commit that wrote the pin
into the manifest and reading "(#n)" off its subject. A merger who edits the
squash title loses the number, and the push to main turns red anyway. That
already happened on main: of the 22 squashes that left a pin outside main's
history, #21674's title had no "(#n)".

The guard now asks GitHub for the pull requests associated with the pinned
commit (GET /repos/{owner}/{repo}/commits/{sha}/pulls) and, for each in turn,
fetches refs/pull/<n>/head and accepts only when git proves the pin is an
ancestor of that head. GitHub only nominates candidates, so a wrong answer can
fail the guard but never pass it. The endpoint named the right pull request
for all 22 historical cases, #21674 included, and names none for commits a
force-push orphaned.

This removes the pickaxe walk, its 600 s budget and its lazy blob fetches in
a blobless clone, the first-parent subtlety, and the subject regex. A revert
that restores an older pull-request-only pin now resolves too, because the
lookup is by the pin itself rather than by the commit that last wrote it.

CI passes the job token to both guard steps and grants the job
pull-requests: read. Local runs work without a token on this public repo and
send GITHUB_TOKEN or GH_TOKEN when set. A failed lookup throws with the HTTP
status, and names the rate limit when an unauthenticated call is refused.
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