WIP: make cluster validation Bazel tests, not pre-commit bins#819
Draft
agentydragon wants to merge 1 commit intodevelfrom
Draft
WIP: make cluster validation Bazel tests, not pre-commit bins#819agentydragon wants to merge 1 commit intodevelfrom
agentydragon wants to merge 1 commit intodevelfrom
Conversation
agentydragon
added a commit
that referenced
this pull request
Mar 11, 2026
…lenv isolation) The standalone hook can't run bazel from pre-commit's isolated virtualenv. Work preserved on enforce-bazel-tests-wip branch (PR #819). Next step: merge into unified precommit.py (language: system).
9d4ac2c to
131e273
Compare
f190e4a to
a320e68
Compare
Add a pre-commit hook that verifies all py_test files have corresponding Bazel test targets. Includes benchmark tooling and refactors Bazel query utilities into util/bazel/workspace.py. Migrates cluster validation scripts into proper Bazel test targets.
a320e68 to
2222f41
Compare
agentydragon
added a commit
that referenced
this pull request
Mar 18, 2026
The integration test and validate_cluster pre-commit hook run the same checks. Once PR #819 (enforce affected bazel tests before commit) lands, the pre-commit hook can be removed.
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.
Summary
Pre-commit hook that verifies affected Bazel tests have been run (cached and passing)
before allowing a commit. Uses
bazel test --check_tests_up_to_dateto check the localaction cache.
DUCKTAPE_PRECOMMIT_RUN_TESTS=1Status: blocked
The standalone
language: pythonhook can't run bazel (pre-commit virtualenv can't accessthe bazel output base). Next step: merge into the unified
precommit.pywhich runs vialanguage: system+run_precommit.shwrapper.See
devinfra/precommit/ENFORCE_BAZEL_TESTS.mdfor detailed issues and next steps.Next steps
check_enforce_bazel_tests.pyvalidator module usingutil.bazel.query.run_queryprecommit.pygather +BUILD.bazeldepsalways_run: trueto bazel-precommit, setPRECOMMIT_HOOK=1inrun_precommit.sh.pre-commit-config.yamlenforce_bazel_tests.py