Repository navigation
fix: 要約の意味保持・部分失敗・設定と保存の競合を修正する - #30
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. |
|
@codex review 前回のレビューは Running 表示のままで結果が出ていないため、現在の head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4907919647
ℹ️ 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 ( | ||
| contradicted(observation) || | ||
| (observation.comparison && contradicted({ ...observation, ...observation.comparison })) | ||
| ) { |
There was a problem hiding this comment.
Validate rateId against its physical owner
When an otherwise valid comparison supplies a rateId belonging to a different confirmed percentage row, and the confirmed current fact has no paired rate of its own, this check validates only the current and comparison amount IDs. The later rateIds.size check sees a single ID and accepts it, after which observationChange displays that unrelated percentage as the source-reported change. The rate quantity needs an ownership/context check against the current metric and comparison axis, not just a % unit check.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
修正しました(af196f1)。
rateIdも物理IDへ解決して確定所有者の指標・期間・範囲・会計基準・状態を照合し、原数量を別の増減率として使う観測を除外します。金額と率の対応が確定していれば現在値の物理IDを、比較も確定していれば比較軸・比較値IDも照合します。前期金額が未抽出の場合や補足側だけの現在値にも同じ検査を適用します。未知の文脈と未対応の補足率は独立点検に残します。
修正前に無関係な確定%が受理されるケースを再現し、事実ID/原数量ID、比較軸の取り違え、前期金額なしの所有者、正常な率と未知の比較文脈を回帰検査しました。保存復元後も無関係な「原文%」が表示・追加分析へ入らないことを確認済みです。
| native(p.valueId) === native(observation.valueId) && | ||
| (observation.entity === null || observation.entity === p.entity) && | ||
| observation.metric === p.metric && | ||
| observation.state === p.state && | ||
| (observation.period === null || periodKey(observation.period) === periodKey(p.period)) && | ||
| (observation.scope === null || observation.scope === p.scope) && | ||
| (observation.basis === null || observation.basis === p.basis) |
There was a problem hiding this comment.
Match known context aliases before treating values as supplemental
For a reviewed observation that references the same physical quantity but uses a recognized equivalent spelling—such as 国際会計基準 versus IFRS, 非連結 versus 個別, or two labels sharing a reportingMetricKey—the contradiction check correctly considers the contexts compatible, but these raw equality checks still fail. The observation is therefore placed in supplement and rendered and passed to analysis alongside the confirmed primary value, duplicating one physical quantity instead of merging it; use the same canonical context keys here for known aliases.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
修正しました(af196f1)。
指標・範囲・会計基準の既知の別名を共通キーで照合し、統合・比較基準・比較値の重複除外へ適用しました。IFRS/国際会計基準、個別/単体/非連結、reportingMetricKeyの別名は同じ原数量へ統合します。未知の自由記述には別のキーを使い、曖昧な文脈や同額の別セルを誤って統合しません。
消費側も確認し、追加分析で統合済み観測が現在値をもう一度数値根拠として列挙していた経路も修正しました。確定事実への補足として渡し、観測ID・点検済み区分・比較・条件・原文対応を保持します。別名が補足へ重複しないこと、比較基準の対応、未知期間の保持、分析根拠での重複除去を検査しました。
| .filter(Boolean) | ||
| .join(' / ') | ||
| ); | ||
| setStagesReady(true); |
There was a problem hiding this comment.
Do not auto-score when cached stages could not be read
When chrome.storage.local.get rejects while restoring a cached summary and experimental scoring is enabled, setting stagesReady to true leaves an empty score stage, so SummaryButton immediately calls startScore() and issues a new paid scoring request. Reopening the summary during a persistent storage failure repeats this request even though the warning says the user can retry; keep automatic scoring blocked on this failure path or expose an explicit retry state.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
修正しました(af196f1)。
後続キャッシュの読込失敗をキャッシュなしとして扱わず、段階別の再試行可能なエラーに変更しました。採点エラーがある間は自動開始を止め、ボタンによる明示再試行を維持します。同じ原因で自動採点されていた保存スコアの検証失敗にも対応しました。
実Reactの固定応答テストで、読込失敗・開き直し・採点OFF→ONでは通信0回、明示再試行で初めて通信することを確認しました。本文を保持し、遅い読込失敗で開始済みの追加分析を置き換えないことも確認済みです。実APIは呼び出していません。
| }); | ||
| expect(doc.querySelector('.tdnet-digest-header')).toBeNull(); | ||
| expect(replacement.doc.querySelectorAll('.tdnet-digest-button-cell')).toHaveLength(1); | ||
| expect(listeners.size).toBe(subscriptions); |
There was a problem hiding this comment.
Wait for replacement root effects before asserting subscriptions
This assertion runs immediately after the replacement iframe and React root are created, but the root's passive effects have not necessarily installed all storage listeners yet. A normal parallel npm test run intermittently reaches this line with listeners.size === 2 instead of 3, while a retry passes; use the same waitFor synchronization used by the neighboring lifecycle assertions so the default test command is not flaky.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
検査内容やタイムアウトを緩めず、最終差分で通常のnpm test(設定済み2並列)が40ファイル/1,254件成功しました。type-check・lint・build・git diff --checkも成功しています。
|
@codex review 4件の指摘と周辺の同種問題を修正し、それぞれのスレッドへ対応内容を返信しました。現在のhead af196f1 を再レビューしてください。 今回の差分は8ファイル、+409/-108です。
最終の通常npm test(2並列)は40ファイル/1,254件成功。type-check、lint、build、diff checkも成功しました。公開treeは検証済みtreeと一致しています。元の診断応答の固定再生では19確定事実を保持し、24指標/11説明が意味点検へ到達し、表示と保存復元が一致しました。 実API・実Chrome画面は追加検証していません。固定点検応答をモデル品質の証明には数えていません。マージ・リリースは行っていません。 |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
変更
再レビュー対応(4907919からの差分)
検証
未確認の範囲
実APIは呼び出していないため、実応答の意味点検通過や未知資料の生成品質は未確認。表示用の固定点検応答を使った再生はモデル品質の証明に数えない。実Chromeでの容量不足・拡張通信・画面は未確認。前回の実拡張smokeはChromium起動時に環境のsocket権限制限で停止し、今回その制限を回避していない。元の診断ログ・PDF・再生スクリプトはコミットしていない。PRは作業開始時からopen/non-draftで、状態は変更していない。マージ・リリースは行っていない。