Repository navigation
ci: Fail PRs that move a submodule pointer backwards (#693) - #717
Merged
Merged
Conversation
ci/submodule_direction.py checks every changed gitlink against the base pointer with git merge-base --is-ancestor, fetching or cloning the submodule as needed. PR CI runs it in check-event for pull_request and merge_group; 'submodule:' in the PR title allows a deliberate move back. Fixes #693
zackees
force-pushed
the
ci/693-submodule-direction
branch
from
October 14, 2026 08:58
f5a3b15 to
65fc34f
Compare
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #693
Refs #699
ci/submodule_direction.py <base>checks every gitlink that differs between<base>and HEAD. The new pointer must descend from the base pointer (git merge-base --is-ancestor). Missing commits are fetched; a submodule that isn't checked out is cloned bare. The error names the path and both SHAs, explains the fix (git submodule update), and mentions thesubmodule:title override.check-eventstep (pull_requestandmerge_group), so a backwards move fails before any build runs.coordination.mddocuments the rule and how to run it locally.RED → GREEN
ci/test_submodule_direction.pyfails at import (no script)../lintis ok.uv run ci/submodule_direction.py origin/masterpasses (rc 0). Replaying the last websocket bump in reverse (cb262980e→ its parent) fails withplugins/obs-websocket: moves backwards from 547f5ea8e to 3e4655369 ...(rc 1).