Repository navigation
fix(pr-review-cli): keep valid comments past a malformed one and fail the status job in comments mode - #868
Conversation
… the status job in comments mode A comment with a malformed path, line, side or start_line no longer makes the review incomplete: the extract step keeps the valid comments and passes the malformed ones on in `malformed`, and publish lists each in the summary with its readable location, counting a CRITICAL one in critical-findings. A comment with no body is dropped with a warning. The status job's publish and hold steps, and both model jobs' managed settings step, read publish in continue-on-error from their own env. After a composite action runs, the runner evaluates continue-on-error with the action's inputs, so `inputs.publish` was null there and every comments-mode failure concluded success. Refs: melodic-software/claude-code-plugins#9326 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 5m 42s —— View job Code review: pr-review-cli malformed-comment handling
Scope note: Closing issue: no
What I checked:
Not verified by me: I could not execute No correctness or maintainability findings to report. claude-lane-summary: lane=claude-review sha=8e42b91558b25b84945996a1ff72e71ca508ebe5 run=39913835270 |
|
Claude finished @kyle-sexton's task in 4m 0s —— View job Security review —
|
|
claude-security-review has reviewed this pull request through 8e42b91; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 8e42b91; a later push is reviewed from there. |
…contract (#851) Refs: melodic-software/claude-code-plugins#9326 ## Summary Registers `pr-review-cli.yml@9aca743c4ed9aaf7870288a36586c3994e9321e4` (ci-workflows [v0.64.1](https://github.com/melodic-software/ci-workflows/releases/tag/v0.64.1)), so claude-code-plugins callers can re-pin to it. ## Fix v0.64.1 changes only pr-review-cli's extract and publish steps and its `continue-on-error` wiring ([ci-workflows#868](melodic-software/ci-workflows#868)). A malformed review comment no longer drops the whole review, and the status job now goes red in comments mode when no review happened. The contract copies the v0.64.0 entry forward verbatim: same routing, inputs (including `hold-label` and `hold-paths`) and secrets. ## Verification - `node --test runner-policy.test.mjs` in `components/runner-policy`: 339 pass, including the new copy-forward test. ## Related - Same shape as [#849](#849) (v0.63.1). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Refs: melodic-software/claude-code-plugins#9326
Summary
Two pr-review-cli defects, both seen in claude-code-plugins run 39911880667 (PR #9326, code lane, v0.63.1):
failure-class=incomplete. The header's PUBLISH paragraph,publish-review/action.ymlandpublish.cjs(setFailedin comments mode) all say the job goes red, naming the class, when no review happened, andpr-review-cli.test.cjsasserted the publish step'scontinue-on-erroris false in comments mode.Why it stayed green: after a composite action runs, the runner sets the outer step's
inputscontext to the action's own inputs (CompositeActionHandler.cs:173) before it evaluates the step'scontinue-on-error(ExecutionContext.cs:1443). publish-review has nopublishinput, soinputs.publish != 'comments'wasnull != 'comments', which is true. The live job log shows##[error]claude-review: failure-class=incompleteand the inner stepoutcome=failure, while the step and job concluded success. The test missed it because it evaluated the expression with the workflow's inputs.Fix
malformedlist with its path and line where readable (a path with a newline or backtick is left out, so it cannot plant a line in the summary). The valid comments still go inline.findingsis at least valid plus malformed. The other incomplete gates stay: permission mode, full diff, findings count, summary, comment list, hold, size.publish.cjs: lists each malformed comment in the summary under "Findings not posted inline (their path, line or side is malformed)" as- \path:line`: body.countedSummarycounts them like demoted findings, so a CRITICAL one raises thecritical-findings:` line from fix(review): title the pr-review-cli completion notice and count demoted CRITICAL findings #865. When no line exists, the added one does not count them twice. The shadow report carries them too.continue-on-errorreadsenv.PUBLISHon everyuses: $/...step: Publish the review, Apply the hold (its documented "a failed write fails the job" had the same hole), and Apply the Claude managed settings in both model jobs. The hold step gains only aPUBLISHenv entry. Its inputs,ifand behavior are unchanged.actions-expression.cjs(test helper): evaluates theenvcontext.Effect once callers re-pin: every comments-mode failure class goes red, not only
incomplete: auth, rate-limit, no-credential, no-outcome, max-turns, timeout, withheld and publish-failed too.ci-statusdoes not aggregate this check, so the merge queue is not blocked. babysit already holds unless the check is SUCCESS, and the guardrails merge guard blocks a failing check. A run that today passes green with no review will hold there instead.Verification
Run under
nice, one file at a time:node --test .github/scripts/pr-review-cli.test.cjs: 23 pass. Before the fix, three new or changed tests failed: one malformed and one valid comment gives a complete review with 1 comment and 1 malformed; an empty body is dropped with a warning; comments mode makes the composite steps'continue-on-errorfalse when evaluated as the runner does. The old cases that expected a malformed comment to make the review incomplete were changed to expect the new behavior. That is the intended change, not a weaker test.node --test .github/scripts/publish-review.test.cjs: 19 pass. Two new tests: a malformed comment beside a valid one gives 1 inline comment and a summary bullet with findings=2; a malformed CRITICAL raisescritical-findings(0 to 1, or an added line of 1), and a SUGGESTION leaves it unchanged.node --test .github/scripts/*.test.cjs: 637 pass, 0 fail.biome checkandactionlintclean on the changed files.Related
🤖 Generated with Claude Code