fix(guardrails): enablement probe honors local-only plugin scope - #1079
Conversation
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>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
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 encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
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. |
Summary
Audit f2 residual (#912; follow-up to #916 / PR #928):
source_control_enabled()inflag-commit-pr-skill-bypass.shcounted asettings.local.jsonvalue only when the projectsettings.jsonalready 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 thegh pr createadvisory 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.0→0.12.1with 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— passRelated
🤖 Generated with Claude Code