Repository navigation
codex hooks: register the scheduler action guard for PyAutoBrain - #520
Merged
Merged
Conversation
…-campaign p5c) Human-approved 2026-10-31 (PyAutoBrain#547): the guard merged in PyAutoBrain#548 refuses raw sbatch/scancel/srun/salloc/mutating scontrol/ autofit.campaign submit outside hpc/sync act. Same payload contract as mind-commit-guard, so Brain opts in beside it. The Claude registration is in the workspace-root .claude/settings.json (local). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the adapters A PR that adds a Codex hook (this one) or opts a repo in cannot make the installed .codex/hooks.json on the cloned mains match: session_hook_propagate writes them after merge, so the leg was red by construction. The fourth skip, same shape as the hook / where-to-file / organism-map ones (human pick 2026-10-31): - a codexpr step renders every repo's adapter from the PR's base tree and its head (scripts/codex_hooks_render.py) and sets codex_pr only when they differ — never guessed from the changed-file list; - the compensating control runs test_codex_hook_sync.py and refuses a render error; the drift step drops 'generated Codex hooks' with a loud banner; on push to main nothing is skipped. Pinned workflow tests updated; full suite 711 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This registers the scheduler action guard for Codex, the last step of hpc-campaign p5c (PyAutoBrain#547). The guard merged in PyAutoBrain#548, and you approved registration on 2026-10-31.
CODEX_HOOK_DEFINITIONSgainsscheduler-action-guard, with the matcherBash. It uses the same PreToolUse payload contract asmind-commit-guard.codex_hooksinrepos.yamlopts in, besidemind-commit-guard.session_hook_propagate.ymlregenerates Brain's.codex/hooks.json. Codex then asks you to trust the new hook hash with/hooks..claude/settings.json, which is local. It was live-tested: a rawscancelwas denied.Tests:
tests/test_codex_hook_sync.py, 8 passed.🤖 Generated with Claude Code