Skip to content

[rendering-scripts] Fix Pi log parser: surface provider errors from empty-content turns - #62155

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-pi-log-parser-silent-provider-error-86a47351fb96a8c7
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
fix-pi-log-parser-silent-provider-error-86a47351fb96a8c7

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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, and parse_pi_log.cjs rendered no trace of this failure — the conversation section was just empty.

Root cause: in the v3 streaming schema, a turn_end event that fails before generating any assistant output has message.content: [] and no toolCall parts. The only evidence of the failure is a top-level message.errorMessage field, which transformPiV3Entries/computePiV3Stats never read.

Fix

computePiV3Stats now collects errorMessage from each turn_end, and parsePiLog passes those through as errors on the synthetic stats entry (rendered by the existing **Errors:** block in generateInformationSection) and on the normalized result log entry — matching the convention already used by parse_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 passed
  • npm 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.com
  • api.github.com
  • codeload.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"
    - "api.github.com"
    - "codeload.github.com"
    - "github.com"

See Network Configuration for more information.

Generated by ✅ Daily Rendering Scripts Verifier · claude · agent · 621.3 AIC · ⌖ 8.14 AIC · ⊞ 10.7K ·

  • expires on Sep 23, 2026, 12:02 AM UTC-08:00

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-fix javascript Pull requests that update javascript code rendering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants