[CI] Add pre-commit hook to validate test/registered/ files have CI registry#22308
Merged
Kangyan-Zhou merged 3 commits intomainfrom Apr 8, 2026
Merged
[CI] Add pre-commit hook to validate test/registered/ files have CI registry#22308Kangyan-Zhou merged 3 commits intomainfrom
Kangyan-Zhou merged 3 commits intomainfrom
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
Author
|
failed correctly at: https://github.com/sgl-project/sglang/actions/runs/24114226875/job/70354939941?pr=22308 |
…egistry Files under test/registered/ are collected by run_suite.py's collect_tests() which requires every file to have a register_*_ci() call. Missing registrations break CI with: ValueError: No CI registry found in <file> This pre-commit hook reuses ut_parse_one_file() from ci_register.py (AST-based parsing) to catch the error at commit time. Uses the same file filtering as run_suite.py (skips conftest.py and __init__.py).
f128277 to
f84e449
Compare
Collaborator
Author
This reverts commit 0312d93.
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
scripts/ci/check_registered_tests.pypre-commit hook that validates all.pyfiles undertest/registered/have aregister_*_ci()calltest/registered/are collected byrun_suite.py'scollect_tests()which requires every file to have a CI registry entry — missing registrations break CI withValueError: No CI registry found__init__.py,conftest.py, andtesting_helpers.pyContext: #22298 fixed a case where a file was placed in
test/registered/without registration, breaking all CI suitesTest plan
pre-commit run check-registered-tests --all-files)