fix(ci): enforce legacy docs/ gate in Lint workflow#4
Closed
zijiexia wants to merge 3 commits into
Closed
Conversation
Owner
Author
|
Superseded by upstream PR sgl-project#26322 — this PR was opened against my own fork by mistake. |
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
check-no-docs-changespre-commit hook (introduced in 8750885) readsgit diff --cached --name-only, which is empty on a fresh CI checkout. As a resultpre-commit run --all-filesin theLintworkflow has been a no-op for this gate, and many PRs landeddocs/changes since the hook was enabled ([diffusion] Generalize layerwise offload residency mixin to all components sgl-project/sglang#24593, Add IntraNode NVLink configration in PD disaggregation docs sgl-project/sglang#23329, [env] Make max KV chunk capacity configurable viaSGLANG_MAX_KV_CHUNK_CAPACITYsgl-project/sglang#25120, feat: [2/2][DeepEP] Add waterfill load balancing for shared expert dispatch sgl-project/sglang#19290, [diffusion] Add performance mode defaults sgl-project/sglang#24491, ...).Reject changes under legacy docs/step to.github/workflows/lint.ymlthat diffsorigin/<base_ref>...HEADand feeds the changed paths to the existingscripts/ci/check_no_docs_changes.py. The pre-commit hook and the script itself are unchanged — the script already accepts paths viasys.argv, so the allowlist (docs/conf.py,docs/_static/css/custom_log.css,docs/_static/js/deprecation_banner.js) is honored automatically.fetch-depth: 0so the merge base is available for the three-dot diff.Why
Without a working CI gate, the rule was only enforced for contributors who had pre-commit installed; everyone else (or anyone using
--no-verify) bypassed it silently.Test plan
actionlint .github/workflows/lint.ymlreports no new findings (one pre-existingsetup-python@v4warning unrelated to this PR).mainwith a probe commit touchingdocs/references/environment_variables.md→ step exits 1 and prints the legacy-docs violation.docs/conf.py(allowlist) → exits 0.python/sglang/srt/__init__.py→ exits 0.docs/files, pass otherwise.🤖 Generated with Claude Code