Repository navigation
Description
Parent
Refs #16437: Split harness-ops session hooks into session-telemetry and plugin-diagnostics. This is that item's guardrails line, cut out so the hook-unit split could ship without it.
Outcome
guardrails takes the two guards the plan (#16437, decision "guardrails takes the settings-write ask and the connected-page gate") moves into it:
- context-budget's
settings-write-ask.mjs(PreToolUse Write|Edit|NotebookEdit; optionsettings_write_ask_enabled) - review's
connected-page-gate.mjs(PreToolUse Artifact; optionconnected_page_guard_enabled)
Once both are in guardrails, the always-on profile drops context-budget, which then moves to harness-upkeep.
Why it is held
plugins/guardrails/hooks/exec-bash.test.sh:227pins exactly five dispatcher rows in guardrails'hooks.json, each launched byexec-bash.mjs.exec-bash.mjs(lines 650 and 677) spawns only bash scripts, so neither node guard can run through it unchanged.- The auto-mode classifier refused an agent's edit to
exec-bash.test.shthat would have allowed the two node rows. The edit was not retried in any form.
Other files the move touches: review's scripts/check-hook-registration.sh (lines 15-17, which check review's own hooks.json for the gate), review README.md:117, review prerequisites.json:89, and five context-budget setup evals that test the settings_write_ask_enabled toggle.
Options (for the owner)
- The owner authorizes the
exec-bash.test.shchange: a sixth dispatcher row and node rows. Thencheck-hook-registration.shand its test move to guardrails, and the five context-budget evals are reworked. - The settings-write ask runs through a bash wrapper inside the existing Write|Edit run-guards row, and the wrapper exits 0 on its own errors so the guard stays fail-open. The connected-page gate stays in review. This is a partial move, and it changes how a guard fails, which needs a security verdict.
- Leave both guards where they are, and keep context-budget in always-on.
Waiting on
The owner's decision. Nothing here proceeds until the owner picks an option.
Done when
- The owner's choice is recorded on this issue.
- Both guards behave exactly as before in their new home: every case in
settings-write-ask.test.sh(24) andconnected-page-gate.test.sh(22) passes there, plus a headless settings-write ask returning a block with a reason. -
always-on.yamlno longer lists context-budget, which is listed inharness-upkeep.yaml.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 16, 2026
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Understood: move context-budget's settings-write-ask guard and review's connected-page-gate into guardrails, then drop context-budget from the always-on profile and list it in harness-upkeep.
#16517 (comment)
This decision settles the open questions, including the authorization to edit
exec-bash.test.sh. Related: #16437 (parent plan), #16438, #16428. No duplicate or merged fix identified.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 16, 2026
The latest triage verdict holds nothing: admission moved the issue to
status: confirmed; its comment says why.melodic-automation-lanes commentedon Nov 16, 2026
Not admitted to the issue lane: its done-when asks for what an unattended lane run cannot perform: item 1 (tracker-output: "The owner's choice is recorded on this issue."); recommended split: keep the other items here as the admissible issue and move these to a child issue for the host queue (
host-run); it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 16, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Most likely option 1: guardrails gains both node guards through a sixth dispatcher row, always-on drops context-budget, and context-budget moves to harness-upkeep.
Related work
Open questions
RECOMMENDED: Option 1. It completes the stated outcome for both guards and does not change how any guard fails. Basis: plugins/guardrails/hooks/exec-bash.test.sh:227 pins five dispatcher rows; option 2 is partial and needs a security verdict. No Decision recorded comment exists yet.
RECOMMENDED: The owner's Decision recorded comment should state this authorization explicitly. Otherwise the run may be blocked again. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 16, 2026
Decision recorded. Owner, 2026-11-16, on the three options in this issue: "go w/ recommendations". The recommendation was option (a): the change to
plugins/guardrails/hooks/exec-bash.test.shis authorized (a sixth dispatcher row, and rows that launch node guards), so settings-write-ask and connected-page-gate move into guardrails as #16437 planned, and context-budget leaves the always-on profile.Recorded on control-hub#11. The item stays
host-run: the hub session dispatches it to a build session.kyle-sexton commentedon Nov 16, 2026
Decision recorded. Owner, 2026-11-16: "go w/ recomendations". The recommendation was to close #16517, #16438 and #16437 on guardrails' unit suites plus the #16438 headless transcript, with the criterion "a headless settings-write ask returning a block with a reason" reworded to "the guard fires with its reason and the write is blocked".
dceb40c8b5d6e6704850c0416adf28e16f249563.plugins/guardrails/hooks/on main holdssettings-write-ask.mjsandconnected-page-gate.mjswith their test files, and no check run failed at the merged head859539c87a294bbd6b4eb48e94a60c4924f3ecfd.always-on.yamlno longer lists context-budget;harness-upkeep.yamllists it.859539c8, sessioned867279-4407-4ac6-8858-edbf3cc29564): a write to a.claude/settings.jsonwas tried; the hook returnedaskwith its reason; Claude Code's own settings-file check then rejected the write with its own text; the file was not written. The transcript is kept on the owner's machine.askreaching a person as a prompt, since Claude Code's own check rejected the write first. That is why the criterion was reworded. The guard's probe note is updated to say what this run measured in a follow-up pull request.The hook-unit split itself (session-telemetry and plugin-diagnostics) shipped in #16519, merged as
24e622cf.docs(guardrails): say which settings-write modes 2.1.325 did not measure