fix(local-review): a profile it cannot read says so, and the self-test catches a broken setup - #20
Conversation
…t catches a broken setup A profile: that is not a literal (an expression, a value it cannot parse) silently became general, so the local review could differ from CI's; it now says so and points at --profile, and a comment after the value is read. The self-test built its scratch repositories with errexit off, so a broken setup passed unnoticed; it runs in a shell of its own now. One case passed --no-claude twice. The README and claude-review.yml say that central-ref must follow a pinned uses: line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s declaration is skipped The local review found that a bare profile: key, as claude-review.yml declares its input, raised the new warning and could hide the caller's value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ped too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude review · risk high · complexity medium · type fixThis PR makes four changes to the local review. (1) It reads I traced the new parsing against the real workflows and templates ( Small description nit: it says three new test cases, but the diff adds four (the flow-style No security, permissions or pinning changes. Rated high only because it sits on the policy's high-risk paths.
Policy floor: high (touches high-risk paths: .github/workflows/claude-review.yml, README.md, scripts/local-review.sh). Reviewed 241b8f3 (whole pull request; review 1 of 5 automatic). Author trusted for auto-merge: true. 🤖 AI review · claude-opus-5-5 (Anthropic) · $0.35, 8 turns |
📝 What changes
Five small fixes to the local review, left over from #16 and #28.
profile:it cannot read says so. A workflow that passes the profile as an expression (or anything that is not a plain name) silently becamegeneral, so the local review could differ from CI's. It now prints that the review usesgeneraland points at--profile. A comment after the value (profile: plugin-wp # the stack) is read correctly.test_casebuilt its scratch repository inside$( … ) && …, where errexit is off, so a setup step that failed went unnoticed. The setup runs in a shell of its own with-euo pipefail, and a failure is reported.profile:with a value is read. A bareprofile:or aprofile: { type: … }map (an input's declaration, as inclaude-review.yml) is skipped, so it neither hides the caller's value nor raises the warning.--no-claudetwice (test_casealways adds it).central-reffollows a pinneduses:. The README and the header ofclaude-review.ymlsay that a caller pinninguses:to a version passes the same version ascentral-ref, or the workflow runs at its pin while the policy and the brief followv2.💡 Why
The local review promises the same answer CI will give; a profile read wrong breaks that without a word. A self-test that cannot fail its own setup proves less than it seems.
🧪 How I tested it
bash scripts/local-review.sh --test: every case passes, including three new ones (a profile with a comment after it, an input declaringprofile:before the caller's value, a profile that is not a literal)🤖 AI-generated · Claude Opus 5.5 (Anthropic)