Repository navigation
feat(guardrails)!: move the settings-write ask and connected-page gate into guardrails - #16543
Conversation
…tcher rows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
…e into guardrails guardrails now runs context-budget's settings-write-ask.mjs on its Write|Edit|NotebookEdit group and review's connected-page-gate.mjs on a new Artifact group, each as a bare node row with its old timeout and status message. Decision logic, fail-open behavior and option env vars are unchanged; only the reason prefix now reads "guardrails:". The settings_write_ask_enabled and connected_page_guard_enabled options move with them, so a user who changed either sets it again under guardrails. context-budget keeps only its live-breakdown module; its setup skill drops the toggle report and route, and the setup evals that tested the toggle are removed or rewritten. review registers no hook, so its check-hook-registration.sh and test go, with their README, notice and eval references. The always-on profile drops context-budget, which joins harness-upkeep. Refs: #16517 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac7e0bda60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… suite The moved suite built its pages with review's build-digest.mjs, so it failed from an isolated guardrails install and broke the rule that a plugin's hooks depend on no other plugin's files. It now writes its own two pages: one whose content security policy names a loopback connect-src, one with none. All 22 cases keep what they assert; review's own explain-change suite still checks that a --connect page names its origin in connect-src. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
Lane run report
Failed GitHub API calls
|
|
claude-security-review reviewed Security review (incremental, bdbea7d → 859539c): blocking onlyI read every hunk of all 9 files in the incremental scope. They are 2 changelog fragments, the context-budget audit and setup skills, the guardrails README, review's explain-change skill, What changed. The push adds warnings in response to this lane's two earlier IMPORTANT manifest flags: the moved
Instruction-surface lens. No standing instruction is deleted, narrowed or softened. Every edit adds a disclosure or a stricter "always say" rule. I did not read the protected-class register in this pass; I judged by consequence. Prior findings. Both earlier manifest flags sit on Settled thread. The PR text. None of the PR text tries to direct this review. critical-findings: 0 |
|
claude-review reviewed Code review: incremental (bdbea7d → 859539c), blocking onlyI read every hunk of all 9 files in the incremental diff. This lane already reviewed an earlier head, so this review reports blocking findings only. What changed
Prior findings: the one earlier post has no line anchor, and the review fragment's line on the session-bridge port exposure now covers its theme. Nothing blocking is left to restate. Spend: none in this push beyond the existing test suite. No blocking findings. Verifier dropped 0 of 0 candidates. |
…tifact build-digest.mjs --connect now says on stderr, whether or not guardrails is enabled, that the page is local-only, works only on this machine and must never be published as an Artifact. Stdout still prints only the page path. The review and context-budget fragments now say what an install without guardrails enabled loses after the guard move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
context-budget's audit fix and setup check, and review's explain-change and setup, now state that the settings-write ask and the connected-page gate ship in guardrails and run only when it is enabled, with the enable command. The statement is unconditional: guardrails' one skill is user-only, so no available-skills gate can tell whether it is enabled (docs/contracts/seam-phrasing/README.md). guardrails' README lists both guards in its kill-switch table, and its guard count matches the manifest's 20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4
|
Owned by the control-hub session "Plugin Presets". CI, both review lanes and pr-verify are clean at 859539c. It waits on the owner's decision on the two open security-lane threads (installs with context-budget or review enabled without guardrails). Other sessions: do not push, answer or resolve threads, or merge; message the hub session. |
Refs: #16517
Refs: #16438
Refs: #16437
Summary
guardrails takes the two guards #16437 planned for it, on the owner's option (a) for #16517 ("go w/ recommendations"):
settings-write-ask.mjs, PreToolUseWrite|Edit|NotebookEdit, optionsettings_write_ask_enabled) moves from context-budget;connected-page-gate.mjs, PreToolUseArtifact, optionconnected_page_guard_enabled) moves from review.The
always-onprofile drops context-budget, which moves toharness-upkeep.Fix
git mv. The decision logic, matched tools, ask/deny output, option names and fail-opencatchblocks are unchanged. Only the plugin-name prefix in each reason changes:context-budget:andreview:becomeguardrails:.hooks.jsongets the same rows the guards had, as plainnode <guard>.mjsrows with the same timeout (30 and 10) and status message. The settings-write ask joins the existingWrite|Edit|NotebookEditgroup, and a newArtifactgroup holds the gate.exec-bash.mjsis not touched. context-budget'shooks.jsonkeeps only its module. review'shooks.jsonis deleted, because the gate was its only row.exec-bash.test.sh(owner-authorized): it admits exactly these two bare PreToolUse node rows beside the unchanged five dispatcher rows and one workflow row.userConfigentries move to guardrails'plugin.json. Values set under context-budget or review do not carry over, so users set them again under guardrails. Each changelog fragment says so.scripts/check-hook-registration.shand its test are deleted, because review no longer has a hook to check and nothing in guardrails calls the script. Its references in review's README,prerequisites.jsonand theck-notice-runs-bundled-checkereval go with it.su-headless-toggle-configureandsu-toggle-true-hook-silent.su-node-absent-both-dependentstosu-node-absent-engine-stops.su-check-reportandsu-bare-check-read-only.always-on.yamldrops context-budget andharness-upkeep.yamladds it. guardrails stays inalways-on.yaml, so always-on sessions keep the settings-write ask and the connected-page gate after context-budget leaves the profile.auditfix path andsetupcheck, and review'sexplain-changeandsetupskills, now say the moved guard runs only when the guardrails plugin is enabled, withclaude plugin enable guardrails@<marketplace>. The statement is unconditional, because guardrails' one skill is user-only and never shows as available, so no available-skills gate can detect it (docs/contracts/seam-phrasing/README.md).build-digest.mjsprints a stderr note on every--connectbuild saying the page is local-only and must never be published as an Artifact. stdout still prints only the path. Test:plugins/review/tests/explain-change.test.mjs:1127.scripts/suite-seconds.txtare updated. guardrails' description now names both guards and stays under the 500-character limit.No guard blocks or asks less
The only test edits are each suite's
# test-scope:line and, in the connected-page suite, its two fixture pages, which the suite now writes itself (one whose content security policy names a loopback connect-src, one with none) instead of building them with review'sbuild-digest.mjs, plus the two case names that described that builder. Each guard keeps its fail-open behavior exactly: same file, samenodecommand form, samecatch.Not delivered
#16517's and #16438's done-when also asks for "a headless settings-write ask returning a block with a reason". Neither suite has a headless case.
settings-write-ask.mjs:8-12records an earlier headless probe (Claude Code 2.1.263) in which the ask surfaced as a block carrying the reason. Proving it at the new home needs one realclaude -psession with guardrails loaded from this branch, and that waits for the owner's sign-in. For that reason this PR refs #16517, #16438 and #16437 instead of closing them.Verification
plugins/guardrails/hooks/exec-bash.test.shpasses with 5 dispatcher rows, plus the 2 node guard rows it now requires. It failed red before the rows landed.hooks.json,node-notice-rows,check-hook-exec-form,check-guardrails-ps-differentialandgenerate-catalogall pass.validate-plugin-contracts.mjs(65 setup skills) andcheck-plugin-profiles.sh.sync-shared-copies.sh --check(929 copies) andcheck-changelog-fragments.sh --check(4 fragments).check-hook-exec-form.sh,check-exec-form-windows-probe.sh(Windows probes skipped on Linux),test-plugin-mods.sh(12 passed) andvalidate-plugins.sh.--checkmodes.validate-cases.pyreports 0 FAIL over the context-budget and review eval suites.check-affectedpassed.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmdCmAR8kz5HUzUvWB4