Repository navigation
feat(guardrails): make the fix-request post guard configurable - #12014
Conversation
Add fix_request_post (block default, allow) to a repository's tracked docs/conventions/guardrails.yaml, with schemas/guardrails.schema.json. Under allow, block-fix-request-post lets a would-be block through; an untracked file, missing key, unparsable file or other value keeps block. The lookup runs only on a would-block call. This repository sets allow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-review reviewed Code review (incremental, 09d445a..9438be0): PR #12014,
|
|
claude-security-review reviewed Security review (incremental): PR #12014, since
|
Read the setting from origin/HEAD instead of the working tree, so the session the guard constrains cannot lift it with an edit and git add. Adds a test: allow staged over block on the default branch still blocks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgcHpe4YpFuL5b24Ft2
State that the setting is read from the session's repository and applies to posts to any repository, and list cross-repository posts and a rewritten local origin/HEAD as known gaps. Pin the behavior with a test: a -R post from an allow repository passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves the guardrails README guard table: #12014's fix-request row, then the block-github-post-content row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: owner decision in session under standing direction §10
Summary
The guardrails hook
block-fix-request-poststops sessions from posting the PR-fix lane fix request. The risk it names is a prompt-injected agent steering the lane, which comes from our own actors. The owner ruled that this repository lifts the guard. This PR makes the guard configurable per repository instead of deleting it, so hardening it later takes a one-line config change.Fix
fix_request_post(blockorallow) indocs/conventions/guardrails.yaml, read from the repository's default branch (origin/HEAD, never the working tree or index, so the guarded session cannot lift it with an edit andgit add), validated by the newplugins/guardrails/schemas/guardrails.schema.json. The default staysblock, so consumer repositories behave as before.allowit exits 0. No such ref or file, a missing key, a file that does not parse, or any other value keepsblock; the last two print a notice naming the file and value.no-floor) record the surface.docs/conventions/guardrails.yamlsetsallow.Verification
plugins/guardrails/hooks/block-fix-request-post.test.shbefore the hook change: the new stay-quiet case failed,FAIL: quiet: allow mode, phrase posted (direct, dispatched): expected '0 0', got '2 2'(PASS=302 FAIL=5).allowonly staged with no default branch,allowstaged overblockon the default branch (the security-review finding), an unknown value, a missing key, and a file that does not parse (all still block). Every existing block-mode case passes. The fixture directory is now its own git repository, so a checkout around the temp directory cannot change the result.scripts/check-convention-yaml.sh: 13 files parse and validate.scripts/sync-config-cascade-semantics.py --check: up to date.scripts/check-changelog-fragments.sh --check: valid.scripts/validate-plugin-contracts.mjs: passes. shellcheck and shfmt: clean.Related
🤖 Generated with Claude Code