[rendering-scripts] Fix Pi log parser: surface provider errors from empty-content turns - #62155
Draft
github-actions[bot] wants to merge 1 commit into
Draft
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
transformPiV3Entries/computePiV3Stats only rendered turn_end message content (text/toolCall); a turn that fails at the provider request level (e.g. HTTP 400 model_not_supported) ends with content: [] and no tool calls, so the only trace of the failure — the top-level errorMessage — was silently dropped, producing a step summary with no visible explanation for why the run had no output. Found while auditing run 35497537350 (AI Moderator workflow), whose Pi CLI turn failed with a 400 model_not_supported error and rendered an empty conversation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Run 35497537350 (AI Moderator workflow) failed with a silent, empty step summary. Auditing the run showed the Pi CLI's single turn failed at the provider-request level with
400: model_not_supported, andparse_pi_log.cjsrendered no trace of this failure — the conversation section was just empty.Root cause: in the v3 streaming schema, a
turn_endevent that fails before generating any assistant output hasmessage.content: []and notoolCallparts. The only evidence of the failure is a top-levelmessage.errorMessagefield, whichtransformPiV3Entries/computePiV3Statsnever read.Fix
computePiV3Statsnow collectserrorMessagefrom eachturn_end, andparsePiLogpasses those through aserrorson the synthetic stats entry (rendered by the existing**Errors:**block ingenerateInformationSection) and on the normalizedresultlog entry — matching the convention already used byparse_codex_log.cjs.Verified against the actual JSONL stream from the failed run (extracted from the GitHub Actions job log) and added a regression test reproducing it.
Test plan
npm run test:js -- --run parse_pi_log.test.cjs— 28/28 passed (27 pre-existing + 1 new regression test)npm run test:js -- --run render_template— 36/36 passednpm run test:js -- --run log_parser_shared— 160/160 passed🤖 Generated with [Claude Code]((claude.com/redacted)
Warning
Firewall blocked 4 domains
The following domains were blocked by the firewall during workflow execution:
api.anthropic.comapi.github.comcodeload.github.comgithub.com[!TIP]
api.github.comis blocked because GitHub API access uses the built-in GitHub tools by default. Instead of addingapi.github.comtonetwork.allowed, usetools.github.mode: gh-proxyfor direct pre-authenticated GitHub CLI access without requiring network access toapi.github.com:See GitHub Tools for more information on
gh-proxymode.To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.