Skip to content

guardrails: ship the main-checkout edit guard off by default #17015

Description

@kyle-sexton

Why

Owner decision, 2026-11-17 (https://github.com/melodic-software/control-hub/issues/11, Q33): the main-checkout edit guard added by #16954 stays in the plugin but ships off by default; a person opts in. On by default it would deny edits for any consumer who works on the default branch of a solo repository. No release has published the guard yet; the release pull request #17006 is held until this lands.

Change

  • plugins/guardrails/.claude-plugin/plugin.json: block_main_checkout_edit_enabled default false, its description saying it is opt-in; the manifest description lists the guard as opt-in, as it does credential reads.
  • plugins/guardrails/hooks/block-main-checkout-edit.sh: the fallback when the option variable is unset matches the manifest default.
  • README, docs/catalog.md and the changelog fragment: say the guard is opt-in and how to turn it on. The release note no longer announces a new denial.
  • Tests: the default-off case passes an edit; every existing denial case sets the option on.

Done when

Activity

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

    @github-actions
    Contributor

    Size: Medium
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the guardrails plugin manifest, its main-checkout edit hook and test, the README, docs/catalog.md and one changelog fragment; every consumer of the plugin sees the new default, and release PR #17006 waits on it.
    Reversible: yes; revert the change to restore the default-on guard (nothing has been released yet).
    Open questions: none
    I understood this as a request to ship the main-checkout edit guard from #16954 off by default, with the manifest, hook fallback, README, catalog, changelog fragment and tests all saying it is opt-in. The done-when items are exact, and the refinement comment lists the files to change. I found no open duplicate and no merged pull request that already makes this change. #16954 added the guard and #17004 touches the same README, so edits there may conflict.

    Automated triage. A maintainer reviews it.

  4. removed
    needs-triage
    on Nov 18, 2026
  5. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: 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).

  6. melodic-automation-lanes commented on Nov 18, 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: The guardrails main-checkout edit guard from #​16954 ships off by default, with the manifest, hook fallback, README, catalog, changelog fragment and tests all saying it is opt-in.

    Acceptance criteria

    • plugins/guardrails/.claude-plugin/plugin.json: userConfig.block_main_checkout_edit_enabled.default is false and its description says the guard is opt-in instead of 'On by default'
    • plugins/guardrails/.claude-plugin/plugin.json: the top-level manifest description lists the main-checkout edit guard as opt-in, the way it lists credential reads
    • plugins/guardrails/hooks/block-main-checkout-edit.sh line 14: the fallback is ${CLAUDE_PLUGIN_OPTION_BLOCK_MAIN_CHECKOUT_EDIT_ENABLED:-false}, so an unset option exits 0
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh: a new default-off case with the option unset shows an Edit of a tracked file in a main checkout on its default branch is not denied
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh: every existing denial case sets CLAUDE_PLUGIN_OPTION_BLOCK_MAIN_CHECKOUT_EDIT_ENABLED=true, and all of them still pass unchanged in behavior
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh line 140: the manifest-default assertion expects false and its label no longer says 'default on'
    • plugins/guardrails/README.md: the guard's settings-table row (near line 1928) shows default false and says opt-in, and the section near line 1801 no longer says the update adds a new denial; it says how to turn the guard on
    • plugins/guardrails/README.md line 96 and docs/catalog.md line 113 describe the guard as opt-in and how to enable it
    • The changelog fragment .changes/guardrails/feat-16905-main-checkout-edit-guard-63a0a2e3.md says the guard is opt-in and how to turn it on, and no longer announces a new denial
    • bash plugins/guardrails/hooks/block-main-checkout-edit.test.sh and the guardrails run-guards test pass, and the repository's docs and manifest validation checks pass

    External state: none

    Dependencies

    • Release pull request #​17006 is held until this lands; it depends on this issue, not the other way round.

    Related work

    Sources read

    • plugins/guardrails/.claude-plugin/plugin.json:145: option declared with default true and a description ending 'On by default.'
    • plugins/guardrails/hooks/block-main-checkout-edit.sh:14: fallback is :-true
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh:14: the test unsets the option variable, so denial cases currently rely on the default
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh:136: one case sets the option to false
    • plugins/guardrails/hooks/block-main-checkout-edit.test.sh:140: asserts the manifest default is true, labelled 'default on'
    • plugins/guardrails/README.md:1801: says the option is on by default, so updating adds a new denial
    • plugins/guardrails/README.md:1928: settings table row shows default true and 'On by default'
    • plugins/guardrails/README.md:96: mentions the guard; text too long to quote here
    • docs/catalog.md:113: mentions the guard; text too long to quote here
    • .changes/guardrails/feat-16905-main-checkout-edit-guard-63a0a2e3.md:7: changelog fragment announcing the guard

    Automated refinement by the lanes App. Intake triages the issue again with it.

  7. removed
    host-run
    on Nov 18, 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

    high

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions