Skip to content

fix(report): use section-based prompt length limits (#634)#635

Merged
Kewton merged 1 commit intodevelopfrom
fix/634-prompt-length
Apr 5, 2026
Merged

fix(report): use section-based prompt length limits (#634)#635
Kewton merged 1 commit intodevelopfrom
fix/634-prompt-length

Conversation

@Kewton
Copy link
Copy Markdown
Owner

@Kewton Kewton commented Apr 5, 2026

Summary

  • プロンプト全体の上限を MAX_MESSAGE_LENGTH (10000) 依存からセクション別予約枠方式に変更
  • MAX_PROMPT_LENGTH (30000) を新設し、各セクションに独立した上限を設定:
    • MAX_USER_DATA_LENGTH (8000) — チャットメッセージ
    • MAX_COMMIT_LOG_LENGTH (3000) — コミットログ(既存)
    • MAX_ISSUE_CONTEXT_LENGTH (3000) — Issue情報
  • user_dataが大きい場合でもcommit_log/issue_contextが確実に保持される
  • Issue番号抽出パターンを拡張(feat(NNN): 形式も対象)
  • 7テストケース追加

Closes #634

Test plan

  • npx tsc --noEmit — PASS
  • npm run lint — PASS
  • npm run test:unit — PASS
  • npm run build — PASS

🤖 Generated with Claude Code

…t_log and issue_context

Previously, buildSummaryPrompt used MAX_MESSAGE_LENGTH (10000) for the
entire prompt, causing commit_log and issue_context to be dropped when
user_data was large. Now each section has independent limits:
MAX_USER_DATA_LENGTH (6000), MAX_ISSUE_CONTEXT_LENGTH (3000),
MAX_COMMIT_LOG_LENGTH (3000), with MAX_PROMPT_LENGTH (15000) as the
overall cap.

Resolves #634

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Kewton Kewton merged commit ae9d940 into develop Apr 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant