-
Notifications
You must be signed in to change notification settings - Fork 0
fix: improve Claude Code summary extraction with structured_output #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changes: - Add permissions block with id-token: write for OIDC auth - Update actions/checkout to v6 - Pin claude-code-action to SHA for security - Reduce diff_content limit from 200 to 50 lines (avoid memory limit) - Use structured_output with JSON schema for reliable extraction - Change model from opus to sonnet-4-5 (cost/performance) - Increase max-turns from 1 to 3 for reliability - Add continue-on-error for graceful degradation - Use env block for safe JSON handling
📝 WalkthroughWalkthroughA GitHub Actions workflow configuration update that upgrades checkout and Claude Code Action versions, adjusts AI model parameters from opus to sonnet with increased token/turn limits, refines summary extraction logic to prioritize structured output with character truncation, and reformats Discord notification fields by removing emoji prefixes from labels. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/notify-changes.yml:
- Around line 143-145: The current sed substitution on SUMMARY (the line using
sed 's/```[^`]*```//g') won't match multiline code fences; change the
transformation so SUMMARY has multiline code blocks removed reliably—either run
SUMMARY through a single-command Perl regex that enables dot-all matching to
strip ```...``` spans or first collapse newlines to a single byte stream before
applying the existing sed, then restore/truncate; update the operation that
assigns SUMMARY to use one of these approaches and keep the subsequent tr and
head truncation intact.
| # Clean up the summary | ||
| SUMMARY=$(echo "$SUMMARY" | sed 's/```[^`]*```//g' | tr '\n' ' ' | head -c 1000) | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sed pattern may not remove multiline code blocks.
The regex s/```[^]*```//gdoesn't match across newlines in basic sed, so multiline code blocks may not be fully stripped. Consider usingawk` or piping through `tr '\n' '\x00'` first if this becomes an issue.
For now, this is acceptable since the truncation and Discord's field limit provide a safety net.
🤖 Prompt for AI Agents
In @.github/workflows/notify-changes.yml around lines 143 - 145, The current sed
substitution on SUMMARY (the line using sed 's/```[^`]*```//g') won't match
multiline code fences; change the transformation so SUMMARY has multiline code
blocks removed reliably—either run SUMMARY through a single-command Perl regex
that enables dot-all matching to strip ```...``` spans or first collapse
newlines to a single byte stream before applying the existing sed, then
restore/truncate; update the operation that assigns SUMMARY to use one of these
approaches and keep the subsequent tr and head truncation intact.
Summary
Claude Code Actionによる要約生成の信頼性を向上させるための修正です。
問題点
max-turns: 1が厳しすぎて20%の失敗率変更内容
id-token: write追加(OIDC認証用)structured_output優先、env:ブロック使用continue-on-error: true追加Test plan
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.