Skip to content

fix(guardrails): enablement probe honors local-only plugin scope - #1079

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/1045-local-scope-enablement
Jul 22, 2026
Merged

fix(guardrails): enablement probe honors local-only plugin scope#1079
kyle-sexton merged 1 commit into
mainfrom
fix/1045-local-scope-enablement

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Summary

Audit f2 residual (#912; follow-up to #916 / PR #928): source_control_enabled() in flag-commit-pr-skill-bypass.sh counted a settings.local.json value only when the project settings.json already declared the same key. A plugin enabled ONLY at local scope — claude plugin install --scope local, a first-class state per the official plugins reference — therefore resolved as disabled, and the gh pr create advisory never fired (same silent false-negative class #916 fixed for user-global).

A local value now participates in per-key resolution unconditionally, matching the documented scope precedence (Local > Project > User). The two tests that encoded the old "a local-only key is ignored" model are inverted, plus a new local-only-enable-with-no-other-scope case.

Docs consulted per the fresh-docs mandate: settings scope precedence, --scope local.

guardrails 0.12.00.12.1 with CHANGELOG entry.

Test plan

  • flag-commit-pr-skill-bypass.test.sh — 28/0 (red-first: 3 new/inverted local-scope cases)
  • scripts/check-changelog-parity.sh --check-bump main — pass
  • shellcheck clean

Related

🤖 Generated with Claude Code

Closes #1045 (audit umbrella #912, f2 residual; follow-up to #916/#928).

source_control_enabled() counted a settings.local.json value only when
the project settings.json already declared the same key, so a plugin
enabled ONLY at local scope (claude plugin install --scope local — a
first-class state per the official plugins reference) resolved as
disabled and the gh pr create advisory never fired. A local value now
participates in per-key resolution unconditionally, matching the
documented Local > Project > User precedence. Red-first: the two tests
encoding the old "local-only key is ignored" model are inverted, plus a
new local-only-with-no-other-scope case. Suite 28/0.

guardrails 0.12.0 -> 0.12.1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton enabled auto-merge (squash) July 22, 2026 21:24
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@github-actions

Copy link
Copy Markdown

Warning

Automated review did not complete — this is an infrastructure failure, not a review verdict.

Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."

Re-running the job, or pushing a new commit, will retry the review.

@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@github-actions

Copy link
Copy Markdown

Warning

Automated security review did not complete — this is an infrastructure failure, not a review verdict.

Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."

Re-running the job, or pushing a new commit, will retry the review.

@kyle-sexton
kyle-sexton merged commit 0afe0ac into main Jul 22, 2026
25 checks passed
@kyle-sexton
kyle-sexton deleted the fix/1045-local-scope-enablement branch July 22, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

guardrails: enablement probe ignores local-only plugin scope (settings.local.json without project key)

1 participant