Repository navigation
feat: TDnet要約を共通構造で整理し、増減と部分結果を表示 - #27
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61cf9f5ab3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const fact of members.filter((f) => !numeric(f))) { | ||
| const statement = statementText(fact); | ||
| if (/^(?:配当予想|業績予想):/.test(statement)) | ||
| lines.push('- ' + overviewStatement(fact, facts)); | ||
| else if (fact.kind === 'status') lines.push('- ' + statement); |
There was a problem hiding this comment.
Render verified event facts instead of dropping them
When a section contains a verified event fact, this loop renders only forecast-related statements and status facts, so the event falls through without being shown. This affects event-centric disclosures such as M&A, capital policy, and governance changes; if the optional organization request is unavailable or rejects its generated claim, the confirmed event disappears from the visible summary and is available only inside the raw-source toggle. Render the verified event statement independently of the optional generated claims. CLAUDE.mdL173-L173
Useful? React with 👍 / 👎.
| for (const id of presentation.overview) { | ||
| const f = byId.get(id); | ||
| if (f && !numeric(f) && /^(?:配当予想|業績予想):/.test(statementText(f))) | ||
| lines.push('- ' + overviewStatement(f, facts)); |
There was a problem hiding this comment.
Render selected source highlights in the overview
When buildPresentation selects a reason or condition excerpt for presentation.overview (for example, an earnings reason with no corresponding verified event fact), its ID starts with source: and therefore byId.get(id) returns nothing here. The selected highlight is silently omitted from 「開示の要点」, despite being deliberately added to the overview; resolve these IDs through presentation.excerpts and render the selected excerpt. CLAUDE.mdL173-L173
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
5eb9a11 で source: ID を presentation.excerpts から解決し、その原文に対応する点検済み説明を「開示の要点」へ表示するようにしました。説明が不支持・生成不可の場合や未要約部分が残る場合も、未整理の表示と原文への導線を残し、選択したIDを黙って落としません。
冒頭を長い原文転載に戻さないため、未点検の抜粋は要約として表示せず、全文は詳細の原文欄に保持します。この表示方針も含めて再レビューをお願いします。理由のsource: ID、説明の採否、部分未整理、保存復元をsummary-presentationの担当テストで確認済みです。
| ? c.decimal === v.decimal | ||
| : c.raw.normalize('NFKC').replace(/\s/g, '') === | ||
| v.raw.normalize('NFKC').replace(/\s/g, '')) && | ||
| c.unit === v.unit && | ||
| c.sourceIds.includes(e.id) |
There was a problem hiding this comment.
Track unresolved table cells by identity
When two distinct cells in the same source row have the same decimal and unit, this value-based fallback treats the unshown cell as covered merely because a shown value cites that row. Equal current/prior values or different metrics with the same amount can therefore make unresolvedTableSources return no warning and allow statusOf to report ready, even though one cell was never summarized. Coverage should use the cell/value ID rather than decimal, unit, and row equality. CLAUDE.mdL158-L158
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
| presentation.organization = await generateSummaryOrganization( | ||
| { ...config, ...factSummaryRequestLimits(config) }, |
There was a problem hiding this comment.
Skip presentation generation for scoring documents
When experimental scoring fetches a past disclosure, extractScoreInput still calls generateVerifiedFactSummary for that document and discards its presentation. This wrapper now performs the supplemental organization and review requests here, adding up to two unnecessary LLM calls and 120 seconds per candidate inside the candidate loop before the actual scoring request. Use the facts-only generation path for historical scoring documents so optional display organization is not generated and billed when it cannot be used. CLAUDE.mdL158-L160
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
5eb9a11 で過去資料の経路を generateVerifiedFacts に切り替えました。任意の表示用補足生成・点検を呼ばず、原文照合済みの事実だけを採点へ渡します。既存の信号/期限と候補修復の境界も維持しています。
score-extractionの代表例では、過去事実抽出+採点入力生成の通常2要求だけで、100→80の値・確定ID・比較元URLが保たれることを確認しました。最新3e33a5fの全検査も成功しています。実API呼出しは行っていません。
Render confirmed event statements independently from optional explanations, resolve reviewed overview claims through source IDs, and keep incomplete source coverage visible. Track table quantities by physical identity and remove duplicate row aliases only with exact positional proof. Skip optional organization requests for historical scoring documents and align prose numeric candidate instructions with the quantity contract. Advance the analysis fingerprint to v97. Verified: 1127 tests (34 files), type-check, lint, and build. No live model calls. The existing extension repair fixture remains blocked by its legacy v4 fact schema before browser launch.
…ity identities Keep verified event conditions visible without optional organization, retain comparison-owning rows, and bind split quantity units to their complete physical identity. Add focused boundary regressions and advance the analysis fingerprint to v98. Verified: 1141 tests across 35 files, type-check, lint, and build. Fixed-response PDF.js/HTTP/render/save checks pass; no live model or extension browser checks.
|
@codex review 最新HEAD 3e33a5f の再レビューをお願いします。前回レビュー対象61cf9f5からの差分です。
特に、表示済み判定と実際に見える事実・条件の一致、同額/分割セルの同一性、生成と保存再照合の整合をご確認ください。冒頭の未点検原文は長文転載せず、未整理表示と詳細の全文へ導く方針です。 今回の実API呼出しは0で、v98の実モデル品質・実拡張画面・配置は未確認です。Chrome起動のsocket制約は残っています。該当HEADのPR用CI/checkは未設定で、ローカル検査成功と区別しています。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e33a5ffce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| raw: q.text, | ||
| decimal: parsed.decimal, | ||
| unit: parsed.unit ?? adjacentUnit ?? columnUnit ?? commonUnit, | ||
| sourceIds: [...new Set([...sources, ...unitSources].map((e) => e.id))], |
There was a problem hiding this comment.
Skip source-less administrative quantities
When PDF.js emits an excluded administrative field as separate spans—for example コード番号 and 1234 with a normal gap—sourceInventory intentionally creates no excerpt for that block, but this still inserts a NarrativeValue whose sourceIds is empty. renderSummary then calls validatePresentation, which rejects any such value, so an otherwise valid disclosure cannot be rendered or cached; omit quantities with no owning excerpt before inserting them. CLAUDE.mdL173-L173
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a26f504 で修正しました。PDF.jsの分割spanで「コード番号 1234」を再現し、sourceInventoryが除外したブロック由来の値に空のsourceIdsが残り、表示検証で全体が失敗することを確認しました。
数量自身の所有原文が1件もない場合は、NarrativeValueへ入れる前に除外します。近くの単位注記だけで所有関係を補うことはしません。担当テストで管理欄の除外と、有効な100百万円の通常表示・保存再照合が両立することを確認しました。最終1,143件/35ファイル、型・lint・build成功です。
| ]; | ||
| lines.push(`| ${cells.join(' | ')} |`); | ||
| } | ||
| for (const condition of first.conditions) lines.push(`- 比較条件:${text(condition)}`); |
There was a problem hiding this comment.
Render every grouped observation's conditions
When multiple observations collapse into the same observationGroup but have different conditions, only the first row's conditions are emitted here. This affects cases such as the newly retained middle row in a three-period comparison carrying a restatement or scope qualifier; moreover, shownConditions is later populated from every structured row, so a matching accepted claim is suppressed even though its condition was never rendered, leaving the qualifier visible only in the raw-source toggle. Deduplicate and render conditions from the entire group rather than only first. CLAUDE.mdL173-L173
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
この指摘は3e33a5fの実装では再現しませんでした。observationGroupはtopic/scope/basisに加え、conditions配列全体をcanonicalJSONのキーに含めています(src/lib/disclosure-observation.ts:290–292)。異なる条件を持つ行は別groupになるため、first.conditionsはそのgroup全行に共通する条件です。比較元の条件もfactObservationに含めています。
既存の3期比較テスト(逆順・保存復元を含む)に加え、renderer境界で条件配列の異なる行を与え、9事実→6比較行→3groupとなり、両方の条件が順序によらず表示されることを確認しました。後者は表示責務の検査で、注記抽出の追加証明ではありません。今回この点の製品コードは変更していません。別の再現入力があれば確認します。
| sources: checked( | ||
| review.sources, | ||
| prose.map((e) => e.id) | ||
| ), |
There was a problem hiding this comment.
Bound source verdicts before the review request
For a long full-mode disclosure with more prose excerpts than the 8,192-token review response can enumerate, this requires review.sources to contain one verdict for every prose excerpt, even though claims and observations themselves are capped. Because prose has no corresponding limit or chunking, the review response must eventually truncate or exceed the model limit; the catch path then clears every generated claim and observation, making the optional organization consistently unavailable on large reports. Review source IDs in bounded batches or mark unreviewed excerpts unresolved without requiring them all in one response. CLAUDE.mdL158-L158
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a26f504 で対応しました。段落判定の要求を、説明の参照→観測指標の参照の順で最大24件へ制限しました。全claims/observationsの個別判定、全文の意味点検入力、IDの完全一致・重複拒否は維持しています。
要求対象外の段落は保存時に「点検対象外のため未整理」を明示し、review.sourcesの全原文ID集合を維持します。未点検をnullやreadyへ変えず、支持された説明・指標と未整理部分を共存させます。長文境界の担当1例で、API schema/promptの上限、採用維持、未整理、保存復元、保存キー欠落の拒否を確認しました。
分析指紋はv99。全1,143件、型・lint・build成功です。実モデルは今回未評価で、24件上限を全モデルでのtoken上限回避の保証とは扱いません。
Skip values from intentionally excluded administrative blocks. Review at most 24 referenced prose sources while retaining all claim verdicts and explicit unresolved markers for every omitted source. Preserve full storage identity checks and advance the analysis fingerprint to v99. Verified: 1143 tests across 35 files, type-check, lint, build, and independent contract review. No live model or extension browser calls.
|
@codex review 更新HEAD a26f504 を再レビューしてください。前回3e33a5fへの3指摘は各スレッドへ返信しました。
特に今回の差分で、原文所有のない値が混入しないこと、点検対象外が確認済み扱いにならず支持された項目は残ること、保存再照合との整合を確認してください。 分析指紋v99。最終1,143件/35ファイル、type-check・lint・build成功。固定応答の結合検査と独立差分レビュー済み。実API0、v99の実モデル・実拡張画面・配置は未確認です。最大24件は出力義務を有界にする対策で、全モデルでの上限回避を保証するものではありません。PR CIは未設定です。 |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
TDnet開示の主要数値・増減・事業別の状況を素早く把握できるよう、要約を共通の意味構造から表示します。補足の生成や点検が一部未完了でも、原文照合済みの数値を表示・保存し、未整理部分と確認理由を原文トグルに残します。
変更
冒頭の要点と詳細を話題別に整理し、会社名・期間・範囲・会計基準の反復と長い原文転載を減らす。
対象・期間・指標・量の意味・原文数量・比較関係・条件を共通モデルにする。事業別業績、受注、CFを同じ形式で扱い、会社固有の指標名や期間名を保持する。
当期値・比較値・増減率を同じ行に表示する。赤字転落/黒字転換/赤字縮小・拡大、比較値ゼロ、CFの金額差を区別し、原文の率と表示金額からの計算率を明示する。
表の根拠対応、IFRS中間利益、複数予想期間・共通見出し・複数行範囲を改善する。比較軸と報告期間、符号付き収支と本文の正の支出額の矛盾は共通検査で拒否する。
確定事実と任意の補足生成・独立点検を分離する。通常3要求、候補修復最大1回、全体300秒。補足生成・点検は各60秒/8,192出力tokenに制限し、点検をID付き配列へ正規化して空白反復による出力上限を対策する。
診断をクリップボードへコピーできるようにし、コピー失敗時はJSON欄から手動でコピーできる。
レビュー4指摘に対応し、確認済み出来事・選択原文の要点表示、物理セル単位の網羅判定、採点の事実抽出を分離。隣接監査で、別注記条件の欠落、3期比較の最古値欠落、分割単位の途中採用と同一セル別名も修正。
再レビューで確認した管理欄の根拠なし数値を除外し、段落の点検要求を最大24件へ制限。全説明/指標の判定と保存の全原文ID検査を維持し、対象外段落は未点検として残す。
テストを部品・固定応答の結合・拡張境界・手動の実モデル品質に分け、重複する修復経路とfixtureを統合。Hook番号のmockを実Reactの公開状態テストへ置換し、追加基準を既存ガイドへ明記。
検証
npm test: 最新a26f504で1,143件/35ファイル成功(レビュー境界修正後の最終確認)。npm run type-check、npm run lint、npm run build: 成功。残る条件
v99では表示数量・段落点検対象の生成入力が変わる。今回の追加修正に対する実モデル・実拡張画面・配置は未実施で、v96の成功をv99の実績へ読み替えない。
新しい実拡張smokeは、この環境のChromium起動がsocket権限制約で止まるため画面部分は未確認。ブラウザーなしの事前検査成功と区別する。
任意の指標・説明には未整理部分が残る。部分結果を完全抽出・完全要約の成功とは扱わない。
過去のモデル評価で発生した上限・期間・符号の失敗は保持する。最終2実行での上限未再発をモデル全般の保証とはしない。
候補v4/確定事実v6/表示v6/補足保存v3/点検応答v2/分析指紋v99。旧形式を黙って変換しないため、更新後は再要約が必要。
設計と検証の正本: docs/development.md、evaluation/README.md。