Repository navigation
実装: retro_live_verification 敵対的レビュー(P0-1〜P0-5,P1-1,P1-2)を修復する - #1757
Merged
Merged
Conversation
…erに--liveモードを追加する 敵対的レビュー指摘: checkDualTargetBundleはschema検証+context assertionのみで、 operation index/proof/retrospective result commentのURL・digest・PR head SHAが 入力JSONの自己申告値のまま通っていた。 --liveフラグ指定時は各target(issue_target/pull_request_target)の必須comment URLを 実際にgh api経由でlive fetchし存在確認する。proof_comment_urlはfenced JSONを抽出して canonical-json-v1 digestを再計算しproof_payload_digestと突合。pull_request_targetは gh pr viewでPR現在headと target_head_sha を突合しstale PR head検出も行う。 --liveなし(既定)ではstructural-onlyの既存挙動を完全維持し、fixtureベースの 既存テストは無変更で動作する。
…oof checkerに統合する 敵対的レビュー指摘: evaluateFindingsOrRationale()はstandalone --schema chatgpt_retrospective_result/v1経路からしか呼ばれておらず、実際の chatgpt-retro-e2e-proof:checkからは迂回可能だった。 check-chatgpt-retro-e2e-proof.mjsのvalidateChatgptRetroExecutionProof()に 同じevaluateFindingsOrRationale()を統合し、findings空かつno_findings_rationale 欠落のretrospective resultを実際のproof checkerでも拒否するようにした。 副次的に判明した既存の設計上の穴を記録: no_findings_rationaleのschema minLength:40と、evaluateFindingsOrRationaleのboilerplate拒否パターン (全て40文字未満の完全一致)は両立しないため、boilerplateパターン自体は schema validationの後段では到達不能。schema側の穴でありfollow-up。
敵対的レビュー指摘: schemaのtrusted_actor_id_allowlistはoptionalで追加済みだったが、 generate-retro-live-verification.mjsに対応するCLIオプションがなく、通常の生成経路 では常にlogin-only fallbackのままだった。 --trusted-actor-id(カンマ区切り数値ID)を追加し、execution_boundaryへ反映。 未指定時はフィールド自体を省略しv2完全互換を維持(body_digestは execution_boundaryを含まないため digest不変)。
敵対的レビュー指摘: SCHEMA定数がv2固定でv3 bundle生成のCLI経路が存在しなかった。 --schema-version v3 で --issue-target-json/--pull-request-target-json を受け取り retro_live_verification/v3準拠のbundleを生成するrunDualTargetCli()を追加。 v2の既存デフォルト・fixtureは無変更(--schema-version未指定時はv2既存パスのまま)。
--dual-target-manifest-jsonでretro_live_verification/v3 bundleを受け取り、 既存planPost()のCAS/trust/duplicate判定コアをv3向けに合成したmanifestで 再利用してIssue #1153へcanonical parent comment投稿を行う。 post-write readback/uniqueness検証も既存ロジックを再利用。 v2の--manifest-json経路は無変更。
… stepを追加する manifest_json_path(v2)とdual_target_manifest_json_path(v3)を相互排他な optional inputとし、指定された方のpath safety検証・post/verify stepを実行する。 既存v2の呼び出し形はmanifest_json_pathを指定する限り無変更。
fetchLiveCommentSet()を追加し、--recompute-digests --live-comment-setで --comment-set-json(外部ファイル)の代わりにgh api経由でrepo/issue/comment一覧を その場で取得してdigestを再計算するようにした。--comment-set-json経路は 後方互換のため維持。GhCliIssueCommentsClientにgetRepo/getIssueを追加。 また、workflow yamlのstep名変更(P0-3)に伴い既存regression testの step名一致箇所を追随修正した。
Contributor
Preview URLPreview removed (PR #1757 closed). |
squne121
commented
Jul 25, 2026
squne121
left a comment
Owner
Author
There was a problem hiding this comment.
PR Review 判定
独立再検証の結果、PR #1757(head 8d5bef59e352cfc89dc28beda2c547162d1eade3)を APPROVE とする。
- Allowed Paths gate:
status: ok(Issue #1415 の Allowed Paths 拡張後、変更ファイル10件すべて適合、violation無し) - CI: 全required checks green(typecheck/lint/test 1814件/build/e2e/python-test/actionlint/verify-static/deploy-pr等)
- Mergeability:
MERGEABLE/CLEAN - Overlap preflight: 候補#1501はCLOSED済み前提修正Issueであり並行作業でないことを確認済み(既知のfalse positive)
Refs #1415(Closes不使用)は、post-merge live artifact chain完了までIssueをopenのまま維持する意図的設計として承認
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "8d5bef59e352cfc89dc28beda2c547162d1eade3"
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- ".github/workflows/retro-live-verification.yml"
- "scripts/agent-logs/lib/github-comments.mjs"
- "scripts/check-chatgpt-retro-e2e-proof.mjs"
- "scripts/check-retro-live-verification.mjs"
- "scripts/generate-retro-live-verification.mjs"
- "scripts/post-retro-live-verification.mjs"
- "tests/chatgpt-retro-e2e-proof-check.test.ts"
- "tests/fixtures/retro-live-verification/dual-target-generator-issue-target.json"
- "tests/fixtures/retro-live-verification/dual-target-generator-pull-request-target.json"
- "tests/retro-live-verification.test.ts"
violations: []
allowed_paths_source: "linked_issue_contract_snapshot(#1415)"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
retro_live_verification: 敵対的レビュー(P0-1〜P0-5, P1-1, P1-2)を修復する
Summary
PR #1747(マージ済み、Issue #1415)に対する OWNER 投稿の敵対的レビュー(ChatGPT分析、#1415 (comment) )で指摘された P0-1〜P0-5・P1-1・P1-2 の全項目を実コード照合で reproduced: true と確認した上で修復した。PR #1747 は「単体テスト可能な関数」を追加したが、実際の E2E オーケストレーション経路(producer → poster → workflow → 真の live verifier)への統合が不足しており、本 PR でその統合を完成させる。
Current repo reality / contract drift(現状と契約との乖離)
pnpm check-retro-live-verificationという script 名や、実際の CLI が受け付けない引数(--repo/--parent-issue/--live等)を使用しており、preflight-scope: runtime_onlyによりcontract-review の baseline preflight で構文検証自体がskipされていた(P0-1)。本PRに先立ちIssue本文を実CLI契約に合わせて修正済み。retro_live_verification/v3の standalone checker(checkDualTargetBundle)は schema validation + Issue/PR 双方の context assertion のみを行い、operation index/proof/retrospective result の live fetch、digest 再計算、PR review surface proof、canonical parent comment の一意性・readback は検証していなかった(P0-2)。generate-retro-live-verification.mjsのSCHEMAはv2固定のまま、v3 bundle 生成の CLI 分岐が存在しなかった。post-retro-live-verification.mjsも v2 manifest 専用、workflow のpost-canonical-commentjob も v2 専用のままだった(P0-3)。check-chatgpt-retro-e2e-proof.mjsには未接続だった(P0-4)。declared_by_session_operator)と Issue/PR 本文の表示語(operator_attested)が不一致だった(P0-5、用語文書の不整合)。trusted_actor_id_allowlistを通常の generate 経路で設定する CLI オプションが存在しなかった(P1-1)。Scope Delta
Allowed Paths の追加なし(PR #1747 で確定済みの Allowed Paths 内で完結)。
Acceptance Criteria matrix(受け入れ基準対応表)
checkDualTargetBundleに--liveモードを追加。両targetの全comment URLをlive fetchし、proof_payload_digestをproof commentの実body digestと再計算・比較。pull_request_target.target_head_shaをPR現在headと照合(stale head検出)268dd4cdevaluateFindingsOrRationaleをcheck-chatgpt-retro-e2e-proof.mjsのvalidateChatgptRetroExecutionProofに統合。実際のE2E proof checkerがfindings空+rationale欠落を拒否するfea24ff0generate-retro-live-verification.mjsに--trusted-actor-idを追加、execution_boundary.trusted_actor_id_allowlistへ反映(未指定時はv2既存挙動を完全維持)6b4f6558--schema-version v3分岐を追加。--issue-target-json/--pull-request-target-jsonを受け取りv3 dual-target manifestを生成26a121c3--dual-target-manifest-json分岐を追加。v3 manifestをIssue #1153へCAS/single-writer/readback付きで投稿する経路を実装42c31ac4.github/workflows/retro-live-verification.ymlにv3向けworkflow_dispatch input(dual_target_manifest_json_path等)とstepを追加。YAML構文パース確認済み83479ca8--recompute-digests --live-comment-set --live-comment-set-target-number <N>を追加。gh api経由でlive comment一覧を取得し、tupleからdigestを再計算してmanifest内の値と照合05c3bd75上記いずれも既存の
retro_live_verification/v2契約・fixture・argument-freeデフォルトは無変更(回帰テストで確認)。Verification Commands results(検証コマンド実行結果)
対象テスト(
tests/retro-live-verification.test.ts,tests/chatgpt-retro-e2e-proof-check.test.ts)は上記pnpm test全体実行に含まれる。Issue #1415本文の
preflight-scope: runtime_onlyなVC(AC2〜AC13, AC15)は、live GitHub実行を要するためcontract-review baseline preflightではskipされ、本PRのunit testでロジック(モックしたGraphQL/REST応答)を検証済み。実際のlive実行はマージ後にIssue #1415側でpost-merge live artifact chainの一環として行う。Runtime Verification Applicability
Schema Change Applicability
Schema Consumer Inventory
Before(変更前)
retro_live_verification/v3はstandalone checker(schema validation + context assertion のみ)としてのみ存在し、producer(生成)・poster(投稿)・workflow統合経路が存在しなかった。check-chatgpt-retro-e2e-proof.mjsはAC10のno_findings_rationale検証と接続されていなかった。After(変更後)
retro_live_verification/v3にproducer(generate-retro-live-verification.mjs --schema-version v3)・poster(post-retro-live-verification.mjs --dual-target-manifest-json)・workflow統合(retro-live-verification.ymlのv3 input/step)を追加。check-chatgpt-retro-e2e-proof.mjsはAC10ゲートを内蔵。scripts/generate-retro-live-verification.mjs--schema-version v3分岐、--trusted-actor-id追加。デフォルト(v2)は無変更scripts/post-retro-live-verification.mjs--dual-target-manifest-json分岐追加。v2既存経路は無変更scripts/check-retro-live-verification.mjs--live(v3 live検証)、--live-comment-set(P1-2)追加scripts/check-chatgpt-retro-e2e-proof.mjs.github/workflows/retro-live-verification.ymlSafety Claim Matrix
pnpm test(1814/1814 pass)yaml.safe_loadによるパース確認actionlintジョブで確認するgit diff --stat確認(Allowed Paths内10ファイルのみ)Backward compatibility / migration decision(後方互換性・移行方針)
retro_live_verification/v2の既存挙動・fixture・argument-freeデフォルトは無変更。新規CLIオプションは全てoptionalで、未指定時は既存v2経路を通る。v3のproducer/poster/workflow統合は完全新規追加であり、v2からの自動migrationは発生しない。CI Test Performance Decision(CIテスト性能判断)
既存テストファイルへの追加のみで、新規CI lane・新規workflow jobは追加していない(
.github/workflows/retro-live-verification.ymlのinput/step追加はworkflow_dispatch専用でPRイベント時の実行時間には影響しない)。既存pnpm testの実行時間への影響は追加テストケース分のみ。Checks
pnpm typecheckpasspnpm lintpasspnpm testpass(1814/1814)pnpm buildpasstests/chatgpt-retro-e2e-proof-check.test.tsはP0-4修正の対応testとしてpr-review-judgeの独立gateで未列挙を指摘され、Issue #1415のAllowed PathsをScope Delta経由で拡張して解消済み)Notes
Refs #1415を使用しCloses #1415は使用しない。#1415は本PRマージ後もpost-merge live artifact chain(connector-only retrospective result生成含む)が完了するまでopenのままとする。chatgpt_retrospective_result/v1の生成には、真のChatGPTセッション(Claude Code/Codex CLI自身は該当しない)が必要であり、これは本PRのスコープ外(Issue #1415側でCHATGPT_RETRO_REQUEST_V1投稿として扱う)。Refs #1415(本PRはIssueをcloseしない)