Repository navigation
Conversation
Replace ci/tools/check_pixi_cuda_version.py with blockwatch rules in a new blockwatch.toml, and add rules for two values that were only kept in sync by comments: the backport branch and the gh-pages lock name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Renat Mennanov <[email protected]>
1 task done
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.
Description
This PR enforces the values that are marked as "keep in sync" in the code to stay in sync via blockwatch intuitive rules that run as a pre-commit hook.
It replaces
ci/tools/check_pixi_cuda_version.py(91 lines) and adds checks for two values that were only kept in sync by a comment on each side (in other words: had no checks in place).A full pre-commit hook run takes about 0.05 s, so the hook has no
filesfilter and runs on every commit. CI already runs pre-commit on Linux and Windows.The rules can be declared in the source code comments next to the code they guard or in
blockwatch.tomlRules
CUDA Toolkit version check (replaces
check_pixi_cuda_version.py)A patch bump (
13.4.3) passes. A minor bump that misses a pixi file fails:"12.*"has no minor, so the rule skips it.cuda_bindings_12/pixi.tomlis skipped on purpose, as the script did. After a CUDA major bump, the rule keeps readingcu13and fails with["13.4"] != ["14.0"]until someone changescu13inblockwatch.toml, so it can't pass by mistake.Backport branch (new)
Dependabot opens the backport PRs against the backport branch.
gh-pages lock name (new)
Every job that writes to gh-pages must wait in one concurrency queue, and
ci/cleanup-pr-previewsrefuses to push unless the workflow passes the same lock name. All five copies must match.The "keep in sync" and "Must match" comments next to these values now say that
blockwatch.tomlchecks them.Not replaced
toolshed/check_cuda_core_bindings_floor.pystays. It checks that the toolkit is at least the floor and scans the docs; blockwatch compares equal values.Testing
blockwatchandpre-commit run --all-filespass. For each rule I made a one-sided edit (a minor bump inci/versions.yml, one pixi pin changed or removed, a different backport branch, each copy of the lock name changed), and blockwatch failed on exactly the files out of sync. I ran these on macOS; the Linux and Windows pre-commit jobs run here in CI.Checklist