ci: enforce pre-commit style check via GitHub Actions - #741
Merged
Conversation
pre-commit's black hook (26.3.1, line-length 160) reformats these three files; clean them up so `pre-commit run --all-files` passes in CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Runs `pre-commit run --all-files` (clang-format v21.1.6 + black 26.3.1, as pinned in .pre-commit-config.yaml) on every PR and on pushes to develop/main, on a plain ubuntu-latest runner — no GPU needed. This replaces the internal analysis:clang-format CI job and enforces the formatting contract already documented in CONTRIBUTING.md. Also fix a stale reference to ci/run_style_check_diff.sh in the frost README (that script is internal-only and superseded by pre-commit). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe change adds a pre-commit GitHub Actions workflow, updates the FROST formatting command documentation, and applies formatting-only changes to benchmark, configuration, and test files. ChangesPre-commit alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
Anerudhan
marked this pull request as ready for review
August 25, 2026 22:21
Merged
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.
What
Adds
.github/workflows/pre-commit.yml: a Style check workflow that runspre-commit run --all-fileson every PR and on pushes todevelop/main, on a plainubuntu-latestrunner (no GPU). Hook environments are cached keyed on the config hash, so steady-state runs take seconds.This enforces in CI exactly what CONTRIBUTING.md already asks contributors to run locally — clang-format v21.1.6 for C++/CUDA and black 26.3.1 (line length 160) for Python/notebooks, as pinned in
.pre-commit-config.yaml— replacing the internalanalysis:clang-formatGitLab job (removed separately), which used unpinned tool versions from the CI image and occupied a GPU runner for a pure text check.Included cleanup
benchmark/attention_inference/benchmark_single_attention.py,benchmark/attention_inference/configs/qwen3vl_vit.py,test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py) so the check passes from day one.benchmark/was never covered by the old script, which is how these drifted.ci/run_style_check_diff.sh(points topre-commit run --all-filesnow).Verification
pre-commit run --all-filespasses locally on this branch (clang-format, black, black-jupyter all green). The workflow itself will run on this PR.🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation
Style