Scripts: let local PR checks use an upstream main ref #2636
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2646"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T04:57:18Z.
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/mainto check against a fetched upstream branch.What is in it
--main-refto the local checker, withorigin/mainas the default.Tested
python -B -m unittest discover -s scripts -p 'test_*.py' -v: 26 passed, 0 failed, 0 skipped on Windows.exitandpeak commitfields, 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 --checkpassed.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:20:58Z.
Thanks for the precise repro. I added both fields to the synthetic smoke block in
00765166and 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.
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-26T05:05:49Z.
Rerun on the new head
0076516: fixed. The script tests pass alone (26 of 26), merged ontomain(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 inpr_check.py) the newtest_local_check_uses_requested_main_reffailed. Two lines in its fixture fix that for either merge order.#2219 makes the checker require
exitandpeak commitlines in the PR's smoke block. This test'srunblock has neither, so on9fa03d5merged with #2219's8d99ad3(no conflict) the--main-ref upstream/maincall exits 1:With
exit: 0x0andpeak commit: 4000 MBadded to thatrunstring (scratch, only in this test):python -B -m unittest discover -s scripts -p 'test_*.py'9fa03d5as is9fa03d5+ the two lines9fa03d5merged with #2219, as is9fa03d5merged with #2219, + the two linesWindows 11 Pro 26300, Python 3.12.
--main-refshows in--helpas described.AI use: Claude Code (Claude Opus 5.5) ran the checks and wrote this comment.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:43:00Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:33:34Z.
Triage (#1607) – head
0076516No open or merged PR makes the same change. #2406 removes
is_main_ancestor(replacing it with a--basecheck), so the two conflict; whichever lands second needs reworking.No problems found in the diff:
--main-refdefaults toorigin/main, is only used with--local, and the test shows the default and the override giving different results.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:05:00Z.
merge-check
base:
1c8b551475head:
0076516606merge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/pr_check.pyandscripts/test_pr_check.py, +39/-1)build: not run (Tier 0 Python script diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_pr_check.py" -v-> 14 passed, 0 failed (base1c8b5514: 13 passed; newtest_local_check_uses_requested_main_refpassed);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pymissing%ComSpec%/%SystemRoot%on Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+39/-1). Adds optional
--main-ref(default"origin/main",scripts/pr_check.py:174) and passeso.main_reftogit merge-base --is-ancestorin--localmode (scripts/pr_check.py:194), leaving CI and default--localbehavior unchanged. The new test builds a temporary git repo with distinctorigin/mainandupstream/mainrefs and proves the default fails while--main-ref upstream/mainpasses. No problems found.performance: none (CLI check script in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.