Repository navigation
決算表の根拠照合と数量範囲の誤判定を修正 - #26
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: 3c2f7c58f0
ℹ️ 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 slot of coverageReport(type, pages, [], [], context).filter( | ||
| (s) => s.status !== 'outsideSelection' |
There was a problem hiding this comment.
Require coverage for initial forecast disclosures
For an earningsRevision disclosure that publishes its first forecast without both 前回/修正前 and 今回/修正後, verifyCoverage produces no requirements, so this loop validates nothing and preflight succeeds. The added holdout-remix-20260611 case exhibits exactly this with zero slots despite containing five prior-year actuals and five current forecasts; consequently, any incidental key fact can satisfy assess while all core forecast-table facts are omitted. Initial-forecast disclosures need their own coverage obligations, or an empty reporting coverage set must be rejected.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。初回予想公表にも、原文で宣言された指標・対象期・実績/予想ごとの必須項目を作ります。対象を確認できない空集合は生成前に拒否し、対応を失った列も必須項目から消さず欠落として残します。
関連する状態判定も修正し、行軸の「実績」と対象期を保持して、実績を表題の予想より優先します。「今回」だけで修正後とは判定せず、修正・変更・決定の根拠を要求します。数量パースへ意味の書換えは追加していません。
原PDF文字・描画の検査で、リミックスポイント10項目の正常受理・保存照合、各項目を落とした場合の欠落検出、EPSの対応が失われても必須項目が残ること、実績→予想/初回予想→修正後予想の候補・保存改変の拒否を確認しました。初回の独立失敗は保持し、今回の成功は調整後の再評価として記録しています。
| const period = | ||
| f.period && f.semantics.periodKind.startsWith('cumulativeQ') && !/累計/.test(f.period) | ||
| ? `${f.period}累計` |
There was a problem hiding this comment.
Avoid appending cumulative text to interim periods
When a validated half-year fact uses a period such as 2026年11月期中間期, its semantic kind is cumulativeQ2, so this condition rewrites the displayed period to 2026年11月期中間期累計. 中間期 already identifies the cumulative half-year period, and the resulting label is not the verified source period. Treat 中間期 as an existing cumulative qualifier when rendering.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。表示時に「中間期」を既存の累計期間表現として扱い、「2026年11月期中間期」へ「累計」を追加しません。原文と一致する期表現を維持します。
既存の中間期の受理・表示テストに重複表示がないことを追加しました。同じ表示経路の「あたり」表記にも、1株の分母表示を重ねないよう対応しています。
| perShareBasis: | ||
| fact.semantics.metricKind === 'perShare' | ||
| ? fact.provenance!.adjustments.map((a) => a.basis) | ||
| : null, |
There was a problem hiding this comment.
Preserve the identity of stock-split adjustments
For experimental scoring across disclosures containing different stock splits, this conversion retains only the generic value splitAdjusted, beforeSplit, or afterSplit and discards the adjustment note, split ratio, and effective event. compatible then treats two per-share values as comparable whenever these generic arrays match, so values adjusted for different share bases can be compared and scored as if they used the same denominator. Preserve a normalized split-event identity/ratio in ScoreValue, or treat such values as incomparable unless their adjustment bases can be proven identical.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。ScoreValueへ分割注記の原文・noteId・区分を丸ごと渡し、PDF内容のSHA256も保持します。分割を含む値は同一PDF内容・同一注記の場合だけ比較可能とし、別PDFの分割事象が同じとは推測しません。
同じ一般区分でも分割比率・実施日が違う場合、および同一URLのPDFが差し替わった場合を比較不能として検証しました。同一PDF内容の別URLは比較できます。保存済み採点の検証でも現行の注記スキーマを要求し、元要約のPDFハッシュと照合して改変を拒否します。旧形式へのフォールバックは追加していません。
| if ( | ||
| !(/1株当たり.*純利益/.test(metric) && /1株当たり.*純利益/.test(text)) && | ||
| !(/配当/.test(metric) && /配当/.test(text)) |
There was a problem hiding this comment.
Recognize IFRS per-share profit split notes
When an IFRS table uses labels such as 基本的1株当たり当期利益 or 1株当たり四半期利益, this predicate skips the associated stock-split note because it requires the literal word 純利益. Those labels are already recognized elsewhere as per-share metrics, but their provenance is saved with no adjustment, so the UI omits the split-adjusted qualifier and scoring can compare values on incompatible share bases. Match the supported per-share profit/loss forms rather than only 純利益.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。「純利益」だけに限定していた条件を、対応する1株当たり/あたりの利益・損失表現へ広げ、IFRSのEPSに付く株式分割注記も保持します。指標認識の共通規則を注記照合へ接続しました。
基本的1株当たり当期利益、四半期利益、中間損失、希薄化後の表現について、調整基準を確認できる注記を保持し、基準が不明な注記は黙って落とさず拒否するテストを追加しました。無関係な売上高にEPS注記を付けない対照も確認しています。
| const cases = JSON.parse( | ||
| await readFile('evaluation/fixtures/fact-summary-cases.json', 'utf8') | ||
| await readFile( | ||
| process.argv.includes('--holdout') | ||
| ? 'evaluation/fixtures/source-structure-holdout-cases.json' |
There was a problem hiding this comment.
Parse the holdout flag separately from the case ID
When the new holdout suite is invoked without a specific case as npm run test:fact-summary -- --holdout, this branch selects the holdout fixture file, but the later positional selection treats --holdout as the case ID and throws 評価ケースがありま���ん. As a result, the newly added option cannot run the complete holdout suite in the same way that the no-argument command runs all normal cases; parse flags out before resolving the optional positional case ID.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。フラグと値を位置引数のケースIDから分離し、--holdout だけの場合も凍結ケース全件を選択します。不明・重複オプション、値欠落、複数ケースIDは明示的に拒否します。
引数順序と値付きオプションを含む10ケースのテストを追加しました。node --import tsx evaluation/scripts/run-fact-summary.ts --holdout --list-cases の直接実行で、環境ファイル/APIなしに凍結2ケース全件を選べることも確認しています。
| return page.tableRegions.flatMap((region) => | ||
| rawTableReferenceHints( | ||
| { | ||
| spans: page.spans.filter((s) => region.spanIds.includes(s.id)), | ||
| quantities: page.quantities.filter((q) => region.valueIds.includes(q.id)), |
There was a problem hiding this comment.
Preserve inherited headers for continued tables
For a table continued onto a new page without repeating its metric and unit headers, buildTableMappings deliberately supplies prior-page header spans through continuationSpans, but this filter immediately removes them because the destination page's TableRegion.spanIds contains only destination-page IDs. rawTableReferenceHints therefore cannot see the inherited units, metrics, or caption, and ordinary continued rows receive no mapping, causing their facts to be omitted or preflight to fail. Keep the verified continuation spans when constraining the destination region, or project the inherited header IDs into that region.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
82cc43d で修正しました。隣接ページの列数・位置・年度・主体・文脈と複数行の継続を証明した行だけに、前ページの見出し・単位IDを含む表所属を投影します。元のページや無関係な表の所属は変更しません。
buildTableMappingsに加え、候補照合・必須判定・保存照合も同じcontinuationPageを使うよう接続しました。前ページにだけ単位見出しがあり、次ページには単位なしの数値が続く場合の入力選択→受理→保存照合と、列位置がずれた別表の拒否を代表テストで確認しています。
|
@codex review 前回レビューの6件へ修正内容と検証結果を個別返信しました。3c2f7c5からea3dbc0までの差分を再レビューしてください。 追加コミット:
特に、必須対象が0件や一部の対応欠落で通らないこと、続表の投影が無関係な表へ広がらないこと、正しい実績/予想の受理と誤状態の拒否が保存まで一致すること、分割基準の違うEPSを比較しないことを確認してください。前回指摘以外にも、根拠情報の引継ぎ漏れ・指標語彙の不一致・空の必須対象という同原因の残存不備がないか見てください。 検証は949テスト/32ファイル、型検査・lint・build、15資料の全ページpreflightが成功しました。最終ビルドで同一Chromeプロファイルの旧版更新・保存復元とsmart/full・比較・追加分析の固定API画面も成功(外部LLM追加0回)。原PDFのリミックスポイント10項目は調整後の受理・保存再評価として扱い、凍結期待値と初回失敗を保持しています。 指定実モデルでの最終通常生成と利用者本人のChromeは未確認です。数量パースへ会社評価や意味の書換えは追加せず、候補v3/確定v5・公開版0.7.3を維持し、分析指紋はv69です。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea3dbc0f8e
ℹ️ 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".
| const groups = [ | ||
| ...new Map(result.map((s) => [JSON.stringify([s.period, s.state, s.attributes]), s])).values(), | ||
| ]; |
There was a problem hiding this comment.
Derive publication state groups independently of value mappings
When every mapping for one declared state is lost—for example, all prior-year actual cells—while mappings for the forecast row survive, groups is built only from the surviving result. The nonempty-source guard therefore does not fire, no obligations are synthesized for the missing actual row, and a summary containing only forecasts can pass coverage and preflight. Fresh evidence in this revision is that the single-mapping test covers a missing metric within an existing group, but not disappearance of the entire period/state group; derive those groups from the declared row/header axes rather than mapped values.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
| const result: SourceProvenance['adjustments'] = []; | ||
| for (const note of splitNotes(page, valueId)) { |
There was a problem hiding this comment.
Apply split notes to continued-table facts
For an EPS value on a continued page without its own unit/header table region, validation succeeds through the new continuationPage projection, but provenance still calls splitNotes with the original page. tableForValue then returns no owning table, so a stock-split note attached to the continued table is silently omitted; the saved fact has an empty adjustment list and compatible may compare it across documents without requiring matching hashes. Use the same proven continuation ownership when locating and persisting split notes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
続表の注記探索にも、数値照合と同じcontinuationPageの証明済み所属を使うよう修正しました。原文受理・保存するprovenanceだけでなく、入力のqualifierIdsにも同じ所有範囲と対象期を使います。入力側に残っていた「純利益」限定の別規則も共通のEPS認識へ置き換えました。
上場会社名で宣言された続表IFRS EPSについて、入力選択→受理→保存再照合を検査しました。当期の調整注記が保持され、注記の対象外である前期には注記ID・調整を付けないことも確認しています。あわせて、指標名の「1株当たり」を数量列に数える接続不備を修正し、続表で証明した値セルIDを後段でも共有します。
| const scope = [...previous.blocks] | ||
| .reverse() | ||
| .find((b) => b.y < periodBlock.y && /概要/.test(b.text) && /株式会社|有限会社/.test(b.text)); | ||
| .find( | ||
| (b) => | ||
| b.y < periodBlock.y && /概要|^会社名/.test(b.text) && /株式会社|有限会社/.test(b.text) | ||
| ); |
There was a problem hiding this comment.
Accept the standard listed-company heading for continuations
When a continued table belongs to an ordinary TDnet earnings document whose issuer field is 上場会社名 株式会社..., this predicate does not find its scope because the text neither contains 概要 nor starts with 会社名. The repository's extracted PDF corpus uses 上場会社名, while the new regression test only uses 会社名, so tableContinuations rejects otherwise aligned continued rows and the inherited mappings are never built. Include the same listed-company heading vocabulary already recognized by the document context.
Useful? React with 👍 / 👎.
| (normalized(b.text).match(/20\d{2}年\d{1,2}月期/g)?.length ?? 0) === before.length | ||
| ); |
There was a problem hiding this comment.
Bind inherited fiscal headings to the source table
When the page contains multiple tables with the same number and alignment of numeric columns, this reverse search may take the fiscal-year block from an earlier unrelated table because it checks only position and year count, not membership in own or the unit/context section of the boundary row. The selected years and context are then projected into the next page and can make unrelated rows verifiable under the wrong reporting period. Fresh evidence beyond the alignment test is that a preceding performance table followed by a boundary balance table with the same two columns satisfies this search; require the inherited period and context to belong to the same source table as before.
Useful? React with 👍 / 👎.
| if ( | ||
| isPerShareProfit(metric) && | ||
| isPerShareProfit(text) && | ||
| /仮定|株式分割の影響を考慮/.test(text) | ||
| ) | ||
| basis = 'splitAdjusted'; |
There was a problem hiding this comment.
Restrict EPS split adjustments to their stated period
When a stock-split note explicitly limits its EPS adjustment to one fiscal period in a multi-period table, this branch assigns splitAdjusted to every EPS value owned by that table because the extracted fy is never checked for EPS. Both the adjusted and unadjusted periods are then persisted with the identical note object, so compatible treats them as sharing a denominator inside the same PDF and the UI also labels both as adjusted. Match any fiscal-period limitation in the note before attaching the adjustment.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
分割注記のEPS対象期を照合し、明示の年度・四半期・累計/単独の制限を満たさない値へ調整を付けないよう修正しました。この規則は入力の注記IDと保存する調整基準で共有します。分割の実施日や仮定した期首は、EPSの対象期制限と区別します。
限定された当期には注記を保持し、前期には適用しない正常/異常の対に加え、複数年度・四半期累計/単独・仮定した期首を検査しました。関連する反例として、同じ注記の「前期EPS」と「当期配当」を混ぜる不備も確認して修正しています。配当だけの文の年度をEPSへ貸さず、同じ文で複数指標・複数年度の対応を証明できない場合は推測せず明示的に拒否します。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42f4ddc0eb
ℹ️ 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".
| if (/1株(?:当たり|あたり)|EPS/i.test(text) && /利益|損失/.test(text)) | ||
| declared.add('1株当たり利益'); |
There was a problem hiding this comment.
Require bare EPS columns in coverage
When a reporting table uses the supported bare EPS alias, the first predicate matches but the additional /利益|損失/ check fails, so declaredReportingMetrics never adds the per-share-profit obligation. The earnings and forecast coverage loops can therefore accept a summary that omits the EPS column entirely, even though revisionMetricLabel and BASIC_PER_SHARE_PROFIT_METRIC recognize that same alias; treat bare EPS as sufficient while retaining the profit/loss check for long-form labels.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d5cbf19で修正しました。表の列に所属する指標見出しの全断片をtableHeaderColumnsで組み立て、根拠対応の生成と宣言由来の必須判定で共有します。EPSを基本EPSとして数え、改行された長い指標名も保持します。本文側も共通のBASIC_PER_SHARE_PROFIT_METRICを使い、小文字epsを含め義務と根拠割当を一致させました。
fact-reporting-regression.test.tsで表/本文それぞれの実績・予想EPSの欠落検出、正常受理・保存、表のmapping欠落後も義務が残ることを確認しました。希薄化後と1株配当金は基本EPSの代替にしません。原PDFの改行見出しで途中の退行を検出したため、全文の文字連結による判定から列所属の共有処理へ改め、リミックスポイント10項目の単一/全mapping欠落の検査も通りました。
| // A split's execution date and a calculation's assumed date do not scope EPS. | ||
| return ( | ||
| !/^(?:の)?(?:期首|初日|末日)/.test(following) && | ||
| !/^に(?:おいて)?(?:当社は)?株式分割を(?:実施|行|予定|決議)/.test(following) |
There was a problem hiding this comment.
Exclude ratio-form split events from EPS periods
Fresh evidence beyond the earlier event-period case is the standard ratio wording: in a note such as 2026年3月期において普通株式1株につき2株の割合で株式分割を実施しました。基本的1株当たり当期利益は…, this regex does not recognize the first clause as an event because it requires 株式分割 immediately after において. The 2026 period is consequently retained as an unassigned reporting period, and an otherwise valid period-independent EPS adjustment for 2027 throws STRUCTURE:株式分割注記の共通期間…; allow intervening share/ratio text when identifying execution clauses.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d5cbf19で修正しました。分割実施期の文法に、普通株式と「1株につき2株の割合で」「1株を2株に」などの明示された株数比率を追加しました。比率を含む分割行為の期間と、EPSの報告対象期を述べた節を区別し、注記の基準は従来通り対象指標・対象期が対応した節だけから取得します。
source-provenance.test.tsにご指摘の比率文と別の株数表現の正常適用を統合しました。一方、対象期に続いてEPSを主語として比率を説明する文を別期のEPSへ貸さない反例も確認しています。独立した共通期間の未証明対応と矛盾の拒否は維持しています。
| if ( | ||
| perShare.test(text) || | ||
| isPerShareDividend(label, unit) || | ||
| (text === '配当予想' && normalizedUnit === '円' && unchangedDividendReference(source)) |
There was a problem hiding this comment.
Carry unchanged-dividend proof into scoring
For an accepted prose fact labeled 配当予想 that is proved by unchangedDividendReference, this branch classifies it as perShare only when the original assertion is supplied. Both toValue and validateSavedScore call classifyMetric without that assertion, while hasComparableScope also delegates to isPerShareDividend, which rejects the generic 配当予想 label; because these dividend facts intentionally have no financial scope, they can never enter or be restored from experimental scoring. Pass the stored quote/proof through the scoring checks or make this supported label classify consistently there.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d5cbf19で修正しました。据置の配当予想の原文証明をisPerShareDividendでも共有し、toValueの範囲/指標区分、比較条件、所有比率、validateSavedScoreへfact.quoteまたは保存済みsource.quoteを渡します。「配当予想」というラベルだけで1株配当にはしません。
score-extraction.test.tsで原文照合を通った据置配当を採点入力と保存検査へ渡し、証明を除いた引用の改変を拒否しました。metric-semantics.test.tsではラベル・円単位・証明の正負と総額の拒否を確認し、既存の原PDFコーパスでもインソースの35円をscope=nullのまま採点値へ渡せることを確認しました。通常予想を修正後へ読み替える比較は拒否したままです。年次配当表の充足判定も既存の宣言された指標を要求し、一般の据置予想で別の配当義務を代替しない条件を維持しました。
|
@codex review 最新レビュー3件へ個別に返信し、同じ原因の残る経路を修正しました。実装d5cbf19、検証記録cc4e03aです。 前回レビュー対象42f4ddcから現HEADcc4e03aまでの差分
今回の傾向は、受理と義務の語彙を独立して持つこと、注記の構文範囲が狭いこと、呼出し先へ根拠を渡さないことでした。途中で、全文の連結による改行EPSの義務欠落と、一般の配当予想による年次表の誤代替を検出・修正しています。これらを含め、列見出しの所属と義務の独立性、比率文の期間の役割、引用の各消費先への受け渡しを再確認してください。 989テスト/32ファイル、型/lint/build、同じ内容hashの15資料の全ページpreflight、原PDF数値の受理・保存が成功。修正前42f4ddcへの反例は5件失敗/240件成功です。最終buildの固定API画面でsmart/full・比較・追加分析・保存復元・後続失敗時の要約保持が成功(模擬API6回、外部LLM追加0)。変更範囲外の旧版からの更新画面は再実行せず、前回v72の履歴として保持しました。 候補v3/確定v5・公開版0.7.3を維持し、分析指紋v73へ更新しました。凍結資料・期待値・評価区分・最初の失敗は維持し、指定実モデルの最終通常生成と利用者Chromeは未確認です。元の改善作業全体の完了とは扱いません。責務・担当テストと証拠はdocs/development.md、evaluation/README.md、既存のローカル台帳へ更新しました。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc4e03a877
ℹ️ 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".
| new RegExp( | ||
| `((?:売上高)?営業利益率|株式の取得価額の総額|取得価額の総額|取得する株式の総数|${BASIC_PER_SHARE_PROFIT_METRIC}|年間配当金|売上高|売上収益|営業収益|営業利益|営業損失|経常利益|経常損失|MRR|ARR|${NET_PROFIT_METRIC})(?:は|が|について|[::]|(?=[0-9]))` | ||
| ) |
There was a problem hiding this comment.
Make the preflight EPS lookup case-insensitive
When a prose reporting metric is written as lowercase eps, the case-insensitive coverage logic creates the required actual/forecast EPS slots, but this preflight regex cannot recover their label because it is constructed without the i flag. preflightCandidateSource consequently throws 必要な本文指標を確認できません before generation even when the prose amount and all other required metrics are valid, so the preflight matcher must use the same case-insensitive EPS vocabulary as coverage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d4e0199 で修正しました。本文のEPS照合を大小文字非依存にし、生成前検査でも共有の完全な指標語彙を使います。初回予想と決算の実績/予想について、eps の義務生成→入力の数量選択→preflightを検査しています。
関連経路も確認し、本文の epsは1株当たり42円 と、注記内の 希薄化後eps にも同じ語彙を渡しました。通常予想の状態や数量は変更しません。担当は fact-reporting-regression.test.ts / source-provenance.test.ts。修正前の反例は失敗を保持し、最終1,012テスト・型/lint/build・15資料の全ページpreflightが成功しています。
| const label = own.match( | ||
| new RegExp( | ||
| `(${BASIC_PER_SHARE_PROFIT_METRIC}|売上高|売上収益|営業収益|営業利益|営業損失|経常利益|経常損失|${NET_PROFIT_METRIC})(?:は|が|について)`, | ||
| 'i' | ||
| ) | ||
| )?.[1]; |
There was a problem hiding this comment.
Reject diluted aliases when deriving basic-EPS obligations
For an initial earningsRevision forecast expressed in prose as 希薄化後EPSは42円 or 希薄化後1株当たり当期利益は42円, this unanchored search matches only the EPS/1株当たり当期利益 suffix and records it as the basic 1株当たり利益 metric. The disclosure then receives a spurious basic-EPS obligation that the verifier cannot satisfy without dropping the 希薄化後 qualifier, causing coverage or source preflight to reject an otherwise valid document; derive the key from the complete metric label and require a basic variant explicitly.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d4e0199 で修正しました。本文では 希薄化後 / 潜在株式調整後 を含む指標名全体を取得し、その後に基本EPSか判定します。基本指標の部分一致で義務を作る処理をなくし、source割当・決算の宣言・初回予想公表の導出も揃えました。
希薄化後EPS / 潜在株式調整後eps の指標キーも修正し、基本EPSの代替にしません。表と本文で基本/希薄化後を区別し、初回予想の各形式をpreflightまで検査します。注記の別名照合と明示分母も共通語彙を使います。metric-semantics.test.ts / fact-reporting-regression.test.ts / source-provenance.test.tsで確認し、最終1,012テスト・型/lint/buildが成功しています。
| OPS.setGState, | ||
| OPS.setLineWidth, | ||
| OPS.setStrokeTransparent, | ||
| OPS.setFillTransparent, |
There was a problem hiding this comment.
Restore visibility when PDF.js sets an opaque color
When an operator stream changes from setStrokeTransparent to setStrokeRGBColor before drawing a visible rule (and analogously for fill colors), drawingOperations retains the transparent operation but discards the later opaque-color operation. drawingLines therefore leaves its visibility flag false and omits every subsequent visible rule in that graphics state, which can erase table cells and make ruled financial tables fail mapping or preflight; retain the PDF.js color-setting operations needed to reset visibility.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d4e0199 で修正しました。現行PDF.jsが色を正規化して出力する setStrokeRGBColor / setFillRGBColor を保持し、元のoperator indexを保ったまま透明色からの復帰を適用します。Gray/CMYK等がRGB演算へ変換されることもインストール済みPDF.jsの生成・描画コードで確認しました。
同じ状態変数に混在していた色の透明性とGStateのCA/caを分離しました。RGB色の復帰はalpha=0を解除せず、alphaの復帰も透明色を解除しません。stroke/fill、save/restore、演算の抽出→線の抽出、不正な色/alphaの拒否をpdf-drawing.test.tsで検査しています。最終1,012テスト・型/lint/build・15資料の原PDF再抽出とpreflightが成功しています。
| export function splitNoteApplies(text: string, label: string, period: string | null): boolean { | ||
| if (/配当/.test(normalized(label))) return /配当/.test(normalized(text)); | ||
| return matchingEpsClauses(text, label, period).length > 0; |
There was a problem hiding this comment.
Scope dividend split notes to their stated period
In a multi-period dividend table, a note such as 2027年3月期期末については…株式分割後 is treated as applicable to the 2026期末配当 too because this branch checks only whether both the label and note mention dividends. The later basis parser finds no 2026 basis and throws instead of leaving that earlier value unadjusted, so otherwise valid historical dividend facts become impossible to accept or save whenever a following split note is limited to another period; apply the note's fiscal-period and dividend-component scope before attaching it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d4e0199 で修正しました。配当注記は対象年度と配当区分を先に対応させ、該当する節だけから分割前/後の基準を取得します。2027期末だけの注記を2026の値、第2四半期末、年間合計へ渡しません。年度だけの全配当宣言と、複数年度を共有する述語は保持します。
適用判断を生成入力のqualifierIds・候補受理・保存再照合で共有しました。同一期・区分で矛盾する基準や未解決の宣言は拒否します。原PDF検査で「分割を考慮しない場合」の別数量を表の基準へ混ぜる退行も検出し、独立した条件付き数量として扱って修正しました。注記全文と数量は保持します。source-provenance.test.ts / fact-reporting-regression.test.tsと固定エクスモーション原PDFで確認し、最終1,012テストが成功しています。
| (b) => | ||
| b.y < last.y && | ||
| /経営成績|財政状態/.test(normalized(b.text)) && | ||
| !/[。;]|^\(?注\)?|^※/.test(normalized(b.text)) |
There was a problem hiding this comment.
Recognize forecast tables when linking page continuations
When a 連結業績予想 or forecast-revision table continues onto the next page without repeating its fiscal and unit headers, this context search can never establish the continuation because it accepts only 経営成績 and 財政状態. The downstream continuation projection is therefore skipped even when the columns and issuer scope align, leaving the continued forecast values without period/unit mappings and potentially causing mandatory forecast coverage or preflight to fail; include the existing forecast-reporting title predicate in the allowed source-table contexts.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
d4e0199 で修正しました。続表の元表認識へ既存の forecastReportingTitle を接続し、連結業績予想と予想修正表を同じ表題規則で認識します。元表の主体・年度列・単位列・列位置・ページ境界を証明する条件は維持しています。
既存の続表の代表テストへ業績予想/予想修正を追加し、入力のselectable→候補受理→保存まで通しました。列の不一致、別表、非財務節・主体境界、年度断片の欠落の拒否も維持しています。修正前では両予想表の反例が失敗し、最終1,012テスト・型/lint/build・15資料の全ページpreflightが成功しています。
|
@codex review 5件の指摘へ個別に返信しました。今回の差分は cc4e03a → 1a8c33b です。実装 d4e0199、検証記録 1a8c33b。候補v3/確定v5を維持し、分析指紋をv74へ更新しました。
今回も、別々の認識規則と全文からの基準取得が原因でした。生成側と利用側で共有する語彙・適用節・描画状態を確認し、語彙/状態は部品、責務の接続は代表例、実配置は固定原PDFで担当を分けました。既存の続表テストへ予想2形式を統合し、同じ例を全経路に複製していません。 修正前の隔離ソースで反例14件が失敗。最終1,012テスト/32ファイル、型/lint/build、同じ内容hashの原PDF15資料の全ページpreflight、ファルコム13/リミックスポイント10数値の受理・保存、最終buildの固定画面(smart/full・比較・追加分析・復元)が成功しました。途中の退行・凍結期待値・初回の独立失敗は保持しています。 外部LLM追加0、累計12要約/15API・上限23要約/46APIは維持。指定実モデルの最終通常生成と利用者本人Chromeは未確認で、改善作業全体は未完了です。詳細は既存の開発/評価ガイドとPR本文に反映しました。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a8c33be86
ℹ️ 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".
| const stated = following.match( | ||
| /^(?:の)?(第[1-4]四半期末|中間期末|中間|期末|年間(?:配当金)?(?:合計)?)/ | ||
| )?.[1]; |
There was a problem hiding this comment.
Parse dividend components after forecast qualifiers
When a standard note writes the period as 2027年3月期(予想)の期末配当金については…株式分割後, following begins with (予想), so this regex leaves stated undefined. The !stated branch then applies this期末-only adjustment to 年間配当金第2四半期末 and 年間配当金合計 for the same year as well, persisting an incorrect share basis; skip optional forecast/actual parentheticals before identifying the dividend component.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a80f57e で修正しました。年度直後の (予想) / (実績) を明示の状態限定として読み、その後の「の」と配当区分を照合します。限定を落として全年間の配当へ広げることはせず、期末注記を第2四半期末・年間合計へ渡しません。
同じ文法を配当の節分割にも渡し、未知の括弧・矛盾した限定は年度だけに縮めず拒否します。既存の生成入力→候補受理→保存の配当テストも括弧付き予想へ置き換えました。source-provenance.test.ts / fact-reporting-regression.test.tsで確認し、最終1,044テスト・型/lint/buildが成功しています。
| function splitReportingPeriods(clause: string) { | ||
| return [ | ||
| ...clause.matchAll(/20\d{2}年\d{1,2}月期(?:第[1-4]四半期(?:累計|単独)?|中間期|通期)?/g), | ||
| ].filter((m) => { |
There was a problem hiding this comment.
Preserve parenthesized EPS period qualifiers
When an EPS note scopes its adjustment as 2027年3月期(第2四半期累計), this match captures only 2027年3月期, so splitPeriodMatches sees no reporting shape and accepts the note for standalone Q2 and other quarters in the same fiscal year. Those facts are then persisted with an adjustment basis the note did not cover; include parenthesized quarter/cumulative qualifiers in the matched reporting period or derive the shape from the owning clause.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a80f57e で修正しました。注記の年度・期間形・累計/単独・状態の限定を、対応する括弧も含めて一つの期間文法で取得します。期間照合とEPSの節分割が同じ文法を使うため、2027年3月期(第2四半期累計) を同年度の単独Q2やQ3へ適用しません。
第2四半期(累計) / (第2四半期)(累計) / 中間期 / 2Q と「の」の配置も確認しました。未知・矛盾した限定は年次へ縮めず拒否し、中間期は累計Q2として区別します。source-provenance.test.tsの正負対で検査し、最終1,044テスト・型/lint/build・15資料のpreflightが成功しています。
| @@ -39,35 +61,87 @@ export function tableContinuations(pages: ExtractedPage[]): TableContinuation[] | |||
| ) | |||
There was a problem hiding this comment.
Match units before linking continued tables
When the last financial row uses inline 円 values and the next page starts an unrelated aligned table using 人 or 株, this predicate compares only column count and right-edge geometry, so tableContinuations links the tables despite the unit change. The projected fiscal headings and 経営成績 context then let inlineMappings map those destination rows under the financial table; require compatible parsed units for inline-unit continuations before inheriting the periods and context.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a80f57e で修正しました。続表では列数・右端の位置だけでなく、元列の明示単位(または所属を証明した単位見出し)との一致を各行で確認します。円→人/株だけでなく、円→百万円の尺度変更も継承しません。
先頭行と後続行の両方へ適用し、途中で単位が変わったらその行以降を切り離します。それより前の正しい金融行は保持するため、全列・年度・単位・主体を証明できた続表は1行でも構成します。既存M&Aの営業利益→従業員数の例で退行を検出・修正し、従業員数を財務文脈へ貸さず営業利益は保持しました。fact-reporting-regression.test.tsで入力/mapping・義務・保存を確認し、最終1,044テスト・型/lint/buildが成功しています。
| const box = bounds([ | ||
| point(state.transform, b[0], b[1]), | ||
| point(state.transform, b[2], b[3]), | ||
| ]); |
There was a problem hiding this comment.
Transform every Form BBox corner before clipping
For a Form XObject with a rotated or sheared transform and a non-null BBox, the two transformed diagonal corners do not define the transformed rectangle's axis-aligned bounds. This can collapse or narrow state.clip and discard visible table rules that are inside the form (for example, a 45-degree transform maps the other two corners outside the computed box); transform all four BBox corners before calling bounds.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a80f57e で修正しました。FormのBBoxの4頂点すべてを変換して範囲を求めます。回転/せん断ではその外接矩形だけだと、実際のForm外の線まで根拠になり得るため、変換後の四辺形でも線分を切り取るようにしました。
回転・せん断の可視部分、Form外の除外、Form終了時の復元、不正なBBoxの拒否をpdf-drawing.test.tsで確認しています。原座標とoperator indexは保持し、未知のBBoxを無視して描画する処理は追加しません。最終1,044テスト・型/lint/buildと同じ内容hashの原PDF15資料の再抽出/preflightが成功しています。
| const label = own.match( | ||
| new RegExp( | ||
| `(${PER_SHARE_PROFIT_METRIC}|売上高|売上収益|営業収益|営業利益|営業損失|経常利益|経常損失|${NET_PROFIT_METRIC})(?:は|が|について)`, | ||
| 'i' | ||
| ) | ||
| )?.[1]; |
There was a problem hiding this comment.
Collect every prose metric in a forecast block
When an initial forecast states several required metrics in one paragraph, such as 売上高は100百万円、営業利益は10百万円、当期純利益は8百万円, this single match records only the first label. The synthesized operating-profit and net-profit obligations consequently have empty sourceIds, and source preflight rejects the disclosure even though both quantities are present and verifiable in the same block; iterate over every supported metric occurrence and register the block for each one.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
a80f57e で修正しました。本文の直接指標の全出現を取得し、初回予想の義務・通常のsource割当・追加指標の宣言で共有しました。生成前検査も義務の指標に一致する名前とその数量を選び、営業利益の数量が入力から落ちた場合に売上高で代替できないようにしました。
同じ段落の列挙は各数量と指標を直接照合し、末尾の支持された述語だけを共有します。別指標の限定、同じ指標の再指定、否定・撤回は拒否し、原文や主張IDは分解・改変しません。代表例は義務→preflight→候補受理→保存まで3指標を通し、欠落/誤代替の拒否を確認しました。文法の正負はnumeric-evidence.test.tsへ集約しています。最終1,044テスト・型/lint/build・15資料のpreflightが成功しています。
|
@codex review 最新レビューの5件へ個別返信し、修正をpushしました。前回のレビュー対象
傾向は「限定の部分一致」「位置だけによる所属の継承」「先頭指標だけの取得」です。直接の利用経路を共有規則へ接続し、語彙/幾何は部品、接続は代表例、実配置は原PDFの独立期待値で確認しました。配当の既存統合例は括弧付き年度へ置き換え、同じ分岐の全経路への複製は避けています。パースで数量の意味や会社評価を変更していません。 検証は修正前に15件失敗/264件成功、修正後は1,044テスト/32ファイル・型/lint/build成功です。全件成功後は未使用import除去と無関係なテスト整形の復帰のみです。同じ内容hashの原PDF15資料で全ページpreflightが成功し、ファルコム13/リミックスポイント10数値の受理・保存も成功しました。最終buildの固定API画面でsmart/full・比較・追加分析・復元・後続失敗時の要約保持・再試行を確認しました(模擬6呼出し、外部LLM追加0)。候補v3/確定v5・公開版0.7.3を維持、分析指紋はv75です。 凍結資料・期待値・評価区分・独立初回失敗は変更していません。調整後の再照合や固定API画面を、独立初回成功・指定実モデルの通常生成成功へ数えません。指定実モデルの最終通常生成と利用者本人Chromeは未確認で、全体未完了です。累計12要約/15API、上限23要約/46APIを維持しています。責務と担当テストは |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ea541a8e1
ℹ️ 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".
| const following = clause | ||
| .slice(match.index! + fiscal.length) | ||
| .replace(new RegExp(`^${REPORTING_STATE_QUALIFIER_PATTERN}`), ''); |
There was a problem hiding this comment.
Enforce forecast/actual qualifiers on split notes
When actual and forecast rows share the same fiscal year and dividend component, a note scoped as 2027年3月期(予想)の期末配当金... is also attached to the actual row. Fresh evidence after the prior qualifier fix is that the newly captured state is explicitly stripped here, while splitNoteApplies and applicableSplitNotes receive only the canonical period and never the fact's valueKind; consequently actual and forecast facts are indistinguishable and can persist the same split basis. Pass the row state through and require it to match any parenthesized state qualifier.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
3e77c70 で修正しました。splitNoteApplies / applicableSplitNotes はvalueKindを必須引数にし、生成入力では原文の行状態、受理/保存では原文照合済みの事実状態を渡します。同じ年度・配当区分でも (予想) はforecast/forecastBefore/forecastAfterだけ、(実績) はactualだけへ適用し、状態未確定の値へ貸しません。EPSの注記にも同じ条件を適用しました。
状態限定がない注記の既存動作は維持し、年度宣言へ所属できない状態限定は無視せず拒否します。source-provenance.test.tsで状態の正負対を確認しました。既存の配当統合例を同年度の実績/予想へ置き換え、生成入力のqualifier IDs・受理後のbasis・保存復元が一致することを確認しています。異なる年度の例だけでは状態欠落を隠していた点をテスト戦略の記録へ残しました。最終1,074テスト・型/lint/build・原PDF15資料のpreflightが成功しています。
| text: string, | ||
| extraPattern = '' | ||
| ): Array<{ label: string; start: number; end: number }> { | ||
| const pattern = `(${PROSE_REPORTING_METRIC_PATTERN}${extraPattern ? '|' + extraPattern : ''})(?:について(?:は|が)?|は|が|[::]|(?=[0-9]))`; |
There was a problem hiding this comment.
Preserve leading modifiers when scanning prose metrics
When a forecast paragraph contains only a modified metric such as 調整後経常利益は9百万円, this unanchored search starts at the 経常利益 suffix and returns it as the ordinary-profit metric. Fresh evidence after the all-metrics fix is that declaredReportingMetrics and forecastPublicationSources then synthesize an ordinaryProfit obligation, while verifyProseQuantity correctly refuses to drop the 調整後 prefix, so source preflight fails and an otherwise valid initial forecast never reaches generation. Require a valid left boundary or retain the modifier so unsupported adjusted metrics are not reclassified as ordinary metrics.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
3e77c70 で修正しました。指標前の文法境界を明示の主体/範囲・対象期・句読点・番号付き項目から照合し、調整後/コア等の修飾語から経常利益等の末尾だけを取得しないようにしました。義務/source割当/preflightと数量照合は同じ左境界を使います。
同原因の部分一致が残っていた表の追加指標も、完全な列名から判定します。修飾付き経常利益やEPSは標準指標の義務へ縮めません。原PDFでは番号付き項目が同じ段落にまとまる自己株取得の退行を検出したため、物理改行の項目境界を数量照合と共有しました。名詞途中の改行は区切りません。語彙/境界の正負はmetric-semantics、初回予想の義務→preflight→受理→保存は既存の代表例へ調整後経常利益の別段落を加えて確認しています。最終1,074テスト・型/lint/build、原PDF15資料のpreflightが成功し、途中の失敗と原文診断を保持しています。
| const names = new Set([compact(currentLabel)]); | ||
| while (rest) { | ||
| const metric = proseReportingMetrics(rest)[0]; | ||
| if (!metric || names.has(compact(metric.label))) break; |
There was a problem hiding this comment.
Reject aliases that re-specify one reporting metric
When an enumeration repeats a metric through an equivalent alias, such as EPSは42円、基本的1株当たり当期利益は43円です, verification of the 42円 claim succeeds. Fresh evidence beyond the exact-label re-specification test is that this set records surface labels only, although perShareProfitKeys and revisionMetricLabel classify both names as the same basic-EPS metric; the repeated-metric guard therefore misses the conflicting second value, and either value can satisfy the single coverage obligation. Track the canonical metric key rather than the raw label when detecting repetitions.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
3e77c70 で修正しました。列挙の再指定は表記ではなく共通の指標キーで判定します。EPS/基本的1株当たり当期利益、EPS/eps、希薄化後EPS/潜在株式調整後の別名、売上高/売上収益等を同じ指標として扱い、利益指標の別名も照合します。基本/希薄化後やEPSの期間・利益/損失の区分は保持します。
選んだ数量より前の別名も検査し、42円と43円のどちらを選んでも曖昧な再指定は拒否します。また、基本EPSの照合へ希薄化後EPSの末尾を混ぜないよう完全な名前の所属を確認します。基本EPSと希薄化後EPS等の異なる指標は正常に受理できる正負対をnumeric-evidence.test.tsへ集約しました。義務/preflightの基本EPS分類も同じキーを使用し、原文・数量・引用IDは変更しません。最終1,074テスト・型/lint/build・原PDF15資料のpreflightが成功しています。
|
@codex review 最新レビューの3件へ個別返信し、修正をpushしました。前回のレビュー対象
原因の傾向は「取得した属性を利用経路へ渡さない」「修飾語/別名の意味を表記一致で判断する」です。注記APIの必須引数で状態の渡し忘れを防ぎ、境界と指標キーを利用経路で共有しました。配当の既存統合例は、年度の違いが状態欠落を隠さないよう同年度の実績/予想へ置き換えています。初回予想の既存統合例へ修飾付き経常利益の別段落を加え、誤った義務を作らず入力→preflight→受理→保存まで通ることを確認しました。語彙/再指定の全組合せを各利用経路へ複製していません。 修正前の反例は16件失敗/181件成功。最終1,074テスト/32ファイル・型/lint/build、同じPDF内容hashの15資料の全ページpreflightが成功しました。ファルコム13/リミックスポイント10数値の受理・保存と、最終buildの固定API画面でsmart/full・比較・追加分析・復元・後続失敗時の要約保持・再試行も成功しています(模擬6呼出し、外部LLM追加0)。候補v3/確定v5・公開版0.7.3は維持、分析指紋はv76です。 凍結資料・期待値・評価区分・独立初回失敗は変更していません。調整後の再照合や固定API画面を独立初回成功・指定実モデルの通常生成成功へ数えません。指定実モデルの最終通常生成と利用者本人Chromeは未確認で、全体未完了です。累計12要約/15API、上限23要約/46APIを維持しています。正本の |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 915ce08b83
ℹ️ 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".
| let rest = reportingPeriodText(prefix) | ||
| .replace(/^\(\d+\)/, '') | ||
| .replace(/^\(+/, ''); | ||
| const declared = [...owners, '当社', '当グループ']; |
There was a problem hiding this comment.
Recognize the explicit 当社グループ owner
When a prose forecast uses the common explicit subject 当社グループの売上高は100百万円, removeOwners strips the shorter 当社 first and leaves グループの, so the new prefix check rejects the metric. The coverage, source-allocation, and preflight paths that now share this matcher consequently omit or reject otherwise verifiable reporting quantities; include the longer owner form and match longer owners before their prefixes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
4899712 で修正しました。明示主体の語彙へ「当社グループ」を追加し、呼出し側の宣言を含めて正規化・重複除去した後、長い名前から照合します。「当社」や短い会社名で先に切り取りません。
当社/当グループ/当社グループと、長い会社名が短い宣言を含む場合の正例、同じ主体の後に調整後指標が続く拒否例をmetric-semanticsで確認しました。既存の初回予想統合例も「当社グループの売上高については、売上高は…」へ置き換え、義務/source割当→preflight→受理→保存まで確認しました。原文・主体の意味・数量は変更していません。最終1,095テスト・型/lint/build・原PDF15資料のpreflightが成功しています。
| if ( | ||
| metricKey && | ||
| directMetrics.filter((m) => reportingMetricKey(m.label) === metricKey).length > 1 | ||
| ) | ||
| throw new Error('STRUCTURE:本文の同じ指標に複数の数量があり対応を一意に証明できません'); |
There was a problem hiding this comment.
Count repeated metric quantities, not metric mentions
When a paragraph repeats a metric as a topic before stating its only value, such as 売上高については、売上高は100百万円を見込んでおります, directMetrics contains the same canonical key twice and this branch throws before determining that only one occurrence owns a quantity. This rejects valid candidate acceptance and source preflight despite there being no ambiguous re-specification; restrict the duplicate check to occurrences bound to distinct quantities (and to the current numbered assertion).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
4899712 で修正しました。指標への言及回数ではなく、同じ番号付き項目内で指標へ直接対応する数量の原位置を数えます。「売上高については、売上高は100百万円…」は数量が一つなので受理し、同じ項目で数量を二つ示す再指定は、別名や同値でも拒否します。EPSの明示分母1株は金額数量に数えません。
生成前検査・候補受理・保存照合は、既に選択された原数量のstart/rawを渡し、別項目に同じ値/範囲があってもその所属だけを照合します。別の原数量や不一致の位置へ代替せず、全段落引用と元のquantity/assertion IDsは維持します。番号付き項目の境界を数量重複判定・頭部の照合・末尾述語へ適用しました。話題への言及で同じblock IDが重複するsourceIdsも一意化しています。
文法・同じ項目内の再指定拒否・独立項目・同値/範囲の選択はnumeric-evidence、preflight→受理→保存は既存の初回予想統合例で確認しました。最終1,095テスト・型/lint/build・原PDF15資料のpreflightが成功しています。
| return `eps:${perShareProfitKeys(text)[0]}`; | ||
| if (/^(売上高|売上収益|営業収益)$/.test(text)) return 'revenue'; | ||
| if (/^営業(?:利益|損失)$/.test(text)) return 'operatingProfit'; | ||
| if (/^経常(?:利益|損失)$/.test(text)) return 'ordinaryProfit'; |
There was a problem hiding this comment.
Preserve standard loss notation on ordinary-profit headers
When a forecast table labels its column 経常利益(△) or 経常利益又は経常損失(△), this exact key matcher returns null; unlike operating and net profit, revisionMetricLabel has no fallback that accepts the standard loss notation for ordinary profit. The new column-based declaredReportingMetrics logic therefore omits the ordinaryProfit obligation and can accept a summary that drops that declared column, whereas the previous region scan recognized it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
4899712 で修正しました。経常利益(△)、経常利益又は経常損失(△)を、原文の完全なラベルを保ったままordinaryProfitへ対応します。営業/純利益の利益・損失の併記と△も同じ有限の文法で照合し、修飾付き指標や「又は」以降の未知表現を標準指標へ縮めません。
宣言だけでなく、義務の根拠割当・preflight・受理後の充足にも同じ指標キーを使うようにしました。既存の表の反例を標準の損失表記との正負対へ統合し、列を入力から選択できること、正常受理/保存、経常利益を落とした要約のCOVERAGE拒否を確認しています。△を数量の符号へ変換したり、原数値を補ったりはしていません。最終1,095テスト・型/lint/build・原PDF15資料のpreflightが成功しています。
|
@codex review 最新レビューの3件へ個別返信し、修正をpushしました。前回のレビュー対象
傾向は、誤受理を防ぐ規則が通常の主体・話題・損失表記の正例まで拒否/除外することでした。不正例に隣接する通常正例を対で検査し、数量の所属と一意性から判定するようにしました。初回予想の既存統合例へ当社グループと話題の繰返しを、表の既存反例へ標準損失表記の正例を統合しています。語彙/項目の境界は部品、preflight→受理→保存と重要列の欠落拒否は代表例で確認し、同じ語彙を全利用経路へ複製していません。 修正前の反例は9件失敗/167件成功。最終1,095テスト/32ファイル・型/lint/build、同じPDF内容hashの15資料の全ページpreflightが成功しました。ファルコム13/リミックスポイント10数値の受理・保存と、最終buildの固定API画面でsmart/full・比較・追加分析・復元・後続失敗時の要約保持・再試行も成功しています(模擬6呼出し、外部LLM追加0)。候補v3/確定v5・公開版0.7.3は維持、分析指紋はv77です。 凍結資料・期待値・評価区分・独立初回失敗は変更していません。調整後の再照合や固定API画面を独立初回成功・指定実モデルの通常生成成功へ数えません。指定実モデルの最終通常生成と利用者本人Chromeは未確認で、全体未完了です。累計12要約/15API、上限23要約/46APIを維持しています。正本の |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f7724baaf
ℹ️ 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".
| // combines fields into one paragraph. Keep the full source and quantity IDs. | ||
| const fieldStarts = [ | ||
| 0, | ||
| ...[...normalized.matchAll(/[;;](?=\(\d+\))/g)].map((m) => m.index! + 1), |
There was a problem hiding this comment.
Derive numbered-field boundaries from physical newlines
When the original paragraph contains a same-line semicolon before a parenthesized number, for example (1)売上高は100百万円です。;(2)売上高は120百万円です。, this scan treats it exactly like the sentinel inserted by proseFieldText for a physical newline. Each value is then verified in a separate field and both conflicting re-specifications are accepted, even though the comment and intended rule restrict ownership boundaries to numbered fields at physical line starts. Preserve the original newline-derived boundaries instead of inferring them from normalized semicolons.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
38558b2で修正しました。項目の所属を正規化後のセミコロンから復元する走査を削除し、原文の物理改行と番号付き行頭から得た部分を正規化して、その長さから照合範囲を作ります。原文の「;(2)」「;(2)」は新しい項目にせず、同一行の数値再指定として拒否します。原段落・選択済みのquantityId/start/raw・assertionIdは維持しています。
同じ原因がないかproseFieldTextの生成・利用経路を確認しました。字句検索の区切りは指標検索に使い、項目の所有範囲には原文由来の範囲を使います。ASCII/全角セミコロン、全角番号、別名・同値・範囲、実改行との混在を部品で確認し、CRLFと字下げの正常例も保持しました。候補受理→保存への代表反例を1件追加し、既存の正常接続を再確認しています。
修正前の誤受理5件を再現。最終1,104テスト/32ファイル・型/lint/build、同じ内容hashの15実PDFのpreflight、原PDF数値の受理/保存、最終ビルドの固定API画面(模擬6回/外部0回)が成功しました。指紋のみv78へ更新し、候補v3/確定v5・公開版0.7.3は維持しています。指定実モデルの最終通常生成と利用者本人のChromeは未確認です。
|
@codex review レビュー指摘1件を対応し、関連する境界の反例も確認しました。
検証: 修正前の誤受理5件を再現、最終1,104テスト/32ファイル・型/lint/build、同じPDF内容hashの15資料の全ページpreflight、原PDF数値の受理/保存が成功。最終ビルドの固定API画面はsmart/full・比較・追加分析・保存復元・後続失敗時の要約保持・再試行を確認し、模擬6回/外部LLM追加0回です。 正常語法の過剰なfixture期待2件は語法を拡張せず訂正し、途中の失敗を保持しています。凍結資料・期待値・評価区分・初回独立失敗は変更せず、再照合を独立初回成功とはしません。指定実モデルの最終通常生成と利用者本人Chromeは未確認で、元の改善作業全体は未完了です。 原文の物理境界と照合文字列の位置の対応、および同一行の再指定拒否と別項目の正常照合の両立を中心に、更新差分の再レビューをお願いします。 |
|
Codex Review: Didn't find any major issues. Swish! 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". |
決算表の根拠対応の欠落によって、前回発表予想や当年決算実績の要約がエラーになる問題を修正しました。原文の表・セル・期間・単位に沿って数量を照合し、生成から表示・保存復元まで同じ根拠を確認します。
確認結果: 1,104テスト/32ファイル、型チェック・lint・ビルド、15実PDFの生成前検査、原PDF数値の受理・保存、固定APIによるsmart/full・比較・追加分析・保存復元の画面検査が成功しました。最新コミットのCodex再レビューは重大な問題なしです。利用者の既存Chrome環境でも、見える範囲で出力エラーの解消を確認しています。
利用者の実機確認は確認できた範囲の報告です。全資料・全モデルでの成功や、事前固定した条件での実モデル反復評価の完了を意味しません。既存の凍結期待値と初回失敗は保持しています。
v0.7.4のpatchリリースとして公開します。公開ZIPを既存の読み込み先フォルダへ差し替え、Chromeの拡張機能とTDnetページを再読み込みしてください。