Skip to content

Conversation

@kkeito-investigate
Copy link
Contributor

@kkeito-investigate kkeito-investigate commented Jan 20, 2026

概要

  • text_hint の制約を超えた場合に LLM で本文・サブタイトル・ノートを枠内に収める
  • 失敗時は本文を維持し warnings に記録する

関連リンク

変更内容

  • MappingStep で LLM 補正と再試行(最大 3 回)を実施し、ai_patch / warnings を記録
  • max_chars / max_chars_per_line の判定に合わせて補正を実行
  • 追加テスト: tests/pipeline/mapping/test_mapping_step_layout_assignment.py
  • ドキュメント更新: docs/todo/20260119-rm076-overflow-llm-fit.md, C:\PPT_test_textyabai\実施事項概要.md

ユーザー影響

  • テキスト溢れ時に内容が自動補正される可能性
  • mapping_log に補正内容と警告が記録される

動作確認

  • ローカルで想定テストを実行した
    • PYTHONPATH=src python -m pytest -n 0 tests/pipeline/mapping/test_mapping_step_layout_assignment.py
    • diff-cover: python -m diff_cover.diff_cover_tool coverage.xml --compare-branch upstream/main(Coverage 100%)
  • 追加の手動確認(スクリーンショット、生成物チェックなど)を実施した
    • 添付ファイル/確認方法: なし
  • 必要なレビュー観点を満たしている

チェックリスト

  • 該当 ToDo のチェックボックスとメモを最新化した
  • ロードマップは対象外(RM-076 実装のため更新なし)
  • Issue 自動クローズ用に Close #542 を PR 本文に記載した
  • Issue に進捗コメントを残した
  • 影響範囲を確認し、必要なドキュメントを更新した
  • 成果物(PDF など)の添付は対象外
  • PR 本文のプレースホルダを実値へ置換した

@kkeito-investigate kkeito-investigate changed the title feat/overflow autofix テキスト溢れ時の自動短縮を追加 Jan 20, 2026
@yurake
Copy link
Owner

yurake commented Jan 21, 2026

@kkeito-investigate
短縮の仕方について、body 超過時に max_lines まで自動短縮し末尾へ "..." を付与していますが、ユーザーにとっては期待しない動きの認識です。
期待する動きは、LLMを用いて枠内に文字数を収めるようcontentsを修正することです。

@kkeito-investigate kkeito-investigate changed the title テキスト溢れ時の自動短縮を追加 テキスト溢れ時の LLM 補正を追加 Jan 21, 2026
@kkeito-investigate
Copy link
Contributor Author

diff-cover 規定達成のためテスト追加を実施しました。\n\n- テスト: PYTHONPATH=src python -m pytest -n 0 tests/pipeline/mapping/test_mapping_step_layout_assignment.py(25 passed)\n- diff-cover: python -m diff_cover.diff_cover_tool coverage.xml --compare-branch upstream/main(Coverage 100%)\n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

テキスト溢れ時の LLM 補正ルールを追加する

2 participants