# PR #23660 proof audit, pass 2

Before = merge-base `60b35a1ee0`, After = head `33a1b866ae`. Both worktrees are clean and sit at exactly those SHAs.

## Integrity

- sha256 matches: `driver.ts` c6e1edd4…a5b49, `bin/gh` cd1b85ce…9c514d.
- The transcript headers come from `git -C <worktree> rev-parse HEAD` inside the driver. All 16 rows in each transcript show the full expected SHA.
- The driver uses the real `GitManager.make` and the real `SourceControlProviderRegistry.layer` + `builtInDrivers.layer` + `GitVcsDriver`/`VcsDriverRegistry`/`VcsProcess`. It does not use the test file's fake gh provider. The only stub is `globalThis.fetch`: it logs the request, answers GraphQL with empty or one node, and returns 422 for `POST /repos/*/pulls`. The head value is the request body the real provider serialized, so nothing echoes `headSelector` back.

## Row by row

Every row in summary.md agrees with the `RESULT` and `POST` lines in both transcripts. Rows 1, 1b, 1c, 2 and 2c change from `fix` to `juliusmarminge:fix`. Rows 1d, 2b, 3, 4, 4b, 7 and 8 stay the same. Rows 5 and 5b show no POST and `newRead=0` at both SHAs. Rows 6 and 10 fail before reaching a POST at both SHAs. Row 9 was not staged; the matrix marks it unit-only and practically unreachable. Every create row on After shows `newRead=1`, and every row on Before shows 0.

## Rerun of row 1

I ran a copy of the driver with only `EV` changed to `/tmp/ev-23660/audit2`, so nothing was written to `ev/`.

- At head: `POST repos/pingdotgg/t3code/pulls head="juliusmarminge:fix"`, newRead=1.
- At the merge-base: same URL with `head="fix"`, newRead=0.

After normalizing the EV path, both outputs are byte-identical to the row-1 sections of the recorded transcripts (empty `diff`).

## PR body claims

- **(a) The fork test fails on main and passes with the fix.** Confirmed. `tests-mb-with-new-tests.log` shows `1 failed | 105 passed`, Expected `juliusmarminge:fix-7382-repro`, Received `fix-7382-repro`. `tests-head.log` shows 106/106. The test runs the merge-base code with head's test file, which counts as "main" for this claim.
- **(b) Status, PR lookup and base resolution are unchanged.** Supported. The diff touches only `runPrStep`'s `headSelector` and adds one helper. Rows 5 and 5b show identical behavior and zero new reads. `resolveBranchHeadContext` and `isCrossRepository` are unchanged in the diff.
- **(c) The extra git config read happens only on create.** Supported, with one wording nit. Rows 5 and 5b show 0 reads, and every create row shows 1. Strictly, the read happens on the create path after `findOpenPr` returns nothing, so 5b (existing PR) does not read either. That is consistent with the claim.
- **(d) The runtime table.** Needs a correction. The After column cites `d0adb0e588`, which head `33a1b866ae` supersedes. It should be re-cited to the head driver capture: row 1 at 33a1b866ae gives the same body (`"head":"juliusmarminge:fix"` to `repos/pingdotgg/t3code/pulls`). Also note that the table's evidence comes from a dev-server and UI preload run on older SHAs, while the head evidence comes from a driver run, not the UI.
- **(e) "The same resolution the provider uses."** Overstated. There are three differences:
  1. GitManager reads raw `remote.*.url` config. The provider reads `git remote -v`, which applies `insteadOf`. They diverge when `insteadOf` rewrites a GitHub URL to a different repo or host. Same-repo SSH/HTTPS rewrites stay consistent. The code comment acknowledges this.
  2. GitManager returns null unless `origin` itself is detected as GitHub, and it takes the host from origin. The provider falls back to `GH_HOST` and `github.com` and does not require origin. With no origin or a non-GitHub origin, the fix is a no-op (rows 6 and 7 show it is harmless). A custom-domain GHE origin that `detectSourceControlProviderFromGitRemoteUrl` does not classify as GitHub also falls back to the old behavior.
  3. `GH_REPO` is parsed against origin's host, whereas the provider uses its hostHint, then `GH_HOST`, then `github.com`.

  Suggested wording: "mirrors the provider's resolution (GH_REPO, then remotes plus gh-resolved marks) for GitHub-origin checkouts without cross-repo `insteadOf` rewrites."
- **(f) "Checks that the created fork PR is found afterwards."** Weak. The test's fake gh returns a scripted `prListSequenceByHeadSelector["fix-7382-repro"]` second response (#7383), so the lookup succeeds by construction. The test also uses `configureVisibleRemoteUrlWithLocalRewrite`, which sets `insteadOf`. That is the row-10 layout, where the real provider would not resolve a GitHub repo, so the unit test proves only GitManager's selector choice, not agreement with the provider. That agreement is shown by the driver rows 1–4b. Suggested wording: "…and that the follow-up lookup reports the PR (mocked gh output)."

## Corrections to request

1. Re-cite the After column to head `33a1b866ae` (driver capture) instead of `d0adb0e588`.
2. Soften (e) to name the `insteadOf` and origin/host (GHE, `GH_HOST`) caveats.
3. Qualify (f) as mocked.

None of these undercut the fix itself.
