Repository navigation
実装: retro_live_verification のproducer/resolver source_set_digest契約バグを修復する - #1781
Merged
Merged
Conversation
chatgpt-retro-context-marker-helper.mjsのresolve-liveロジックが、marker.refs.retro_index.source_set_digest という同一フィールドに対し(1)retro indexコメント自身の埋め込みdigestとの一致 と (2)marker引用の run_reports+retro_index自身から再計算した値との一致、という両立不能な2つの検証を行っていた。 producer(retro-index-builder.mjs)はcollectSourceComments()が発見した集合からdigestを計算するため、 両者が一致するのはproducerの発見集合がmarker引用集合と偶然一致する場合のみだった。 (2)の再計算チェックを削除し、各run_reportの独立digest検証とretro indexコメント自身の自己整合性検証のみを残す。
…ソースとしてスキャンする collectSourceComments()は#1153のchecklist記載子Issueとそこから発見されるPRのコメントのみを スキャン対象にしており、parent issue自身に投稿されたrun reportをsource_comment_set_digestの 計算対象に含められなかった。parent issue自身のコメントスキャンを追加(additive)し、 --additional-pull-number(multiple)オプションでchecklist経由で発見できないPR targetも 明示的にスキャン対象へ追加できるようにする。オプション未指定時はv2既存挙動を完全維持する。
buildDualTargetManifest()は投稿前の生成時点で無条件にreadback.canonical_comment_count=1/ digest_revalidation=pass/duplicate_count=0を自己申告しており、schema自体もconstでこれを 強制していた。schemaにstatus(pending/verified/failed)を追加しcanonical_comment_count/ duplicate_countをnullable、digest_revalidationをpending|pass|failのenumに変更。 generatorは生成時点でstatus:pendingを出力する(既存v2 schemaのreadback概念は無変更、 v3 dual-target schemaのみadditive変更)。実際の投稿後readback結果は post-retro-live-verification.mjsのdual-target CLI結果(readback_verified等)が 別途保持しており、そちらが呼び出し元にとっての正本となる。
…sを追加する buildRetroIndex()の実出力(fixtureでなく実producer関数)をmarker resolverへ渡し、 parent issue自身を対象とするケースでstatus解決が成功することを検証する統合テストを追加。 併せて、run report/retro indexそれぞれの改ざん(偽digest宣言)がfail-closedになる negative testを追加する。
Contributor
Preview URLPreview removed (PR #1781 closed). |
squne121
commented
Jul 26, 2026
squne121
left a comment
Owner
Author
There was a problem hiding this comment.
PR Review 判定
独立再検証の結果、PR #1781(head aaaff61ae9a1b54f3119d875a0118c72da6214c0)を APPROVE とする。
- Allowed Paths gate:
status: ok(Issue #1415拡張後、変更ファイル6件すべて適合) - CI: 全required checks green
- Mergeability:
MERGEABLE/CLEAN - resolverの二重検証バグ除去、producerの親Issue自身スキャン対応、v3 readback false-green修正、いずれも実装・テストで確認済み
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "aaaff61ae9a1b54f3119d875a0118c72da6214c0"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
allowed_paths_gate:
status: "ok"
violations: []
squne121
marked this pull request as ready for review
July 26, 2026 01:55
This was referenced Jul 26, 2026
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: producer/resolver source_set_digest契約バグを修復する
Summary
Issue #1415のpost-merge live closure実行中に発見した実装回帰を修復する。
agent_retro_index/v1のproducer(retro-index-builder.mjs)とCHATGPT_RETRO_CONTEXT_V1 markerのresolver(chatgpt-retro-context-marker-helper.mjs)が、refs.retro_index.source_set_digestという同一フィールドに対して数学的に両立不能な2つの検証を行っていたバグを修復した。Current repo reality / contract drift(現状と契約との乖離)
chatgpt-retro-context:resolve-liveがblocked_invalid_reference_chain(error_code: chatgpt_retro_context.source_set_digest_mismatch)を返した。chatgpt-retro-context-marker-helper.mjsのresolve-liveロジックが、payload.refs.retro_index.source_set_digestに対して(1)retro indexコメント自身の埋め込みdigestとの一致、(2)marker引用のrun_reports+retro_index自身から再計算した値との一致、という2つの検証を同一フィールドに課しており、producerの実際の計算方式(update-retro-index.mjsのcollectSourceComments()がスキャンした集合からのdigest)とは異なる集合を要求していたため、両者は特定の条件でしか同時に成立しなかった。collectSourceComments()は親Issue自身のコメントをスキャン対象に含んでおらず、Issue #1415が要求する「Issue #1153自身をissue-targetとする」ケースをproducerが発見できなかった。Scope Delta
scripts/agent-logs/update-retro-index.mjs(producer拡張のため必要)をpr-review-judgeの独立gateで未列挙と指摘され、Issue #1415のAllowed PathsをScope Delta経由で拡張して解消済み。Acceptance Criteria matrix(受け入れ基準対応表)
payload.refs.retro_index.source_set_digestはretro indexコメント自身の埋め込みdigestとの一致のみを検証するよう修正。marker引用run_reports+retro_index自身からの再計算・比較(意味論的に誤り)は削除ab9ce2bacollectSourceComments()が親Issue自身のコメントと--additional-pull-number指定PRもソースとしてスキャンするよう拡張(既存checklist子Issueスキャンはadditive維持)9d010a11retro_live_verification/v3のdual-target manifest生成時、投稿前のreadbackを無条件pass固定からstatus: pending(canonical_comment_count/duplicate_countはnull、digest_revalidationはpending)へ変更。実際の投稿後readbackで埋める設計に修正0d7e4d8ebuildRetroIndex()実出力を使ったround-trip integration test(親Issue自身ケース)+改ざんrun report/retro indexでのfail-closed negative testsfa30bfbcVerification Commands results(検証コマンド実行結果)
Runtime Verification Applicability
Schema Change Applicability
Schema Consumer Inventory
Before(変更前)
retro_live_verification/v3のdual-target manifestは、生成時点(投稿前)でreadback.canonical_comment_count: 1/digest_revalidation: pass/duplicate_count: 0を無条件に自己申告していた。After(変更後)
生成時点は
readback.status: pending、値はnull/pending。実際の投稿後readback処理で埋める。scripts/generate-retro-live-verification.mjsreadback初期値をpending化scripts/agent-logs/lib/chatgpt-retro-context-marker-helper.mjssource_set_digest検証ロジック修正scripts/agent-logs/update-retro-index.mjscollectSourceComments()が親Issue自身+追加PRもスキャンSafety Claim Matrix
pnpm test(1817/1817 pass)Backward compatibility / migration decision(後方互換性・移行方針)
retro_live_verification/v2は無変更。v3 dual-target manifestのreadbackフィールドのみadditive変更(新規statusフィールド追加、既存フィールドはnullable化のみで型自体は維持)。CI Test Performance Decision(CIテスト性能判断)
既存テストファイルへの追加のみ。新規CI lane・新規workflow jobは追加していない。
Checks
pnpm typecheckpasspnpm lintpasspnpm testpass(1817/1817)pnpm buildpassscripts/agent-logs/update-retro-index.mjsはAllowed Paths拡張後に適合)Notes
Refs #1415を使用しCloses #1415は使用しない。#1415はpost-merge live artifact chain完了までopenのままとする。resolvedになることを確認する。Refs #1415(本PRはIssueをcloseしない)