Claude review: read the review from the agent's final message - #1796
Claude review: read the review from the agent's final message#1796Janpot wants to merge 8 commits into
Conversation
Deploy previewBundle sizeTotal Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) Show details for 71 more bundles@mui/internal-docs-infra/abstractCreateDemo parsed: 0B(0.00%) gzip: 0B(0.00%) PerformanceTotal duration: 17.58 ms +2.28 ms(+14.9%) | Renders: 5 (+0) | Paint: 61.25 ms +3.85 ms(+6.7%)
3 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Claude review GitHub Actions workflow to stop using --json-schema structured output and instead publish the agent’s review directly from the agent’s plain final message stored in the execution log result entry, eliminating intermittent mis-formatting failures caused by re-emitting the review into a JSON field.
Changes:
- Remove the
--json-schemarequirement so the agent produces the review only once (as its final message). - Adjust the prompt contract so the agent’s final message is the complete Markdown review (no preamble/sign-off).
- Update the “Publish review” step to read both cost stats and the review body from the execution log’s
resultentry (runResult.result) instead ofstructured_output.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Forcing the review back through
--json-schemamade the agent re-emit it into areviewfield, and that copy was mis-formatted intermittently:= PLACEHOLDER =— the agent stubbed the field instead of copying the review (seen on a real PR).reviewheld{"review":"…"}, so the raw JSON got posted (base-ui#5455).Both are the same failure: a redundant re-emit of a long block the agent already produced. This drops
--json-schemaentirely and reads the review from the agent's plain final message (.resultof the execution log's result entry, which the Publish step already opens for the cost/turn stats). The agent produces the review once; there's no field to mis-format, so both failure modes are structurally impossible. Agent still has zero write tools.Note: I couldn't run the local end-to-end validation this session (the worktree-isolation guard blocks nested
clauderuns), so the final confirmation is a CI smoke-test — one@claude reviewon a PR after this merges.