Skip to content

Scripts: let local PR checks use an upstream main ref - #2646

Open
luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/pr-check-local-main-ref
Open

luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/pr-check-local-main-ref

Conversation

@luckyteagirl

@luckyteagirl luckyteagirl commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

A fork checkout can have a stale origin/main, which makes the local PR checker reject a retail smoke report from the current upstream main. Use --local --main-ref upstream/main to check against a fetched upstream branch.

What is in it

  • Add --main-ref to the local checker, with origin/main as the default.
  • Exercise both refs with a temporary Git repository in the CLI test.

Tested

  • The new CLI test failed before the fix because the checker rejected the flag.
  • python -B -m unittest discover -s scripts -p 'test_*.py' -v: 26 passed, 0 failed, 0 skipped on Windows.
  • After updating the smoke fixture for PR PR checks: the PR's smoke block must show how its run ended (#2213) #2219's required exit and peak commit fields, the combined tree's full Python suite passed 32/32; before the fixture update, the focused test failed with exactly those two missing-field diagnostics. The standalone branch still passed 26/26.
  • git diff --check passed.

Regression run

  • Not applicable. Only the Python checker and its tests changed.

Not tested

  • Rust/GPU tests and a retail smoke run. This changes only the Python PR checker and its tests.

AI use

  • Codex (GPT-6.2 Sol) implemented the option, wrote the regression test, and ran the Python checks.

@luckyteagirl
luckyteagirl marked this pull request as ready for review November 26, 2026 05:02
@fromthemoonx

fromthemoonx commented Nov 26, 2026 •

Copy link
Copy Markdown

Rerun on the new head 0076516: fixed. The script tests pass alone (26 of 26), merged onto main (26 of 26) and together with #2219 (32 of 32).


On 9fa03d5: The script tests passed on Windows (26 of 26), but together with #2219 (my PR, also open, also in pr_check.py) the new test_local_check_uses_requested_main_ref failed. Two lines in its fixture fix that for either merge order.

#2219 makes the checker require exit and peak commit lines in the PR's smoke block. This test's run block has neither, so on 9fa03d5 merged with #2219's 8d99ad3 (no conflict) the --main-ref upstream/main call exits 1:

- the PR's regression run (`xcl-smoke` block of commit 1234567890abcdef) has no `exit` line
- the PR's regression run (`xcl-smoke` block of commit 1234567890abcdef) has no `peak commit` line

With exit: 0x0 and peak commit: 4000 MB added to that run string (scratch, only in this test):

python -B -m unittest discover -s scripts -p 'test_*.py'
9fa03d5 as is 26 passed
9fa03d5 + the two lines 26 passed
9fa03d5 merged with #2219, as is 32 run, 1 failed (this test)
9fa03d5 merged with #2219, + the two lines 32 passed

Windows 11 Pro 26300, Python 3.12. --main-ref shows in --help as described.

AI use: Claude Code (Claude Opus 5.5) ran the checks and wrote this comment.

A fork can have a stale origin/main and reject valid upstream smoke baselines. Let local callers specify the fetched main ref while keeping origin/main as the default.

Exercise the default and alternate refs in a temporary Git repository.

Assisted-by: Codex (GPT-6.2 Sol)
@luckyteagirl
luckyteagirl force-pushed the codex/pr-check-local-main-ref branch from 9fa03d5 to 0076516 Compare November 26, 2026 05:20
@luckyteagirl

Copy link
Copy Markdown
Contributor Author

Thanks for the precise repro. I added both fields to the synthetic smoke block in 00765166 and updated the PR description. The focused test reproduced the two missing-field diagnostics on the combined tree before the edit; after the edit, the combined Python suite passed 32/32 and this branch passed 26/26. The new head is in upstream CI now.

Codex assisted with the fixture and checks; the root session's exact model identifier is not exposed to me.

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.

2 participants