Add pre-commit hooks for Objective favorite and mujoco_viewer validation#517
Merged
davetcoleman merged 1 commit intomainfrom Mar 3, 2026
Merged
Add pre-commit hooks for Objective favorite and mujoco_viewer validation#517davetcoleman merged 1 commit intomainfrom
davetcoleman merged 1 commit intomainfrom
Conversation
davetcoleman
commented
Feb 22, 2026
d3622da to
cfeb17e
Compare
Member
Author
|
This won't pass until #516 is merged in (and cherry picked to main), which fixes the original problem. |
cfeb17e to
10eebbe
Compare
3 tasks
10eebbe to
5743513
Compare
Member
|
These would be much better suited as part of the |
…tion Adds two local pre-commit hooks as bash scripts: - check-objective-favorites: Ensures non-runnable Objectives are not favorited and enforces a max of 8 favorites per config package - check-mujoco-viewer: Ensures mujoco_viewer is disabled in config files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
287588d to
1e58fe0
Compare
Member
Author
|
Reworked per your feedback — moved from GHA workflow jobs to local pre-commit hooks (bash scripts in |
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
Converts the CI validation checks into local pre-commit hooks per @JWhitleyWork's feedback, so they run on every commit and as part of the existing
pre-commitCI job (no additional GHA servers needed).Adds two bash scripts under
scripts/aslocalpre-commit hooks:check_objective_favorites.sh— Enforces two rules:<Metadata runnable="false"/>) must not be favoritedcheck_mujoco_viewer.sh— Ensuresmujoco_vieweris not set totruein any committed config fileBoth hooks are triggered by relevant file patterns (
.xmlandconfig.yamlrespectively) and run via the existingformat.yamlCI workflow.Test plan
bash scripts/check_objective_favorites.shandbash scripts/check_mujoco_viewer.shpre-commit run --all-filespre-commitjob passes on this PR_favorite="true"to a non-runnable Objective causes pre-commit to fail🤖 Generated with Claude Code