ci(conventions): check pull requests with the current base branch rules #8892
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8892"
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 boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-21T04:52:56Z.
What
The Conventions workflow checked out
pull_request.base.sha, the base recorded when the pull request was opened, and ran that revision's checker. A rule merged after a pull request was opened never ran on it. #7005 passed with the checker of07e741481, which had no env-reference rule, and mergedAPS5_NO_WGIwithout anENVIRONMENT.mdrow.conventions.yml: check out the current tip ofpull_request.base.refand pass--base HEAD.Checkalready diffs fromgit merge-base, so only the pull request's own changes are checked. It still runs only base-branch code and never executes pull request code.check_conventions.py: an older branch lacksENVIRONMENT.mdrows added on the base branch after its branch point. Such a row now counts as documented unless the pull request removes it. Without this, #674 is reported forANYPS5_INPUT_CONFIG, which main already documents.CONTRIBUTING.md: say which checker revision runs.Effect: an open pull request that breaks a rule merged after it was opened fails on its next push, edit or reopen.
Tested
Windows 11, Python 3.14.
python -m unitteston everytools/tests/test_check_conventions_*.pyandtest_env_reference.py: all pass. The new testtest_a_row_the_target_added_after_the_branch_point_documents_the_readfails without thecheck_conventions.pychange.07e741481with--base 07e741481passes. Checkout of main at the time of the run with--base HEADreportsAPS5_NO_WGI.ANYPS5_EDITOR_SCREENSHOTandAPS5_HOT_RELOAD(no rows on main). #6481 and #6867 newly get debt-length warnings (no errors).python tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py: #8777 and #6044 share files, and their hunks were checked by hand with no shared lines.pull_request_targetevent after merge.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T05:06:48Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
CONTRIBUTING.mdtools/check_conventions.pyImported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-21T05:11:02Z.
Checked by hand: #6044 adds a section at
CONTRIBUTING.mdline 21 (this PR changes line 44), and #8777 changescode()andsymbol_nidintools/check_conventions.py(this PR changesCheck.__init__andenv_reference). No shared lines.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:51:20Z.
Review: APPROVED
I reviewed the base-tip checkout and checker changes, including the merge-base diff behavior and the
ENVIRONMENT.mdrows inherited from the current target branch. I ranpython3 -m unittest discover -s tools/tests -p "test_check_conventions_*.py"(143 passed) andpython3 tools/check_conventions.py --base upstream/main(passed) on this head. The PR checks also pass. I found no blocking issue; the workflow integration itself still awaits its first GitHub run after merge.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T19:13:55Z.
Checked the workflow change (current base tip with
--base HEAD, merge-base still scopes the diff, only base code runs), theENVIRONMENT.mdrows inherited from the target (minus rows the PR drops) and the three new tests; the inherited-row test needs thecheck_conventions.pychange. Conventions, intake and labels are green on the head; merged.