Skip to content

Move the settings-write ask and connected-page gate into guardrails #16517

Closed

Description

@kyle-sexton

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; option settings_write_ask_enabled)
  • review's connected-page-gate.mjs (PreToolUse Artifact; option connected_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:227 pins exactly five dispatcher rows in guardrails' hooks.json, each launched by exec-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.sh that 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)

  1. The owner authorizes the exec-bash.test.sh change: a sixth dispatcher row and node rows. Then check-hook-registration.sh and its test move to guardrails, and the five context-budget evals are reworked.
  2. 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.
  3. 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) and connected-page-gate.test.sh (22) passes there, plus a headless settings-write ask returning a block with a reason.
  • always-on.yaml no longer lists context-budget, which is listed in harness-upkeep.yaml.

Activity

  1. added
    host-run
    on Nov 16, 2026
  2. added
    needs-triage
    on Nov 16, 2026
  3. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    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.

    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.sh is 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.

    #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.

  4. added
    needs-owner-decision
    on Nov 16, 2026
  5. melodic-automation-lanes commented on Nov 16, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  6. melodic-automation-lanes commented on Nov 16, 2026

    @melodic-automation-lanes
    Contributor

    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).

  7. melodic-automation-lanes commented on Nov 16, 2026

    @melodic-automation-lanes
    Contributor

    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

    1. Which option does the owner choose: (1) authorize the exec-bash.test.sh change (sixth dispatcher row plus node rows), (2) a bash wrapper inside the Write|Edit row with the connected-page gate staying in review, or (3) leave both guards where they are?
      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.
    2. If option 1 is chosen, may the unattended run edit plugins/guardrails/hooks/exec-bash.test.sh, given that the auto-mode classifier refused that edit earlier?
      RECOMMENDED: The owner's Decision recorded comment should state this authorization explicitly. Otherwise the run may be blocked again. Basis: judgment

    Sources read

    • plugins/guardrails/hooks/exec-bash.test.sh:227: asserts exactly five dispatcher rows, each launched through exec-bash.mjs
    • plugins/guardrails/hooks/exec-bash.test.sh:197: asserts args[0] of each row is exec-bash.mjs

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  8. kyle-sexton commented on Nov 16, 2026

    @kyle-sexton
    MemberAuthor

    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.sh is 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.

  9. removed
    needs-owner-decision
    on Nov 16, 2026
  10. removed
    needs-triage
    on Nov 16, 2026
  11. kyle-sexton commented on Nov 16, 2026

    @kyle-sexton
    MemberAuthor

    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".

    • Both guards run from guardrails: feat(guardrails)!: move the settings-write ask and connected-page gate into guardrails #16543 merged as dceb40c8b5d6e6704850c0416adf28e16f249563. plugins/guardrails/hooks/ on main holds settings-write-ask.mjs and connected-page-gate.mjs with their test files, and no check run failed at the merged head 859539c87a294bbd6b4eb48e94a60c4924f3ecfd.
    • always-on.yaml no longer lists context-budget; harness-upkeep.yaml lists it.
    • The headless run (Claude Code 2.1.325, default mode, guardrails loaded from 859539c8, session ed867279-4407-4ac6-8858-edbf3cc29564): a write to a .claude/settings.json was tried; the hook returned ask with 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.
    • What the run did not show: the hook's ask reaching 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.

  12. removed
    host-run
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions