Add pre-commit CI checks and skills-signature validation#137
Merged
Conversation
87851b7 to
49655a1
Compare
Collaborator
Author
|
/ok to test f1ae611 |
Collaborator
Author
|
/ok to test 7a01e7c |
7a01e7c to
30a3119
Compare
Collaborator
Author
|
/ok to test 30a3119 |
30a3119 to
e19b1bd
Compare
Collaborator
Author
|
/ok to test e19b1bd |
Collaborator
Author
|
/ok to test b7cc082 |
b7cc082 to
e19b1bd
Compare
Bessss-zyw
approved these changes
Jun 9, 2026
Add .pre-commit-config.yaml with trailing-whitespace, end-of-file, YAML/JSON validation, JSON pretty-format, and ruff lint/format checks. Add a CI job in tilegym-ci-infra-tests.yml that runs pre-commit on the files changed by each pull request.
- Remove standalone pre-commit.yml; merge pre-commit job into tilegym-ci-infra-tests.yml alongside python-formatting and spdx-headers-check. - Add check-skills-signatures job backed by check_skills_signatures.py. Fails if skills/ content is modified without a subsequent /nvskills-ci run. - Update .pre-commit-config.yaml: remove skills/ exclusions, exclude evals/evals.json from pretty-format-json to preserve key order and literal non-ASCII characters (e.g. em-dashes).
Exclude *.sig files from whitespace and JSON-format hooks to avoid modifying NVSkills signature artifacts. Drop --no-sort-keys (redundant since evals.json is already excluded from pretty-format-json).
Set SKIP=ruff-check,ruff-format in the pre-commit CI job so ruff is handled exclusively by the python-formatting job (whole-repo scan), avoiding duplicate ruff runs on changed files. Add an if: failure() hint step to python-formatting and pre-commit jobs suggesting users run 'bash format.sh' to fix issues locally.
e19b1bd to
21472a6
Compare
Collaborator
Author
|
/ok to test 21472a6 |
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
Adds pre-commit hooks and two new CI jobs to catch formatting issues and stale skill signatures automatically.
What's included
.pre-commit-config.yaml— hooks:trailing-whitespace,end-of-file-fixer(all text files, excluding.sigand.patch)check-yaml,check-json,pretty-format-json(--indent=2)check-added-large-filesruff-check(--fix) andruff-format(Python only), pinned to ruff0.14.9evals/evals.jsonexcluded frompretty-format-jsonto preserve canonical key ordering and literal non-ASCII characters (e.g. em-dashes)*.sigfiles excluded from all modifying hooks (NVSkills signature artifacts)pre-commitjob (intilegym-ci-infra-tests.yml) — runs the hooks on files changed by each PR. Ruff is skipped here (SKIP=ruff-check,ruff-format) sincepython-formattingalready handles ruff for the whole repo.check-skills-signaturesjob (intilegym-ci-infra-tests.yml) — fails ifskills/content is modified without a subsequent/nvskills-cirun. Backed by.github/scripts/check_skills_signatures.py, which compares the timestamp of the latest non-.sigskills commit against the latest bot commit whose message starts with the configured signature title.format.sh— runbash format.shlocally to install and apply all hooks in one step before pushing.Why
ruffonly covers Python. Markdown, YAML, and JSON files had no automated gate, allowing trailing whitespace, missing final newlines, or malformed JSON to slip in. The pre-commit hooks close that gap.The
check-skills-signaturesjob prevents PRs from merging with stale skill signatures — a common mistake when skill content is updated but/nvskills-ciis forgotten.CI Configuration