Skip to content

[CI] Validate registered test __main__ before /rerun-test dispatch - #37527

Open
nvpohanh wants to merge 1 commit into
sgl-project:mainfrom
nvpohanh:codex/fix-rerun-test-main-entry
Open

nvpohanh wants to merge 1 commit into
sgl-project:mainfrom
nvpohanh:codex/fix-rerun-test-main-entry

Conversation

@nvpohanh

@nvpohanh nvpohanh commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

[by Codex]

Summary

This makes /rerun-test apply the same registered-test __main__ sanity check that the normal suite path already uses.

Changes

  • load python/sglang/test/ci/ci_register.py from the slash-command handler
  • validate resolved registered test files with collect_tests(..., sanity_check=True) before dispatch
  • add a regression test covering the missing-__main__ rejection path

Validation

  • python3 -m unittest scripts/ci/utils/test_slash_command_handler.py
  • BLACK_NUM_WORKERS=1 SKIP=no-commit-to-branch /home/pohanh/.local/bin/pre-commit run --all-files --show-diff-on-failure

Related


CI States

Latest PR Test (Base): ❌ Run #33587614149
Latest PR Test (Extra): ❌ Run #33587613978
Latest PR Test (AMD ROCm 7.2): ❌ Run #33587614079

_CI_REGISTER_MODULE = None


def _load_ci_register_module():

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use global variable for this or just LRU cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant