Skip to content

fix(issue-refinement-loop): critical_external_claims 型不一致を build_loop_state.py の境界投影で解消 - #1278

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-1277-critical-external-claims-type
Jul 2, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-1277-critical-external-claims-type

Conversation

@squne121

@squne121 squne121 commented Jul 2, 2026 •

Copy link
Copy Markdown
Owner

概要

build_loop_state.py が REFINEMENT_LOOP_PLAN_V1.decisions.web_research_policy.critical_external_claims(ExternalClaim[] object 配列)を LOOP_STATE_V1.web_research_policy.critical_external_claims(string[])へ境界投影せずそのまま転記していたため、非空の claim を含む場合に schema validation が type mismatch で失敗する不具合を解消します。

本 PR のマージにより対象 Issue を解決します。Closes #1277

変更内容

  • build_loop_state.py に _project_critical_external_claims() を追加し、ExternalClaim.claim のテキストのみを string[] として投影する境界処理を実装。
  • 投影不能な要素(非 object item・claim 欠落・claim が空文字・claim が非 string)は silent stringify / silent drop せず、status=invalid + errors[] を返す fail-closed 処理とした。
  • producer 側(plan_refinement_loop.py の _extract_critical_external_claims())の戻り値型は変更していない(Out of Scope)。
  • schemas/loop_state.schema.json の critical_external_claims 定義(string[])は既存のまま変更不要だったため変更していない。
  • レビュー指摘(PR コメント参照)を受けた強化: _project_critical_external_claims() は ExternalClaim schema の完全検証(required keys / additionalProperties: false / affects enum / source_hint 型)を行い、critical_external_claims キー欠落や非 dict の web_research_policy も structured diagnostics で fail-closed する。投影値は claim.strip() を用いる。

テスト

  • test_critical_external_claims_producer_contract.py: producer が引き続き ExternalClaim[] object 配列を返すことを確認(AC1)。
  • test_critical_external_claims_builder_projection.py: builder の投影処理(AC2)、実際の planner 出力を使った end-to-end schema validation(AC3)、投影不能要素の fail-closed 拒否(AC4)を確認。
  • 既存 web_research 関連 regression test・critical_external_claim keyword 判定 regression test が green であることを確認(AC5, AC6)。
  • レビュー指摘対応で fail-closed 検証テスト 7 本と errors[] assert 強化・subprocess timeout を追加。
  • skill 全体のテストスイート(1031 件)が全て pass。

受け入れ条件の達成状況

  • AC1: producer(_extract_critical_external_claims())は ExternalClaim[] object 配列を維持し、refinement_loop_plan_v1.json の schema validation を通過する(producer 契約テストで確認)。
  • AC2: build_loop_state.py は ExternalClaim[] を string[] に投影し、各要素は ExternalClaim.claim のテキスト(strip 済み)のみになる。
  • AC3: 非空の critical_external_claims を含む実 planner 出力を builder に渡し、生成された LOOP_STATE_V1 が loop_state.schema.json の jsonschema 検証を例外なく通過する。
  • AC4: 投影不能要素(非 object・claim 欠落・空文字・非 string、加えて affects/source_hint 欠落・enum 外・型不正・余剰 property)は silent stringify / silent drop せず status=invalid + errors[] で fail-closed する。
  • AC5: web-research-routing.md の有無判定ロジックが投影後の string[] に対して regression していない(-k web_research green)。
  • AC6: claim 抽出の keyword 判定ロジックが無変更であることを既存テストで確認(-k critical_external_claim green)。

検証コマンド結果

  • AC1 は producer 契約テストを実行し 1 件 pass。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_producer_contract.py -q
  • AC2/AC3/AC4 は builder 投影テストを実行し 7 件 pass。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_builder_projection.py -q
  • AC5 は web_research 関連 regression を実行し 2 件 pass。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -q -k "web_research"
  • AC6 は keyword 判定 regression を実行し 2 件 pass。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_plan_refinement_loop.py -q -k "critical_external_claim"
  • skill 全体スイートは 1031 件全て pass。
uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -q

Allowed Paths 準拠(変更ファイル一覧)

  • .claude/skills/issue-refinement-loop/scripts/build_loop_state.py(変更)
  • .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_producer_contract.py(新規)
  • .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_builder_projection.py(新規)

Allowed Paths 外のファイル変更はありません。

🤖 本 PR は Claude Code により生成されました。

…laims を string[] に投影する

build_loop_state.py が REFINEMENT_LOOP_PLAN_V1 の
critical_external_claims(ExternalClaim[] object 配列)を LOOP_STATE_V1
schema の string[] へ境界投影せずそのまま転記していたため、schema
validation が type mismatch で失敗していた。ExternalClaim.claim テキスト
のみを抽出する _project_critical_external_claims() を追加し、投影不能な
要素(非 object item・claim 欠落・空文字・非 string)は silent
stringify/drop せず status=invalid + errors[] で fail-closed する。

Closes #1277
@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-1278/

The preview will be removed when this PR is closed.

@squne121

squne121 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "d7cf7d1ca6b02f6686e1113a94179496350e3910"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
schema: ALLOWED_PATHS_GATE_RESULT_V1
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
contract_source_kind: issue_comment
contract_source_id: "#1277 (comment)"
expected_contract_fingerprint: "sha256:f8cd46482b28a5b0b590299ca747ebe0b6cd0d92555766a561a59884340d611d"
changed_files:
- "build_loop_state.py (issue-refinement-loop scripts)"
- "test_critical_external_claims_builder_projection.py (issue-refinement-loop tests)"
- "test_critical_external_claims_producer_contract.py (issue-refinement-loop tests)"
violations: []

レビュー所見(pr-review-judge, self-authored PR のため gh pr review 不可、gh pr comment で代替投稿)

  • CI: 全 required check green(ci_verdict_summary.py status=all_pass)。PR Body Japanese Check も SUCCESS。
  • Allowed Paths: 変更3ファイルは全て issue 実装: issue-refinement-loop の critical_external_claims 型不一致を解消する #1277 の Allowed Paths 内。schemas 定義・producer 抽出ロジックは無変更(Out of Scope 遵守を確認)。
  • diff 実体確認: builder スクリプトの diff は投影関数の追加と既存転記箇所の置換のみに限定。無関係な既存ロジックの削除・書き換えなし。
  • AC1: producer 契約テストで ExternalClaim object[] のまま維持されることを schema 照合込みで確認。
  • AC2: 投影後の string[] が claim テキストのみであることをテストで直接assert(affects/source_hint は含まれない)。
  • AC3: 実 planner 出力を実際に builder に通し jsonschema Draft7Validator で例外なく検証、Issue Background の具体的失敗シナリオ(非空 ExternalClaim[] での type mismatch)が解消されることを end-to-end で確認。
  • AC4: fail-closed を4パターン(claim欠落・非object item・空文字・非string)で検証。各テストは returncode!=0 かつ status=invalid かつ出力ファイル未生成をassertしており、silent stringify/dropではないことを構造的に保証。
  • AC5/AC6: 既存 regression が green であることを確認。

@squne121

squne121 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

敵対的レビュー結果

判定: REQUEST_CHANGES 寄り。
PR #1278 は修正方向そのものは正しいです。REFINEMENT_LOOP_PLAN_V1 側の ExternalClaim[] を維持し、build_loop_state.py の境界で LOOP_STATE_V1.web_research_policy.critical_external_claims: string[] に投影する、という設計判断は Issue #1277 の本質に合っています。ただし、現実装は「ExternalClaim[] を受ける」と言いながら、実際には claim さえあれば不完全な object も通してしまうため、builder 境界としてまだ緩いです。

PR は draft/open、mergeable、head は d7cf7d1...、変更は 1 commit・3ファイル・+485/-3 です。 既存コメントには APPROVE / merge_ready: true の自己レビュー相当コメントがありますが、敵対的レビューではこれを決定的根拠にはしません。


参照した主要コンテキスト

Issue #1277 は、planner 側の critical_external_claims が ExternalClaim[] object 配列である一方、LOOP_STATE_V1 側 schema は string[] を要求しており、build_loop_state.py が境界投影せずそのまま転記して schema validation が失敗する、という問題を明確に定義しています。

repo schema 上も同じ構図です。loop_state.schema.json の web_research_policy.critical_external_claims は array かつ items: string です。 一方、refinement_loop_plan_v1.json では critical_external_claims は required field で、items は ExternalClaim 参照です。 ExternalClaim は claim, affects, source_hint を required とし、additionalProperties: false です。

外部仕様照合でも、この解釈は正しいです。JSON Schema の items は配列の各要素に適用されるため、items: {type: "string"} の配列に object が入れば invalid になります。また空配列は item validation の対象要素がないため valid になり、この種の bug を既存 fixture が見逃す典型的な false negative になります。([JSON Schema]1)


良い点

PR は producer 側を string[] に変えず、builder 境界で projection する方針を採っています。これは正しいです。plan_refinement_loop.py の _extract_critical_external_claims() は現在も list[dict[str, Any]] を返し、issue body 由来では claim, affects, source_hint を持つ dict を append します。 ここを string[] に潰すと planner artifact schema と golden contract を壊すため、builder-boundary projection が最小修正です。

実装も旧コードの単純 list(...) 転記を置換し、_project_critical_external_claims() を通して claim text だけを LOOP_STATE に入れる形になっています。 新規テストは direct projection、実 planner output → builder → schema validation、fail-closed rejection を追加しており、主たる再発ケースはかなり押さえています。 producer contract test も、producer が ExternalClaim[] object 配列を維持することを確認しています。


Blocking finding 1: ExternalClaim[] 契約を完全には検証していない

現 helper は、各 item について「dict であること」「claim が string であること」「claim.strip() が空でないこと」だけを見ています。affects と source_hint の存在、affects enum、source_hint 型、余剰 property の禁止は見ていません。

これは Issue / schema が言う ExternalClaim[] 境界投影としては不十分です。ExternalClaim schema は required keys と additionalProperties: false を持っています。 JSON Schema の object validation でも、required は欠落 property を invalid にし、additionalProperties: false は未定義 property を拒否します。([JSON Schema]2)

攻撃ケース:

{
  "critical_external_claims": [
    { "claim": "verify current API behavior" }
  ]
}

これは ExternalClaim ではありません。affects と source_hint が欠けています。しかし現 helper は claim だけを見て "verify current API behavior" に投影し、LOOP_STATE schema も通ってしまいます。

もう一つの攻撃ケース:

{
  "critical_external_claims": [
    {
      "claim": "verify current API behavior",
      "affects": "VC",
      "source_hint": null,
      "unexpected": "silently accepted before projection"
    }
  ]
}

これも ExternalClaim schema では invalid ですが、現 helper は通します。builder は「planner artifact schema と LOOP_STATE schema の境界」を所有する役割なので、ここで upstream contract drift を黙って修復してしまうのは危険です。Issue #1024 の builder-first 目的は、手書き state を排除し schema-valid な LOOP_STATE を決定論的に生成し、validation diagnostics を返すことでした。

要求修正: _project_critical_external_claims() で full ExternalClaim shape を検証してください。最低限、以下を fail-closed にするべきです。

EXTERNAL_CLAIM_KEYS = {"claim", "affects", "source_hint"}
VALID_AFFECTS = {"Outcome", "InScope", "AC", "VC", "StopCondition"}

if not isinstance(item, dict):
    ...
missing = EXTERNAL_CLAIM_KEYS - set(item)
extra = set(item) - EXTERNAL_CLAIM_KEYS
if missing:
    errors.append(...)
if extra:
    errors.append(...)

claim = item.get("claim")
affects = item.get("affects")
source_hint = item.get("source_hint")

if not isinstance(claim, str) or not claim.strip():
    ...
if affects not in VALID_AFFECTS:
    ...
if source_hint is not None and not isinstance(source_hint, str):
    ...
projected.append(claim.strip())

代替案として、builder input の planner artifact 全体を refinement_loop_plan_v1.json で validation してから projection してもよいです。ただしこの PR の最小修正としては、projection helper 内で ExternalClaim の required / additional / enum / type を見る方が小さいです。


Blocking finding 2: required field 欠落が [] に黙殺される

refinement_loop_plan_v1.json では web_research_policy.critical_external_claims は required です。 しかし PR head の builder は以下のように .get("critical_external_claims", []) で欠落を空配列に変換します。

critical_external_claims_raw = web_research_policy_raw.get(
    "critical_external_claims", []
)

これにより、planner artifact が schema-invalid でも、builder が [] に補正して LOOP_STATE を生成できます。特に required: true / reason_code: critical_external_spec_claim なのに critical_external_claims が欠落しているケースでは、web research が必要とされているのに claim が空、という矛盾 state を作れます。

既存の negative tests は decisions 欠落や web_research_policy 欠落は見ていますが、web_research_policy.critical_external_claims という nested required field 欠落までは見ていません。

要求修正: default [] にする前に presence check を入れてください。

if "critical_external_claims" not in web_research_policy_raw:
    blocked.append(
        "missing_required_field: planner decisions.web_research_policy.critical_external_claims"
    )
    return None, blocked

同時に、web_research_policy_raw 自体が dict でない場合も .get() で落とさず、build result JSON として fail-closed にするべきです。builder は agent-facing tool なので、traceback より structured diagnostics を返す方が運用品質が高いです。


Major finding 3: whitespace handling が中途半端

現 helper は claim.strip() == "" で空白のみ claim は拒否しますが、投影時は projected.append(claim) として元文字列をそのまま残します。 現 producer は issue body 由来では line.strip()、comment 由来では comment_body[:100].strip() を使っているため、通常経路では表面化しにくいです。

ただし builder は境界 component です。入力 artifact が外部生成・手動生成・将来の producer 変更で空白付きになる可能性を考えると、判定だけ strip して出力は unstripped という挙動は不要に不安定です。

推奨修正: text = claim.strip() を投影値にしてください。既存 test に以下を追加できます。

{"claim": "  Verify current API behavior  ", "affects": "VC", "source_hint": null}

期待値:

["Verify current API behavior"]

Test quality findings

AC4 のテスト群は status=invalid と出力ファイル未生成を確認していますが、empty claim / non-string claim のケースでは errors[] populated まで明示 assert していません。missing claim / non-object では errors[] を見ています。 小さい差ですが、fail-closed contract を固定するなら全 invalid case で errors[] の code / message を assert してください。

追加すべきテストは次です。

test_build_loop_state_rejects_external_claim_missing_affects
test_build_loop_state_rejects_external_claim_missing_source_hint
test_build_loop_state_rejects_external_claim_with_unknown_affects
test_build_loop_state_rejects_external_claim_with_extra_property
test_build_loop_state_rejects_missing_critical_external_claims_field
test_build_loop_state_trims_projected_claim_text
test_build_loop_state_rejects_non_object_web_research_policy_without_traceback

Python の subprocess.run() を使うテスト方針自体は問題ありません。公式 docs でも run() は推奨 API で、capture_output=True / text=True の利用も通常の使い方です。ただし CI hardening として timeout= を付けると、subprocess hang 時の診断性が上がります。([Python documentation]3)


web-research-routing との整合性

web-research-routing.md は trigger を REFINEMENT_LOOP_PLAN_V1.decisions.web_research_policy.required == true に置き、routing 側では status, failure_class, verification_route, critical_external_claims, unresolved_risks などの consumer field だけを見る設計です。 したがって、LOOP_STATE 側で claim text の string[] に落とすこと自体は妥当です。

ただし、この妥当性は「builder が planner artifact の ExternalClaim[] 契約を正しく受けた後に投影する」場合に限ります。現状のように partial object を受け入れると、routing-minimal な string[] が upstream schema drift を隠蔽します。


CI / Preview / 配布物観点

head commit に対する workflow run では ci, deploy-pages, check-hook-integrity, agent-session-manifest, Check Japanese Content の success が確認できます。ただし同じ一覧に Check Japanese Content の過去 failure→success の履歴も含まれています。

PR preview コメントは「publish requested」「asset-level live check 未検証」となっています。 workflow 側でも preview asset live check は continue-on-error: true で、失敗しても fallback comment を投稿する設計です。 したがって、この PR の acceptance evidence として preview URL を使うべきではありません。今回の変更は internal Python script / tests のため runtime preview 非依存でよいですが、配布物としては「deploy-pages success = live asset verified」ではありません。


関連Issue / PRの位置づけ

この PR は #1024 / #1077 の builder-first 設計の後続修正です。#1077 は REFINEMENT_LOOP_PLAN_V1 と compact review result から LOOP_STATE_V1 を生成する builder-first flow を導入した merged PR です。 その後、#1277 で critical_external_claims の非空 object[] が既存 empty fixture によって検出されなかったことが判明しました。これは JSON Schema 的にも、空配列が item schema を実質的に通過してしまうため説明がつきます。(JSON Schema)

また #1265 の Gemini CLI → Antigravity CLI migration 調査中にこの問題が見つかった、という背景があります。Google 公式ブログ上でも Antigravity CLI への移行では当初 1:1 feature parity がないとされ、consumer 向け Gemini CLI / Gemini Code Assist extension は 2026-06-18 に request serving を停止する、と説明されています。([Google Developers Blog][4]) ただし #1278 自体は provider migration を扱う PR ではなく、schema boundary bug の修正に閉じるべきです。ここで Antigravity / Gemini 側の配布物や runtime behavior を混ぜるとスコープ違反になります。


最小修正案

build_loop_state.py の helper を次の方向に寄せるのが最小です。

EXTERNAL_CLAIM_KEYS = {"claim", "affects", "source_hint"}
VALID_AFFECTS = {"Outcome", "InScope", "AC", "VC", "StopCondition"}

def _project_critical_external_claims(
    claims_raw: Any,
) -> tuple[Optional[list[str]], list[str]]:
    if not isinstance(claims_raw, list):
        return None, [
            "critical_external_claims_invalid_type: expected a list, "
            f"got {type(claims_raw).__name__}"
        ]

    projected: list[str] = []
    errors: list[str] = []

    for idx, item in enumerate(claims_raw):
        path = f"critical_external_claims[{idx}]"

        if not isinstance(item, dict):
            errors.append(f"{path}_not_object: expected ExternalClaim object")
            continue

        keys = set(item)
        missing = EXTERNAL_CLAIM_KEYS - keys
        extra = keys - EXTERNAL_CLAIM_KEYS

        if missing:
            errors.append(f"{path}_missing_required_keys: {sorted(missing)}")
            continue

        if extra:
            errors.append(f"{path}_additional_properties: {sorted(extra)}")
            continue

        claim = item["claim"]
        affects = item["affects"]
        source_hint = item["source_hint"]

        if not isinstance(claim, str):
            errors.append(f"{path}.claim_not_string: got {type(claim).__name__}")
            continue

        text = claim.strip()
        if not text:
            errors.append(f"{path}.claim_empty: claim must be non-empty")
            continue

        if affects not in VALID_AFFECTS:
            errors.append(f"{path}.affects_invalid: got {affects!r}")
            continue

        if source_hint is not None and not isinstance(source_hint, str):
            errors.append(
                f"{path}.source_hint_invalid: expected string or null, "
                f"got {type(source_hint).__name__}"
            )
            continue

        projected.append(text)

    if errors:
        return None, errors

    return projected, []

さらに builder 側では、.get("critical_external_claims", []) の前に required field presence を明示検証してください。


最終判断

この PR は「型不一致の直し方」は合っています。producer を壊さず、builder projection に限定したのは正しいです。

ただし、現状は ExternalClaim[] contract を claim だけの loose object contract に落としてしまっており、required field 欠落も [] に黙殺できます。これは builder-first / fail-closed の設計思想と衝突します。

P1 2件を直せば APPROVE 可能です。
修正対象は小さく、schema 変更や producer 変更は不要です。

[4]: https://developers.googleblog.com/en/an-important-update-transitioning-gemini-cli-to-antigravity-cli/ "

        An important update: Transitioning Gemini CLI to Antigravity CLI
        
        
        \- Google Developers Blog
        
    "

pr-review-judge の REQUEST_CHANGES を反映。build_loop_state.py の
_project_critical_external_claims() を ExternalClaim schema
(claim/affects/source_hint required, additionalProperties: false,
affects は Outcome/InScope/AC/VC/StopCondition の enum, source_hint は
string|null) の完全検証に強化し、非 dict item・required keys 欠落・
未定義 property・claim 非 string/空・affects enum 外・source_hint 型不正
のいずれも fail-closed で errors[] に蓄積するようにした。

critical_external_claims キー自体の欠落も missing_required_field で
fail-closed にし、web_research_policy_raw が dict でない場合も
traceback を出さず structured error を返すようにした。投影値は
claim.strip() で出力する。

テストを 9 件追加し、既存 empty/non-string claim ケースにも errors[]
の内容を明示的に assert するよう強化した。

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "4e38d3ac7ad81fc976add743675780008273b633"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions:

  • kind: update_pr_body_hygiene
    executor: implementation-worker
    skill: open-pr.update_pr
    blocking_merge_ready: true
    mechanical: true
    auto_fix_applied: []
    follow_up_issue_requests: []
    allowed_paths_gate:
    status: ok
    producer_role: review_subagent
    worker_report_used_as_canonical: false
    changed_files:
    • .claude/skills/issue-refinement-loop/scripts/build_loop_state.py
    • .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_builder_projection.py
    • .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_producer_contract.py
      allowed_paths:
    • .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
    • .claude/skills/issue-refinement-loop/scripts/build_loop_state.py
    • .claude/skills/issue-refinement-loop/schemas/loop_state.schema.json
    • .claude/skills/issue-refinement-loop/tests/**
      violations: []
      note: manual path check confirms all 3 files within Allowed Paths scope.

Findings iteration 1

Previous adversarial review findings on the prior head are resolved in current head 4e38d3a.

P1-1 ExternalClaim full validation: the projection helper checks required keys claim/affects/source_hint, rejects unknown extra keys, checks affects enum membership, and checks source_hint is string or null, each as a distinct structured error.
The required-key set and enum constants were diffed against the ExternalClaim definition in the plan schema and match exactly (required list, additionalProperties false, enum values).
P1-2 missing-field and non-dict handling: a missing claims key now produces a missing_required_field diagnostic and stops (no silent empty-list default). A non-dict policy object now produces an invalid_type diagnostic with no unhandled exception (test asserts no traceback in stderr).
The third prior finding, projected value trimming, is addressed: claim text is stripped both for the decision and for the output value, with a dedicated regression test.

The two new test files add 12 test functions in total (11 in the builder-projection file, 1 in the producer-contract file which bundles several related assertions), exceeding the 7 tests requested previously.
New tests individually cover missing required keys, missing source_hint, invalid affects enum value, unknown extra key, missing claims field, non-dict policy object, and whitespace trimming. Re-ran independently: 20 passed with a web_research plus critical-external-claim filter.

Allowed Paths: git diff shows exactly 3 changed files (the modified builder script and 2 new files under the tests directory). The producer script and both schema files are unchanged, matching the linked issue In Scope, Out of Scope, and Stop Conditions.

All six acceptance criteria verification commands were re-run independently and pass.

CI checks are all green and head sha matches.

No blockers remain.
One hygiene gap: the body lacks the standard heading with per-criterion checkboxes and evidence, using separate sections instead that still map each test to its criterion number.
This is not treated as a blocker since coverage is substantively present, but is flagged as the mechanical hygiene action above, keeping merge readiness false until applied. Draft state itself is not a blocker.

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "4e38d3ac7ad81fc976add743675780008273b633"
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
producer_role: review_subagent
worker_report_used_as_canonical: false
changed_files:
- .claude/skills/issue-refinement-loop/scripts/build_loop_state.py
- .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_builder_projection.py
- .claude/skills/issue-refinement-loop/tests/test_critical_external_claims_producer_contract.py
allowed_paths:
- .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
- .claude/skills/issue-refinement-loop/scripts/build_loop_state.py
- .claude/skills/issue-refinement-loop/schemas/loop_state.schema.json
- .claude/skills/issue-refinement-loop/tests/**
violations: []
note: manual path check confirms all 3 files within Allowed Paths scope, unchanged from iteration 1.

Findings iteration 1 follow-up

The hygiene action from the previous review has been applied. Re-fetched the body directly: it now contains the standard heading with per-criterion checkboxes for AC1 through AC6, all checked, each with a short evidence note tying it to the corresponding test.
Head sha is unchanged from the prior review, so only the body edit was re-checked, not the code.

CI note: the automated summary tool reported one failed check due to a same-name duplicate check run collision (a skipped run of the same check name, produced by the review-comment webhook, alongside a later successful rerun of that check after the body edit).
The freshest run of that check name at this head sha (started after the body edit, completed 2026-07-02T11:58:22Z) is a success. Overall mergeable status and merge state are still MERGEABLE and CLEAN, which reflect the current, real check state rather than the stale skipped duplicate.

No blockers remain and no further mechanical fixes are needed. Draft state is not a blocker.

@squne121
squne121 marked this pull request as ready for review July 2, 2026 12:21
@squne121
squne121 merged commit b196a07 into main Jul 2, 2026
30 checks passed
@squne121
squne121 deleted the worktree-issue-1277-critical-external-claims-type branch July 2, 2026 12:22
@squne121

squne121 commented Jul 2, 2026

Copy link
Copy Markdown
Owner Author

post-merge-cleanup: 完了 (2026-07-02T14:35Z)

実行内容:

  • worker レポート(POST_MERGE_CLEANUP_REPORT_V1, status: partial)を確認し、main thread が残アクションを実行した。
  • local main を origin/main(b196a072、本 PR の merge commit)へ fast-forward 同期した。
  • 本 PR の worktree / branch は既に削除済み(人間による手動 cleanup 済み)で追加削除対象なし。
  • Issue 実装: issue-refinement-loop の critical_external_claims 型不一致を解消する #1277 は standalone(parent なし)のため parent close 不要。superseded PR なし。follow-up 候補なし。

人間向け残メモ(本 PR とは無関係の一般メンテナンス):

  • リモート削除済み(gone: true)のローカル branch が 15 件残存(例: pr-1215-fix, worktree-issue-1061-python-test-pnpm)。一括整理は任意。
  • ローカル stash が 28 件残存(最新 2026-06-30)。stale なら整理を推奨。
FOLLOW_UP_MATERIALIZATION_RESULT_V1:
  schema_version: 1
  materialized_by: post-merge-cleanup
  follow_up_issues: []
  note_only_observations:
    - dedupe_key: "note:squne121/loop-protocol:local-git-maintenance:gone-branches"
      source_url: "https://github.com/squne121/loop-protocol/pull/1278"
      source_note_id: "1"
      summary: "gone:true のローカル branch 15 件と stash 28 件はリポジトリ一般メンテナンス対象(本 PR の cleanup 責務外)。"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: issue-refinement-loop の critical_external_claims 型不一致を解消する

1 participant