You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEA]: enforce co-dependent values to stay in sync via blockwatch #3221
Is your feature request related to a problem? Please describe.
Several values in cuda-python are written in more than one file. One of them has a Python script that checks it, and the others only have a "keep in sync" comment:
concurrency.group in build-docs.yml, coverage.yml and cleanup-pr-previews.yml; GH_PAGES_PUBLISH_LOCK in cleanup-pr-previews.yml; ci/cleanup-pr-previews
No, only a "Must match every job that writes to gh-pages" comment
Describe the solution you'd like
Add blockwatch, a linter I am working on, as one pre-commit hook.
The rules are defined in the source code comments or in blockwatch.toml.
For example:
# ci/versions.yml is the source of truth. The pixi environments# must pin the same major.minor versions (13.4.2 in CI, "13.4.*" in pixi).
[[block]]
target = '{cuda_bindings_13,cuda_core}/pixi.toml#/feature/cu13/dependencies/cuda-version'same-as = 'ci/versions.yml#/cuda/build/version'same-as-pattern = '^(?P<value>\d+\.\d+)\.'
The change:
replaces ci/tools/check_pixi_cuda_version.py and its check-pixi-cuda-version hook with two rules
adds checks for the backport branch and the gh-pages lock name
updates the "keep in sync" comments to say that blockwatch.toml checks them
A failure looks like this, after bumping cuda.build.version to 13.5.0 without touching the pixi files:
Block cuda_core/pixi.toml:(unnamed) at line 11 of "blockwatch.toml" disagrees with
ci/versions.yml#/cuda/build/version: ["13.4"] != ["13.5"]
The hook installs a prebuilt binary from PyPI (blockwatch-cli, wheels for Linux, macOS and Windows).
A full run takes about 0.05 s.
Extending check_pixi_cuda_version.py, or adding a script per value. Each new value would then need its own parsing and its own hook.
Additional context
I'd be happy to open the PR here if this looks useful to you. The tool is capable of doing a lot more than the example PR does (it is minimal on purpose), feel free to ask any questions.
Thanks!
@rwgk@leofang looks like CodeRabbit already mentioned this issue in 3 other PRs (see above). Would you like me to open a PR in this repo (it will be similar to mennanov#1)?
@mennanov Thanks for the thoughtful proposal and the working example. We discussed this feature request within the team. We can see the value in checking these relationships automatically, but feel smaller community-driven projects might be a better fit while blockwatch is still at such an early stage. I'm closing this FR as not planned for now.
Activity
mennanov commentedon Nov 5, 2026
@rwgk @leofang looks like CodeRabbit already mentioned this issue in 3 other PRs (see above). Would you like me to open a PR in this repo (it will be similar to mennanov#1)?
rwgk commentedon Nov 9, 2026
@mennanov Thanks for the thoughtful proposal and the working example. We discussed this feature request within the team. We can see the value in checking these relationships automatically, but feel smaller community-driven projects might be a better fit while blockwatch is still at such an early stage. I'm closing this FR as not planned for now.