Skip to content

実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "#1810 が利用できる REVIEWER_CHECKER_TAXONOMY_V1 の最小 SSOT foundation を実装する"
change_kind: code
dependencies: ["#1810 consumes this foundation; #1555 is downstream"]

Parent Issue

none(単独改善)

Parent Goal Ref

anchor comment #5115886604 の REQUEST_CHANGES を反映し、#1810 の prerequisite foundation を提供する。

Current Validated Scope

  • taxonomy table/resolver、対象 entry、E2E/negative tests は以下の In Scope と Allowed Paths に限定する。
  • 実装・PR・worktree は本 refinement 実行では開始しない。

Remaining Parent Gaps

なし(#1810 が downstream integration を所有する)。

Outcome

親 Issue はありません。anchor(https://github.com/squne121/loop-protocol/issues/1549#issuecomment-5115886604)の REQUEST_CHANGES を反映し、#1549 を #1810 が安全に利用できる最小 taxonomy SSOT foundation に改訂する。実装後、既存ファイルに存在しない pytest node id を非正規 VC として実 producer から再現し、parent replay が deterministic_fail_confirmed として裏付ける。

In Scope

  • REVIEWER_CHECKER_TAXONOMY_V1 の table-driven SSOT foundation と、existing_file_missing_node_id_noncanonical の entry。
  • entry から一意に解決する entry_id、accepted reviewer codes、readiness rule_id、readiness category、期待 source_check、deterministic_domain_key、producer-shape validation policy、rule/category resolver。
  • strict entry は rule・category・source・producer shape を AND で照合する generic resolver とし、同じ対応を保持する第二の map/set/match/category-if を追加しない。fuzzy/自然言語 matching は禁止する。
  • 現行 domain_keys consumer との後方互換性を保つ。ただし entry_id(canonical taxonomy identity)と deterministic_domain_key(source-qualified collision key)は別フィールドとして扱い、既存 consumer を破壊しない。
  • target entry の production E2E、negative/fail-closed matrix、taxonomy dump、collision invariant、既存 entry 回帰。temporary reproduction はテスト内部で existing pytest file と missing node id を作る。

Out of Scope

Acceptance Criteria

  • AC1 (taxonomy SSOT): entry_id=existing_file_missing_node_id_noncanonical が reviewer codes、VCP_EXISTING_FILE_MISSIN、category、baseline_vc_preflight、deterministic_domain_key、producer-shape policy を一意に持ち、domain-key collision と第二の mapping がない。
  • AC2 (canonical normalization): category、rule id、許可した大小文字 variant のみが同一 entry に正規化され、自然言語文・substring・token/semantic matching は unknown のままになる。
  • AC3 (real classifier): test 内の temporary existing pytest file に missing node id を指定し、実 baseline_vc_preflight.py が existing_file_missing_node_id_noncanonical、VCP_EXISTING_FILE_MISSIN、実際の classification/decision/scope_class を生成する。新規 test file 不在による exit 4 だけを証明に使わない。
  • AC4 (readiness producer): 実 preflight artifact を contract_readiness_check.py に渡し、body SHA、source payload、rule、category、source check を保持した readiness error を生成する。
  • AC5 (full CLI chain): baseline preflight → contract readiness → check_issue_contract --mode merge_readiness → compact claim → V2 envelope/parent replay binding → reviewer_claim_replay.analyze → V2 validation を subprocess で通し、reviewer_blocker_code=VCP_EXISTING_FILE_MISSIN、deterministic_backed=true、verdict_detail_v1=deterministic_fail_confirmed、routing=proceed_to_rewrite、should_consume_iteration=true、checker_gap=false を満たす。
  • AC6 (strict negatives): schema/type、source payload/check、rule、category、rule-category conflict、classification、decision、scope_class、missing/stale SHA、unknown/ambiguous、malformed producer、preflight/readiness 不一致を個別に reject し、AND semantics を確認する。
  • AC7 (fail closed): AC6 の拒否は具体的 reason と fix_checker_artifact または明示 human lane に固定し、should_consume_iteration=false、downgrade_to_non_blocking 禁止、consecutive_unbacked_count 不変を証明する。
  • AC8 (NL regression): 実装: build_request.py を provider-aware にし、Gemini/AGY/auto の request contract を正しく生成・検証する #1692 の自然言語 reviewer code は canonical chain から生成されず、直接 analyze に渡しても既知 entry として誤認しない。
  • AC9 (multiple/observability): mapped/unknown/inconsistent blocker 混在の優先 routing、state counter/evidence binding、taxonomy dump、collision invariant、既存 taxonomy/replay 回帰が PASS する。
  • AC10 (ownership): 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549→実装: fix(replay-taxonomy): readiness rule_id/category を deterministic_domain_key taxonomy に正規化する #1810→実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555 の依存順、SSOT migration、domain_keys compatibility、entry_id と deterministic_domain_key の区別、重複 mapping/resolver 禁止を明記し、Allowed Paths 外へ scope を拡張しない。

Verification Commands

# AC1
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_ssot_entry -q
# AC2
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_canonical_normalization -q
# AC3
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_real_baseline_classifier_existing_file_missing_node_id -q
# AC4
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_producer_preserves_source_and_sha -q
# AC5
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_full_cli_chain_parent_replay -q
# AC6
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_strict_negative_matrix_fail_closed -q
# AC7
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_fail_closed_state_contract -q
# AC8
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_natural_language_never_normalizes -q
# AC9
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_multiple_blockers_and_taxonomy_dump -q
# AC10
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_downstream_ownership_contract -q

Node ID binding (AC1–AC10) is respectively
test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_ssot_entry,
::test_canonical_normalization, ::test_real_baseline_classifier_existing_file_missing_node_id,
::test_readiness_producer_preserves_source_and_sha, ::test_full_cli_chain_parent_replay,
::test_strict_negative_matrix_fail_closed, ::test_fail_closed_state_contract,
::test_natural_language_never_normalizes, ::test_multiple_blockers_and_taxonomy_dump,
and ::test_downstream_ownership_contract.

回帰として test 内から taxonomy parity、既存 replay、broad-search strict matcher、merge-readiness、V2 chain を実行する。uv run --locked を canonical command とし、既に同期済みの環境でのみ --no-sync --offline を追加してよい。

Runtime Verification Applicability

decision: not_applicable
reason: >
  外部サービスまたは本番 runtime への接続は不要。ただし local subprocess、
  temporary filesystem、baseline-preflight、readiness merge、parent-replay
  production CLI chain は実行する。

Allowed Paths

  • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py

VC node-id selectors are bounded subpaths of the same new test file (not new source files or directories):

  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_ssot_entry
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_canonical_normalization
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_real_baseline_classifier_existing_file_missing_node_id
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_producer_preserves_source_and_sha
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_full_cli_chain_parent_replay
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_strict_negative_matrix_fail_closed
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_fail_closed_state_contract
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_natural_language_never_normalizes
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_multiple_blockers_and_taxonomy_dump
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_downstream_ownership_contract

上記以外は Required Design References / test dependencies として読むだけで、path追加はしない。Allowed Paths 外の実装が必要なら停止し、scope expansion を要求する。

Required Skills

  • edit-issue(本文 mutation は edit_issue_txn.py のみ)
  • issue-contract-review(static readiness)

Required Design References

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py(category producer)
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py(readiness producer)
  • .claude/skills/issue-refinement-loop/SKILL.md、reviewer_claim_replay.py、parent_replay_binding.py、V2 envelope/validator(production chain)
  • 1 Issue = 1 PR。implementation/code/worktree は本 refinement 実行では開始しない。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

上記では fail-closed とし、anchor の REQUEST_CHANGES と #1810 境界を弱めず、canonical producer の structured rule ID を parent replay まで損失なく保持する。

Notes for Reviewer

domain_keys は既存 consumer の互換 alias として保持し、新しい deterministic domain key と混同しない。自然言語 reviewer prose は taxonomy alias ではない。

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    triage-required
    on Jul 17, 2026
  2. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Human Escalation Required

    The loop has terminated and requires human review. Cause: human judgment required

    Blockers

    "reviewer_false_positive_suspected: 同一 body (sha256:fdc763e5...) に対し 2 回連続 checker_gap(reviewer_claim_unbacked_by_deterministic_checker)が発生したため Step 2a が human_escalation にルーティングした"
    
    "C9: Runtime Verification Applicability セクションがない(レガシー Issue)— check_issue_contract.py C9_runtime_applicability_present = legacy_missing_applicability"
    
    "RDR001: Required Design References が既存の doc-shape 参照(docs/**|.claude/skills/**/SKILL.md|.claude/skills/**/references/**)を含んでいない(現状は scripts/*.py への参照のみ)"
    
    "VCP_COMMAND_NOT_ALLOWED: Verification Commands の AC1-AC5 が `uv run --locked python3 -m pytest <file>::<test> -q` 形式を使用しており baseline_vc_preflight で command_not_allowed として blocked(`--locked` + `-m` の組み合わせは runtime-smoke 専用パスとして禁止されている)。`uv run --locked pytest <file>::<test> -q` 形式への修正が必要"
    
    "tooling_gap_note: 上記 checker_gap は Issue #1549 自体の欠陥ではなく、compact_review_result.py の REVIEWER_BLOCKER_CLAIM 構築が REVIEW_ISSUE_RESULT_V1.blocking_issues(fix_hint prose 文字列)を reviewer_blocker_code としてそのまま使うため、reviewer_claim_replay taxonomy の normalize_taxonomy_key() と一致せず unknown_blocker_type になることに起因する(follow-up 候補として note_only_observations に記録)"
    
  3. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "follow-up:squne121/loop-protocol:issues/1549:compact_review_result_blocking_issues_code_loss"
          source_url: "https://github.com/squne121/loop-protocol/issues/1549"
          source_note_id: "compact_review_result_blocking_issues_code_loss"
          summary: >-
            compact_review_result.py の needs-fix claim 構築(REVIEWER_BLOCKER_CLAIM)が
            REVIEW_ISSUE_RESULT_V1.blocking_issues(人間向け fix_hint prose 文字列)を
            reviewer_blocker_code としてそのまま使用しており、structured_blockers[].code
            (例: C9 / RDR001 / VCP_COMMAND_NOT_ALLOWED)を優先していない。
            reviewer_claim_replay.py の normalize_taxonomy_key() は短いコード表記を前提と
            するため、prose 文字列はどのタクソノミーにも一致せず unknown_blocker_type /
            checker_gap になり、実際には deterministic checker(C9 / RDR001 /
            VCP_COMMAND_NOT_ALLOWED)に裏付けられている reviewer blocker が
            reviewer_claim_unbacked_by_deterministic_checker → 2 回連続で
            reviewer_false_positive_suspected(human_escalation)に誤ルーティングされる。
            本 Issue #1549 のレビューで実際に再現した(parent_replay_binding.py の
            binding_digest sha256:462936bbba10c5601e165c85ff31f574155cf8318f610796c576f48aa8992900
            で確認)。修正候補: compact_review_result.py の claim_blockers 構築を
            structured_blockers(存在する場合は優先)から reviewer_blocker_code を
            導出するように変更する。Out of Scope(Issue #1549 は reviewer_claim_replay.py
            の taxonomy エントリ追加のみが範囲)。
    
  4. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  5. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-17T11:21:10Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1549
      body_sha256: "sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_has_existing_file_missing_node_id_entry -q","command_hash":"sha256:e23e63a7130a232b0b73aff376efaa3b5b3385c3df3957822983da6b4998b83a","execution_key_hash":"sha256:a6d249d7cf727bc49db1ded85e32858d0210bdb486182b13eabd1556ccda30d0","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_has_existing_file_missing_node_id_entry"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":198,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC2","line":4,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_reviewer_code_variants_normalize_to_existing_file_missing_node_id_noncanonical -q","command_hash":"sha256:d779ac2ed7f3326463ebf9e59510bd65c1610044cf9574d6a780aecba47a7e28","execution_key_hash":"sha256:40b58dffb0257598b37a3f1d6627b672f9790cd5e5903dba9286de0e5a8d8012","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_reviewer_code_variants_normalize_to_existing_file_missing_node_id_noncanonical"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":197,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC3","line":6,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_error_maps_to_deterministic_fail_confirmed -q","command_hash":"sha256:0d997dc9c88968be1a4a35acb64179a539bc0a3f31b8d38b02a2048ec7dfb72e","execution_key_hash":"sha256:f8d5b0367954076f42aeb4952991faa66e3f41ecf60f513259247a42ab7e3c29","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_error_maps_to_deterministic_fail_confirmed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":206,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC4","line":8,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_direct_vc_preflight_result_producer_shape_deterministic_backed -q","command_hash":"sha256:f553f4e4354d6d14e363e5397e33ed39760d74a206343c6137d26b0f1740e5b0","execution_key_hash":"sha256:d75dd5ab15f24e9cb29368bfc8e6af70eb40accbc1e83d8739c67ad3a901b767","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.01s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_direct_vc_preflight_result_producer_shape_deterministic_backed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":224,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC5","line":10,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py -q","command_hash":"sha256:f2231bfa342715123578fb39584ef3be8387b9d301b3b670159d1eaf66e40666","execution_key_hash":"sha256:f3180b915e9e58a122773ac09d37f1180d0b17aa255892a100952fb58958f9c7","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["......................                                                   [100%]","22 passed in 0.45s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":639,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
      source: ensure_contract_snapshot_auto
    
  6. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: https://github.com/squne121/loop-protocol/issues/1549#issuecomment-5002698143
        generated_at: '2026-07-17T11:21:10Z'
        body_sha256: sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: '2026-07-17T11:22:00Z'
    
  7. squne121 commented on Jul 26, 2026

    @squne121
    OwnerAuthor

    追加の実例(Issue #1692 issue-refinement-loop 実行時に再現)

    Issue #1692 の issue-refinement-loop 実行中、2 iteration とも本 Issue が扱う checker_gap が発生した。

    • reviewer_blocker_code(自由文): "7 Verification Commands use non-canonical VC shape: new test on existing file. Rewrite to reference not-yet-created test file per #1285." / "AC1-AC8: All Verification Commands reference new test functions on existing files (non-canonical VC shape per Issue #1285). Rewrite to reference not-yet-created test files instead."
    • vc_baseline_shape_compiler.py --body-file <body> は該当 8 行すべてを not_autofixable として検出済み(pytest_no_safe_missing_file_candidate / pytest_complex_node_id_on_existing_file / pytest_unsupported_cli_syntax)。
    • parent_replay_binding.py は毎回 verdict: reviewer_claim_unbacked_by_deterministic_checker / verdict_detail_v1: checker_gap / normalized_kind: unknown_blocker_type を返し、routing: downgrade_to_non_blocking となった。

    本 Issue(#1549)の実装により、この種の reviewer 指摘が deterministic_fail_confirmed として裏付けられるようになることを確認したい。

  8. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    敵対的レビュー結果

    判定: REQUEST_CHANGES — 問題は実在するが、現在のIssue契約では実装開始不可です。

    #1549が狙う「既存ファイル上の未実装pytest node-idを非正規VCとして検出し、checker_gap ではなく deterministic_fail_confirmed にする」という方向自体は正しいです。現行コードには既に当該categoryのproducerとreadiness変換が存在します。

    しかし、現在のACはtaxonomy entryの追加と人工的なfixtureによるhappy pathしか固定していません。そのため、全ACがPASSしても、Issueコメントで報告された実運用上のchecker_gapが残る実装が成立します。また、後続Issue #1810が#1549に要求している「taxonomy SSOT基盤」と、#1549の現在の限定スコープが矛盾しています。

    Blocker 1 — #1810が前提とするtaxonomy SSOTを#1549は提供しない

    後続の#1810は依存順を明示的に#1549 → #1810 → #1555とし、#1549がtaxonomy SSOT契約を提供する前提です。さらに、各entryに次のメタデータを持たせ、第二のmappingやcategory別hardcodeを禁止しています。

    • domain
    • deterministic_domain_key
    • source_check
    • rule_id
    • category
    • producer_shape
    • reason_class
    • autofixable

    一方、現在の#1549は、既存の8キー構造に1 entryを追加するだけであり、キー集合やschemaの変更が必要なら停止する契約です。つまり、#1549が現状のまま完了しても、#1810のprerequisiteは満たされません。

    必須修正

    次のどちらかを明示的に選ぶ必要があります。

    推奨案: #1549をtaxonomy SSOT基盤Issueへ昇格する

    • genericなsource-qualified resolverを導入する
    • producer metadataとstrict matching policyをtaxonomy entryに統合する
    • existing_file_missing_node_id_noncanonicalを最初の適用entryとする
    • #1810はRDR001やcommand_not_allowedなどの追加entryに限定する

    代替案: #1549を暫定hotfixに固定する

    • 現行8キーschemaのまま実装する
    • #1810本文から「#1549がtaxonomy SSOT契約を提供する」という前提を削除する
    • #1810がschema拡張とgeneric resolverを全面的に所有する
    • #1549の実装が#1810で即時移行されることを明記する

    現在のまま両Issueを進めると、同じtaxonomyとstrict matcherを二段階で作り直すことになります。

    Blocker 2 — Issue自身が示した実障害をACが再現していない

    #1549の最新コメントでは、Issue #1692で実際に渡されたreviewer_blocker_codeはcanonical codeではなく、次のような自然言語文だったと記録されています。

    • 「7個のVerification Commandが非正規形状」
    • 「AC1–AC8が既存ファイル上の新規test functionを参照している」

    その結果、normalized_kind: unknown_blocker_type、verdict_detail_v1: checker_gap、routing: downgrade_to_non_blockingになっています。

    ところが現行のtaxonomy normalizationは、lowercase化と空白圧縮をした後の完全一致lookupです。部分一致、token抽出、semantic matchingは一切ありません。したがって、existing_file_missing_node_id_noncanonicalやVCP_EXISTING_FILE_MISSINをaliasesへ追加しても、上記の自然言語文には一致しません。

    現在のmainにはPR #1801により、readiness errorを決定論的にstructured_blockerへ変換するproduction CLI経路が追加されています。その変換ではstructured_blocker.code = rule_idとなるため、正しくこの経路を通ればVCP_EXISTING_FILE_MISSINをtaxonomyで解決できます。

    問題は、#1549のACがこのproduction経路を通しておらず、「自然言語blockerがもう生成されない」ことも、「canonical rule IDがparent replayまで保全される」ことも証明していない点です。

    必須修正

    次の実CLI chainをACに追加してください。

    baseline_vc_preflight
    → contract_readiness_check
    → check_issue_contract --mode merge_readiness
    → compact_review_result
    → REVIEWER_BLOCKER_CLAIM_V1
    → parent_replay_binding
    → reviewer_claim_replay.analyze
    → V2 envelope validation / state write
    

    期待値は最低限、次を固定すべきです。

    reviewer_blocker_code: VCP_EXISTING_FILE_MISSIN
    normalized_kind: existing_file_missing_node_id_noncanonical
    deterministic_backed: true
    verdict_detail_v1: deterministic_fail_confirmed
    routing: proceed_to_rewrite
    should_consume_iteration: true
    checker_gap: false
    

    自然言語をfuzzy matchingする実装は避けるべきです。trust-criticalなroutingにLLM proseやsubstring matchingを持ち込むと、無関係な指摘まで誤ってdeterministic blockerとして採用する危険があります。producer側でcanonical codeを必須化するのが正解です。

    Blocker 3 — strict producer-shape検証がACで保証されていない

    現在のreviewer_claim_replay.pyは、通常のreadiness照合ではrule_idまたはcategoryのどちらか一方が一致すればevidence候補にします。strictなAND照合とproducer-shape検証は、broad_search_path_unboundedだけにhardcodeされています。

    direct vc_preflight_resultについても同様で、top-level schemaと完全なitem shapeを厳密に見る対象は現在broad_search_path_unboundedだけです。さらにitem検証自体がif kind == "broad_search_path_unbounded"という個別分岐になっています。

    #1549は「既存パターンとの整合を実装者が判断する」としていますが、これでは次の実装でもACを通ります。

    • rule IDだけ一致すれば採用
    • categoryだけ一致すれば採用
    • wrong source_checkを採用
    • source_payload欠落でも採用
    • wrong top-level schemaを採用
    • classificationやscope_classが不正でも採用

    特にrule IDはcategoryを20文字で切り詰めて生成されるため、rule ID単独での照合は衝突に弱い設計です。実際のreadiness producerはrule、category、source、producer payloadを保持しています。

    必須のnegative AC

    少なくとも以下を明文化してください。

    1. rule_idのみ一致、category不一致はreject
    2. categoryのみ一致、rule_id不一致はreject
    3. wrong source_checkはreject
    4. source_payload欠落はreject
    5. wrong classificationはreject
    6. wrong decisionはreject
    7. wrong scope_classはreject
    8. direct artifactのschema欠落・改ざんはinput_or_runtime_error
    9. staleまたはmissing body SHAはfail-closed
    10. reject時にdowngrade_to_non_blockingへ流さず、fix_checker_artifactまたは明示したhuman laneへ送る

    既存の#1406は、まさにこのnegative matrixとrule/category AND semanticsをAC8・AC9で要求していました。#1549だけ検証水準を下げる根拠はありません。

    High 1 — 「table entryだけで拡張可能」という設計説明と実装が乖離している

    ファイル先頭では「新しいreviewer blockerへの対応はtable entryの追加だけで済む」と説明されています。

    実際にはstrict evidenceを追加するたび、現在は以下を変更する必要があります。

    • _STRICT_READINESS_SOURCE_PAYLOAD_KINDS
    • _has_valid_broad_search_source_payload()
    • _STRICT_VC_PREFLIGHT_PRODUCER_SHAPE_KINDS
    • _matching_vc_preflight()内のcategory固有分岐

    つまり、#1549を既存#1406のコピーとして実装すると、taxonomy tableとhardcode分岐の二重SSOTが増えます。これは#1810が明示的に禁止している設計です。

    推奨実装

    現行schemaを維持する暫定実装でも、少なくとも次のようにgeneric化すべきです。

    def _has_valid_blocked_preflight_source_payload(
        kind: str,
        payload: dict[str, Any],
    ) -> bool:
        entry = TAXONOMY_BY_ENTRY_ID[kind]
        expected_categories = set(entry["readiness_categories"])
    
        return (
            payload.get("classification") == "blocked"
            and payload.get("category") in expected_categories
            and payload.get("decision") == "blocked"
            and payload.get("scope_class") == "baseline_fail_expected"
        )
    

    _matching_vc_preflight()でもkind == "broad_search_path_unbounded"という個別比較を削除し、strict setに含まれる全entryへ同じ検証を適用します。

    ただし最終形は、#1810が要求するproducer_shape等をtaxonomy entry自身に持たせる設計です。

    High 2 — baseline producerそのものを実行するテストが必要

    現行のbaseline classifierは、pytest exit 4に加えて、stderr中の特定文言とnode-idのfile partが実在することを組み合わせてexisting_file_missing_node_id_noncanonicalを生成します。

    pytestの公式契約では、path::function形式のnode ID指定は公開されていますが、exit 4は一般的な「command line usage error」としか規定されていません。特定のstderr文言は公開APIとして保証されていません。(pytest) (pytest)

    したがって、手書きの次のpayloadだけをanalyze()へ渡すテストでは不十分です。

    {
      "classification": "blocked",
      "category": "existing_file_missing_node_id_noncanonical"
    }
    

    temp directory内に実在するtest fileと未実装node IDを作り、実際のbaseline_vc_preflight.pyをsubprocessで実行してcategoryが生成されることを固定すべきです。これによりpytestのバージョン更新でstderr形式が変化した場合も検出できます。

    隣接不具合

    _MISSING_NODE_ID_ERROR_REはcase-insensitiveですが、併用する_NO_MATCH_IN_MODULE_REにはre.IGNORECASEがありません。一方、docstringは両メッセージをcase-insensitiveに扱うと説明しています。#1549の直接スコープ外でも、別Issue候補として記録すべきです。

    Medium — Runtime Verificationとuv --lockedの説明が不正確

    Issueは「静的pytestのみで、プロセス起動・I/O・外部通信を伴わない」としていますが、高品質な完了証明には少なくとも次が必要です。

    • pytest subprocess
    • temp file作成
    • baseline preflight subprocess
    • production CLI chain

    また、uv run --lockedはlockfile更新を禁止するだけで、環境同期自体は無効にしません。uv runは通常、実行前にlockとenvironmentを確認・同期します。同期を禁止するのは--no-sync、ネットワークを禁止するのは--offlineです。([Astral Docs]3)

    したがって、Runtime Verification Applicabilityの理由は次のように修正するのが妥当です。

    decision: not_applicable
    reason: >
      外部サービスや本番runtimeへの接続は不要。
      ただしlocal subprocess、temporary filesystem、
      baseline-preflightおよびparent-replay production CLI chainは実行する。
    

    repository policyが許すなら、hermetic gateは事前sync後に--no-sync --offlineで固定します。

    評価できる点

    以下は既に成立しています。

    • baseline classifierは当該pytest形状を専用categoryへ分類する。
    • readiness側では同categoryをbody-author-fixableなneeds_fixとして扱う。
    • PR #1581により、structured_blockers[].codeがcompact claimで優先されるようになった。
    • PR #1801により、readiness artifactからstructured blockerを作る決定論的production CLIが追加され、source_payloadも保持されるようになった。

    つまり、必要なのは新しいheuristicではなく、既存のcanonical producerとparent replayを正しく接続し、source-qualifiedに検証することです。

    推奨する改訂Acceptance Criteria

    AC1:
    taxonomy SSOTが existing_file_missing_node_id_noncanonical の
    entry_id、reviewer code、rule ID、category、source、domain key、
    producer-shape policyを一意に定義し、同じ対応を持つ第二のdictや
    category固有match分岐を追加しない。
    
    AC2:
    実 baseline_vc_preflight subprocessが、実在test file上の未実装node IDを
    classification=blocked,
    category=existing_file_missing_node_id_noncanonical,
    decision=blocked,
    scope_class=baseline_fail_expected
    として生成する。
    
    AC3:
    baseline_vc_preflight → contract_readiness_check →
    check_issue_contract --mode merge_readiness →
    compact_review_result の実CLI chainで、
    REVIEWER_BLOCKER_CLAIM_V1.blockers[0].reviewer_blocker_code が
    VCP_EXISTING_FILE_MISSINとなる。
    
    AC4:
    AC3のclaimとparent-owned readiness/preflight artifactを
    parent_replay_bindingへ渡した結果、
    normalized_kind=existing_file_missing_node_id_noncanonical,
    deterministic_backed=true,
    verdict_detail_v1=deterministic_fail_confirmed,
    routing=proceed_to_rewrite,
    checker_gap=falseとなる。
    
    AC5:
    readiness evidenceはsource_check、rule_id、category、
    producer shapeのAND一致でのみ採用する。
    片側一致、wrong source、wrong payloadはrejectする。
    
    AC6:
    direct vc_preflight evidenceは正しいtop-level schemaと
    classification/category/decision/scope_classの完全一致を要求する。
    
    AC7:
    missing/stale body SHA、wrong schema、ambiguous/conflicting evidenceは
    fail-closedでfix_checker_artifactまたは明示したhuman laneへ送り、
    downgrade_to_non_blockingを禁止し、
    consecutive_unbacked_countを変更しない。
    
    AC8:
    Issue #1692で記録された自然言語reviewer codeがcanonical production
    chainから生成されないことをE2Eで確認する。
    自然言語へのfuzzy taxonomy matchingは実装しない。
    
    AC9:
    taxonomy dump、collision invariant、既存全entryの回帰、
    複数blocker混在時のroutingがPASSする。
    
    AC10:
    #1810との責務境界を明文化し、
    #1549がtaxonomy SSOT foundationを提供するのか、
    #1810がschema拡張を所有するのかを一意に決定する。
    

    最終判断

    review_verdict: REQUEST_CHANGES
    implementation_start: blocked
    root_problem_valid: true
    current_contract_sufficient: false
    primary_failures:
      - downstream_ssot_dependency_mismatch
      - production_reproduction_not_covered
      - strict_evidence_negative_contract_missing
      - category_specific_hardcoding
      - no_real_parent_replay_e2e
    recommended_route: rewrite_issue_contract
    preferred_scope:
      - taxonomy_ssot_foundation
      - existing_file_missing_node_id_entry
      - source_qualified_strict_resolution
      - production_cli_e2e
    

    現状の#1549をそのまま実装すると、taxonomy parity testsは通っても、production wiring・freeform fallback・spoof耐性・#1810依存契約のいずれかが未解決のまま残る可能性が高いです。Issue本文を改訂し、contract reviewを再実行してから実装へ進めるべきです。

  9. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-29T09:45:21Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1549
      body_sha256: "sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_has_existing_file_missing_node_id_entry -q","command_hash":"sha256:e23e63a7130a232b0b73aff376efaa3b5b3385c3df3957822983da6b4998b83a","execution_key_hash":"sha256:a6d249d7cf727bc49db1ded85e32858d0210bdb486182b13eabd1556ccda30d0","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_has_existing_file_missing_node_id_entry"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":179,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC2","line":4,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_reviewer_code_variants_normalize_to_existing_file_missing_node_id_noncanonical -q","command_hash":"sha256:d779ac2ed7f3326463ebf9e59510bd65c1610044cf9574d6a780aecba47a7e28","execution_key_hash":"sha256:40b58dffb0257598b37a3f1d6627b672f9790cd5e5903dba9286de0e5a8d8012","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_reviewer_code_variants_normalize_to_existing_file_missing_node_id_noncanonical"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":178,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC3","line":6,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_error_maps_to_deterministic_fail_confirmed -q","command_hash":"sha256:0d997dc9c88968be1a4a35acb64179a539bc0a3f31b8d38b02a2048ec7dfb72e","execution_key_hash":"sha256:f8d5b0367954076f42aeb4952991faa66e3f41ecf60f513259247a42ab7e3c29","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_error_maps_to_deterministic_fail_confirmed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":170,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC4","line":8,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_direct_vc_preflight_result_producer_shape_deterministic_backed -q","command_hash":"sha256:f553f4e4354d6d14e363e5397e33ed39760d74a206343c6137d26b0f1740e5b0","execution_key_hash":"sha256:d75dd5ab15f24e9cb29368bfc8e6af70eb40accbc1e83d8739c67ad3a901b767","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_direct_vc_preflight_result_producer_shape_deterministic_backed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":163,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC5","line":10,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py -q","command_hash":"sha256:f2231bfa342715123578fb39584ef3be8387b9d301b3b670159d1eaf66e40666","execution_key_hash":"sha256:f3180b915e9e58a122773ac09d37f1180d0b17aa255892a100952fb58958f9c7","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["......................                                                   [100%]","22 passed in 0.40s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":573,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
        declared_path_overlap: {"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"63fb1a92257e712b02a78241351637087f66ee26","draft_policy":"include_drafts","prs":[{"number":1528,"title":"feat(cleanup): 同一実行内の branch-only fallback を追加","base_ref_name":"main","head_ref_name":"worktree-issue-1403-post-merge-cleanup-dedicated-branch-forc","head_ref_oid":"b29007580ae225eb9676c7f32c878ee2bb9ccaa9","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1528","changed_files_count_graphql":4},{"number":1817,"title":"test: CLOSED predecessor の候補外 readback を固定 (#1766)","base_ref_name":"main","head_ref_name":"worktree-issue-1766-closed-native-predecessor-regression-v2","head_ref_oid":"5e39ca27825d76873b285de39a195a8d8f2311fd","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1817","changed_files_count_graphql":1},{"number":1819,"title":"実装:#1797_C2a-successor-structural-collisionのhuman-review-route修正","base_ref_name":"main","head_ref_name":"worktree-issue-1797-c2a-successor-collision","head_ref_oid":"02856e9c7f5ee0c9d07dcafbc67106bc1c063bc6","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1819","changed_files_count_graphql":5},{"number":1832,"title":"fix(refinement): 全終端理由で follow-up materialization 結果を出力 (#1321)","base_ref_name":"main","head_ref_name":"worktree-issue-1321-follow-up-materialization-all-reasons","head_ref_oid":"31ac20913386ef2b0a91057fbf1de491a9286af2","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1832","changed_files_count_graphql":2},{"number":1843,"title":"fix: producer receipt に command_manifest_sha256 を独立再計算で伝播する","base_ref_name":"main","head_ref_name":"worktree-issue-1711-producer-receipt-command-manifest-sha256","head_ref_oid":"db855a1432154c442302e4a4bccb0004a43ca403","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1843","changed_files_count_graphql":3}],"fetched_count":5,"totalCount":5,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:d630f5909c41ad33d1d90e6f39a16f74b6b532c48cf050b0bcb30dbd4eec281b","errors":[]},"inventory_digest_extended":"sha256:b06a8ef96b6b608edbd3636d932f64a297e94598efd120c52d91014732bd3f22","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1549,"contract_source_kind":"issue_comment","contract_source_id":"5115992308","contract_body_sha256":"sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c","allowed_paths_normalized_sha256":"6ad9f48976553d6da43ad54498123c17df44c5e5a1b2a0e854f60d6e337b06cd","base_ref":"main","base_sha_at_snapshot":"63fb1a92257e712b02a78241351637087f66ee26"}
    
  10. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: https://github.com/squne121/loop-protocol/issues/1549#issuecomment-5115992308
        generated_at: '2026-07-29T09:45:21Z'
        body_sha256: sha256:1b5d13710d7400d3ef911fcceae22cb11e09367dc0e77a113f027f3cd574674c
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: '2026-07-29T09:46:06Z'
    
  11. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    判定

    本文修正は必要です。
    現状の #1549 を本文無変更のまま impl_ready とした判断は、アンカーコメント、後続 Issue #1810、現行実装、リポジトリの refinement 規約のいずれとも整合していません。

    少なくとも次の処理が必要です。

    1. 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549 の契約本文を改訂する。
    2. 実装: fix(replay-taxonomy): readiness rule_id/category を deterministic_domain_key taxonomy に正規化する #1810 との taxonomy SSOT の責務境界を明記する。
    3. 先に投稿された impl_ready handoff を supersede する。
    4. 改訂本文に対して refinement preflight、review、contract review、scope/readback を順番どおり再実行する。
    5. それまでは実装を開始しない。

    敵対的レビュー結果

    P0 — OWNERの修正指示を処理せず、read-only reviewerのapproveで上書きしている

    作業ログは当初「承認不要の本文改善・検証・readbackまで進める」と宣言していますが、実際には issue-author による本文更新を行わず、reviewerの approve 出力を中間バリデータへ通しています。

    これは責務境界に反します。

    • OWNERのfreeformレビュー指示は、scope authorityとして正規化し、明示的な契約更新要求なら contract_update_required に送る規約です。
    • anchorの最終分類、stale approval無効化、Step 4へのfeedback forwardingはorchestratorの責務であり、issue-reviewer の責務ではありません。
    • 本文修正は issue-author → edit_issue_txn.py の経路で実行する契約です。

    したがって、構造checkerが approve を返したことは、アンカーの意味的な REQUEST_CHANGES を無効化する根拠になりません。

    P0 — impl_ready を投稿した後にplannerを実行している

    ログでは次の順序になっています。

    1. contract snapshotを投稿
    2. LOOP_HANDOFF_RESULT_V1: impl_ready を投稿
    3. その後で plan_refinement_loop.py を実行
    4. plannerがscope-rollup証跡不足により deferred と判定
    5. 「先に投稿したhandoffは実装開始許可として扱わない」と自己訂正
    6. plannerを再実行せず、既存handoffを確認しただけで最終的に「selected」と結論

    scope-rollup結果を追加しようとした jq コマンドも、ログ上はファイルへの書き戻しや、その入力を使ったplanner再実行が確認できません。

    リポジトリ規約上、ISSUE_EXECUTION_DECISION_V1 のsemantic stateをdownstream consumerが独自に再分類することは禁止されています。deferred なら、完全な入力を再収集してplannerを再実行しなければなりません。

    現在の impl_ready コメントは、少なくともstale handoffとして扱うべきです。

    P1 — #1549と#1810の責務契約が矛盾している

    現行 #1549 は、概ね次の限定契約です。

    • taxonomy entryを1件追加
    • aliasを追加
    • readiness/direct preflightのhappy pathを確認
    • taxonomy parity testを通す

    一方、#1810は明示的に #1549 → #1810 → #1555 とし、#1549がtaxonomy SSOT契約を提供することを前提にしています。

    しかし現行mainでは、taxonomyのstrict policyはSSOT化されていません。

    • taxonomyは現在6エントリで、対象entryは未登録です。
    • readinessの通常照合はrule IDまたはcategoryのORです。
    • AND照合とproducer-shape検証は broad_search_path_unbounded 専用の集合・分岐としてハードコードされています。
    • direct preflight側のstrict検証も同entryだけの個別分岐です。

    現在の #1549 本文にある「broad_search_path_unbounded を参考に必要なstrict-shape検証を追加する」という記述では、同様のcategory固有ハードコードをもう一つ増やす実装でもACを満たします。

    必要なのは、strict matching policyをtaxonomy entry側から解決するtable-driven設計です。

    P1 — 実障害を通るproduction chainがACにない

    現在のproduction review経路は、次の3コマンドでreadiness結果をreview結果へ決定論的に合成します。

    check_issue_contract
    → contract_readiness_check --mode execute
    → check_issue_contract --mode merge_readiness
    

    生のreadiness errorを直接コピーせず、code、deterministic_domain_key、checker_evidence を持つstructured blockerへ変換するのが正規経路です。

    PR #1801でも、最初は変換関数が存在するだけでproduction wiringされておらず、OWNERレビュー後に --mode merge_readiness が追加されています。

    #1549にも、最低限次の実CLI chainが必要です。

    baseline_vc_preflight
    → contract_readiness_check
    → check_issue_contract --mode merge_readiness
    → compact_review_result
    → intermediate strict validation
    → REVIEWER_BLOCKER_CLAIM_V1
    → parent_replay_binding
    → reviewer_claim_replay.analyze
    → V2 validation
    

    現在のAC3・AC4は analyze() に人工fixtureを直接渡す検証であり、canonical rule IDがproduction chainを通ってparent replayまで保存されることを証明しません。

    さらに、.claude/agents/issue-reviewer.md は「errors構造体をそのままstructured blockersへ転写」と記載している一方、正本の review-issue/SKILL.md は「直接転写は禁止、変換後形状のみ」と規定しています。ここにもstale documentationがあります。

    P1 — contract snapshotのbaseline結果は対象障害を証明していない

    AC1〜AC4は、新規テストファイルが存在しないためpytestがexit code 4を返した結果を expected_baseline_fail としています。

    pytest公式仕様では、exit code 4はCLI usage error、exit code 5はno tests collectedです。また、特定テストのnode IDは file.py::test_func 形式です。 (pytest) (pytest)

    このbaselineは「将来追加するテストファイルがまだない」ことは示しますが、Issueが扱う次の形状は再現していません。

    既存のテストファイル
    +
    そのファイルにまだ存在しないpytest node ID
    

    新規テストファイル内でtemporary fixtureを作り、実際に「existing file + missing node ID」をbaseline classifierへ通す必要があります。

    P2 — Runtime Verification Applicabilityの理由が事実と合わない

    現行本文は「静的pytest unit testのみで、プロセス起動やI/Oは不要」としています。しかし必要な高品質検証には、subprocess、temporary filesystem、baseline preflight、production CLI chainが含まれます。

    また、uv run --locked はlockfileの変更を禁止しますが、environment sync自体を禁止しません。公式uvドキュメントでは、uv run は通常lockとsyncを行い、syncを避けるのは --no-sync、ネットワークを無効化するのは --offline とされています。 ([Astral Docs]3)

    Runtime Verificationは次のように修正すべきです。

    decision: not_applicable
    reason: >
      外部サービスまたは本番runtimeへの接続は不要。
      ただしlocal subprocess、temporary filesystem、
      baseline-preflight、parent-replay production CLI chainを実行する。
    

    推奨する処理

    #1549を「単一entry追加」から、次の範囲へ改訂するのが妥当です。

    • taxonomy SSOTの最小foundation
    • 対象entryの追加
    • source/rule/category/producer-shapeをtaxonomyから解決するgeneric matcher
    • fuzzyな自然言語matchingは禁止
    • canonical producerがrule IDを保存するproduction E2E
    • spoof、stale SHA、wrong source/rule/category、unknown、ambiguous、conflictのnegative matrix
    • failure時は fix_checker_artifact 等へfail-closed
    • downgrade_to_non_blocking 禁止
    • state counter不変
    • #1810が所有する後続の全taxonomy統合との境界明記

    Codex CLIへ渡す実行プロンプト

    以下は本文改訂と再refinement専用です。ソース実装やPR作成には進ませません。

    リポジトリ squne121/loop-protocol の Issue #1549 について、前回の issue-refinement-loop の誤判定を是正し、Issue本文を改訂してfreshなcontract handoffを再生成してください。

    対象:

    • Issue: https://github.com/squne121/loop-protocol/issues/1549
    • authoritative anchor comment: https://github.com/squne121/loop-protocol/issues/1549#issuecomment-5115886604
    • stale contract snapshot comment: issue comment ID 5115992308
    • stale impl-ready handoff comment: issue comment ID 5116008593

    この実行ではソースコードを実装しないでください。Issue本文、関連Issueの責務記述、refinement/contract artifacts、GitHub上の訂正コメントだけを扱ってください。

    実行原則

    • root threadはcontrol-plane専用とする。
    • gpt-5.3-codex-spark が利用可能なら、manual invocationとして spark-deep と spark-skim を優先的に使い、read-onlyな独立レビューを行う。
    • Spark agentを issue-author、issue-reviewer、codebase-investigator の代替にしない。
    • Spark agentおよび他のSubAgentからのnested delegationは禁止する。
    • Issue mutationは必ずcanonicalな issue-author → edit-issue → edit_issue_txn.py 経路で行う。直接の gh issue edit で本文を書き換えない。
    • 既存のcontract snapshot、handoff、ローカルartifactを正しいものと仮定せず、GitHub current stateとmain HEADから再取得する。
    • 破壊的操作、secretへのアクセス、外部課金、権限不足以外では人間承認を求めず、可能な工程を最後まで実行する。
    • trusted human approvalやscope approvalを捏造しない。新しいAllowed Paths layerが本当に必要でcanonical scope reframeが要求される場合だけ停止し、必要なcopy-paste用構造化コメントを最終結果に出す。

    最初に確認する正本

    最低限、以下をmain HEADから読むこと。

    • AGENTS.md
    • CLAUDE.md
    • .claude/settings.json
    • docs/dev/agent-skill-boundaries.md
    • .claude/agents/codebase-investigator.md
    • .claude/agents/issue-reviewer.md
    • .claude/agents/issue-author.md
    • .claude/skills/issue-refinement-loop/SKILL.md
    • .claude/skills/issue-contract-review/SKILL.md
    • .claude/skills/review-issue/SKILL.md
    • .claude/skills/edit-issue/SKILL.md
    • .claude/skills/issue-refinement-loop/references/anchor-comment-handling.md
    • .claude/skills/issue-refinement-loop/references/scope-signal-guard.md
    • .claude/skills/issue-refinement-loop/references/scope-rollup-policy.md
    • .claude/skills/issue-refinement-loop/references/termination-policy.md
    • .claude/skills/issue-refinement-loop/references/refinement-loop-plan-output.md
    • .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py
    • .claude/skills/issue-refinement-loop/scripts/plan_refinement_loop.py
    • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py
    • .claude/skills/issue-refinement-loop/scripts/parent_replay_binding.py
    • .claude/skills/issue-refinement-loop/scripts/compact_review_result.py
    • .claude/skills/issue-refinement-loop/scripts/emit_parent_review_envelope_v2.py
    • .claude/skills/issue-refinement-loop/scripts/validate_review_compact_output.py
    • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay_state_store.py
    • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
    • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
    • .claude/skills/review-issue/scripts/check_issue_contract.py
    • 関連するcommand registry、guard scripts、tests、hooks

    .claude/agents/issue-reviewer.md と .claude/skills/review-issue/SKILL.md のreadiness error→structured blocker記述が一致しているか確認すること。前者がraw errorの直接転写、後者が--mode merge_readinessによる変換を要求している場合はstale documentationとして記録し、#1549に含めるか別follow-upにするかをscope規約に従って決定する。

    GitHub調査

    Issue、PR、コメント、現在の状態、依存関係を取得すること。

    最低限:

    次を決定論的に答えること。

    1. #1549がtaxonomy SSOT foundationを所有するのか。
    2. #1810が所有するのは、そのfoundationを利用した全readiness taxonomy統合なのか。
    3. #1549と#1810に重複するmapping、matcher、producer-shape policyがないか。
    4. #1564のスコープが#1810へ吸収済みか。
    5. #1554およびPR #1801のproduction chainがmainに存在するか。
    6. current mainで対象categoryがどのartifact shapeとして生成されるか。
    7. canonical REVIEWER_BLOCKER_CLAIM_V1.blockers[].reviewer_blocker_code が自然言語ではなくrule IDとしてparent replayまで保存されるか。

    Web調査

    一次資料だけを使って以下を確認すること。

    • pytest公式ドキュメント:

      • node ID形式
      • existing fileに存在しないnode IDを渡した場合のcollection/usage挙動
      • exit code 4と5の意味
    • Astral uv公式ドキュメント:

      • uv run
      • --locked
      • --no-sync
      • --offline
    • 実装で使うJSON SchemaまたはPython標準APIについて外部仕様が必要なら、その公式仕様

    検索結果は、Issue本文へ不要な一般論を追加せず、AC、VC、Runtime Verification、Notes for Reviewerを正確にするためだけに使う。

    前回実行の監査

    前回ログを再監査し、最低限以下を確認すること。

    • contract snapshotおよびimpl_ready handoffがplanner/scope-rollupより先に投稿された。
    • plannerが後からdeferredを返した。
    • 前回実行自身が「先に投稿したhandoffを実装開始許可として扱わない」と記録した。
    • scope-rollup結果を反映したplanner再実行とfresh execution decisionの証跡がない。
    • issue-author による本文更新が行われていない。
    • current Issue bodyがanchor commentのREQUEST_CHANGESを反映していない。

    上記が確認できた場合、既存のcomment ID 5115992308 と 5116008593 はfreshな実装許可としてconsumeしない。

    履歴コメントを削除または内容改変せず、リポジトリ内にcanonicalなsupersession markerがあるか調査する。存在する場合はそれを使う。存在しない場合は、古いhandoffを明示的に無効化する訂正コメントを投稿する。

    訂正コメントには最低限以下を含める。

    status: superseded
    superseded_comment_ids:
      - 5115992308
      - 5116008593
    reason:
      - anchor_feedback_not_materialized
      - planner_executed_after_handoff
      - issue_execution_decision_was_deferred
    next_action: rewrite_issue_contract_and_rerun_refinement
    implementation_allowed: false
    

    既存のcanonical schemaがある場合は、そのschemaを優先する。

    #1549の改訂方針

    「本文変更不要」という前提を破棄する。

    #1549を、単なるcategory固有entry追加ではなく、#1810が安全にconsumeできる最小taxonomy SSOT foundationを提供する契約へ改訂する。ただし#1810の全機能を#1549へ吸収しない。

    #1549が所有する範囲

    • REVIEWER_CHECKER_TAXONOMY_V1 のtable-driven SSOT foundation。

    • existing_file_missing_node_id_noncanonical entry。

    • 少なくとも次の意味情報をentryから一意に解決できること:

      • canonical entry_id
      • accepted reviewer codes
      • readiness rule_id
      • readiness category
      • expected source_check
      • deterministic domain key
      • producer-shape validation policy
      • rule/categoryの照合方式
    • strict entryについて、rule、category、source、producer shapeをANDで検証するgeneric resolver。

    • 同じ対応を保持する第二のdict、set、match、category固有if分岐を追加しないこと。

    • target entryのproduction E2E。

    • target entryのnegative matrix。

    • taxonomy dump、collision invariant、既存entry回帰。

    現在の domain_keys との後方互換性、entry_id と deterministic_domain_key の区別、既存consumerへの影響を調査して本文に明記する。名称やschema shapeを推測だけで固定しない。

    #1810が所有する範囲

    • #1549が提供するtaxonomy SSOT foundationを利用した全readiness error normalization。
    • VCS001、LP001、RVA001、VCP_COMMAND_NOT_ALLOWED、RDR001等への展開。
    • reason class、autofix policy、複数entry間のunknown/ambiguous/conflict routing。
    • broader production integration。
    • #1555へのhandoff。

    #1810本文が#1549に過剰または不足した責務を要求している場合は、#1810本文も同じ実行内で整合するよう修正する。#1549と#1810に同じmapping tableまたはgeneric resolverを二重実装させない。

    fuzzy matchingは禁止

    Issue #1692で観測された自然言語のreviewer blockerを部分一致、token抽出、正規表現、semantic matchingでtaxonomyへ割り当てない。

    代わりにproduction chainがcanonical structured blocker codeを生成し、REVIEWER_BLOCKER_CLAIM_V1からparent replayまで損失なく保持することをE2Eで証明する。

    改訂Acceptance Criteriaの最低要件

    少なくとも次を明示すること。

    AC1 — taxonomy SSOT

    対象entryのcode、rule ID、category、source、domain key、producer-shape policyがtaxonomyから一意に解決され、第二のmappingやcategory固有分岐が存在しない。

    AC2 — canonical normalization

    existing_file_missing_node_id_noncanonical、VCP_EXISTING_FILE_MISSIN、明示的に許可した大小文字variantが同じentryへ正規化される。

    自然言語レビュー文はtaxonomy aliasに追加しない。

    AC3 — real classifier reproduction

    temporary directory内に既存pytestファイルを作り、そのファイルに存在しないnode IDを含むVCを入力として、実 baseline_vc_preflight.py が次を生成すること。

    category: existing_file_missing_node_id_noncanonical
    rule_id: VCP_EXISTING_FILE_MISSIN
    classification/decision/scope_class: actual producer contractどおり
    

    「新規テストファイル自体が存在しない」exit code 4だけを対象障害の証明に使わない。

    AC4 — readiness producer

    実preflight artifactを contract_readiness_check.py に渡し、source payload、body SHA、rule ID、category、source checkを保持したreadiness errorが生成される。

    AC5 — production chain E2E

    実CLI subprocessで次を通す。

    baseline_vc_preflight
    → contract_readiness_check
    → check_issue_contract --mode merge_readiness
    → compact_review_result
    → emit_parent_review_envelope_v2 --validate-intermediate
    → parent_replay_binding
    → reviewer_claim_replay.analyze
    → emit_parent_review_envelope_v2
    → validate_review_compact_output --v2
    

    最終結果が少なくとも次を満たす。

    deterministic_backed: true
    verdict_detail_v1: deterministic_fail_confirmed
    routing: proceed_to_rewrite
    should_consume_iteration: true
    checker_gap: false
    

    AC6 — strict negative matrix

    以下を個別に検証する。

    • missing/wrong top-level schema
    • wrong field type
    • missing source payload
    • wrong source check
    • wrong rule ID
    • wrong category
    • ruleとcategoryが別entryを示すconflict
    • wrong classification
    • wrong decision
    • wrong scope class
    • missing body SHA
    • stale body SHA
    • unknown taxonomy entry
    • ambiguous taxonomy entry
    • malformed producer artifact
    • direct preflight evidenceとreadiness evidenceの不一致

    strict evidence不一致をunbacked reviewer laneへdowngradeしない。

    AC7 — fail-closed state contract

    unknown、ambiguous、conflict、malformed artifactでは、具体的なreason codeとroutingを固定する。

    少なくとも次を保証する。

    routing: fix_checker_artifact または本文で明示したhuman lane
    should_consume_iteration: false
    downgrade_to_non_blocking: prohibited
    consecutive_unbacked_count: unchanged
    

    AC8 — natural-language regression

    Issue #1692で記録された自然言語reviewer codeがcanonical production chainから生成されないことを確認する。

    自然言語文字列を直接 analyze() に渡した場合は既知entryとして誤認しない。

    AC9 — multiple blockers

    mapped、unknown、inconsistentな複数blockerが混在した場合の優先routing、state counter、evidence bindingを固定する。

    AC10 — downstream ownership

    #1810との責務境界、依存順、migration方針を本文に明記する。

    Verification Commands

    Verification Commandsは新規専用テストファイルを対象にする。各ACとnode IDを一対一に対応させる。

    候補:

    .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py
    

    新規テストファイルのpytest command自体はrepositoryのcanonical VC形式に従わせる。

    対象障害の再現は、そのテスト関数内部でtemporary existing fileとmissing node IDを作って実施する。Issue本文自身のVCとして、既存ファイル上の未実装node IDを再び記載しない。

    回帰として少なくとも以下を含める。

    • taxonomy parity
    • existing reviewer claim replay suite
    • broad search path strict matcher suite
    • review-issue merge-readiness suite
    • production V2 command-chain suite

    事前に環境同期が完了している場合、hermeticな再実行ではrepository policyに反しない範囲で uv run --locked --no-sync --offline を使用する。環境が未準備なら、最初のdependency setupとhermetic verificationを分離して記録する。

    Runtime Verification Applicability

    次の趣旨へ修正する。

    decision: not_applicable
    reason: >
      外部サービスまたは本番runtimeへの接続は不要。
      ただしlocal subprocess、temporary filesystem、
      baseline-preflight、readiness merge、
      parent-replay production CLI chainを実行する。
    

    Allowed Paths

    まず現行Allowed Paths内で高品質な実装契約が成立するか調査する。

    production E2Eが他スクリプトを呼び出すだけで、修正を必要としない場合は、それらをRequired Design Referencesおよびtest dependenciesとして記載し、Allowed Pathsへ不要に追加しない。

    generic taxonomy foundationの実装に現行Allowed Paths外のソース変更が本当に必要な場合:

    1. なぜ呼び出しだけでは不足するかをsymbol単位で示す。
    2. scope_delta_authorityとscope-signal-guardを実行する。
    3. canonicalなscope reframeが必要なら停止する。
    4. trusted approvalを代理投稿しない。

    本文更新

    調査結果からcandidate bodyを生成する。

    • anchor commentの要求を弱めない。
    • 現行本文の有効な背景、既存classifier、rule ID導出説明は保持する。
    • Outcome、In Scope、Out of Scope、AC、VC、Allowed Paths、Runtime Verification、Dependencies、Notes for Reviewerを相互整合させる。
    • #1810との責務重複を除去する。
    • 1 Issue = 1 PR を維持する。
    • 本実行ではソースコードを変更しない。

    pre-author static readinessを実行し、READINESS_FORWARDING_PAYLOAD_V1 を生成して issue-author に渡す。

    edit_issue_txn.py のexpected previous SHA / updatedAt preconditionを使用し、競合更新をfail-closedで拒否する。

    mutation後はGitHub APIから本文を再取得し、candidate bodyのSHA、remote body SHA、updatedAt、主要セクションを照合する。

    再refinement

    本文更新後、古いartifactを再利用せず、以下を正しい順番で実行する。

    1. anchor付きrefinement preflight
    2. scope-rollup preflight
    3. planner
    4. phase state build
    5. codebase investigation
    6. 必要なweb research
    7. issue review
    8. intermediate strict validation
    9. reviewer claim replay
    10. 必要ならissue-author rewrite
    11. fresh contract review
    12. fresh execution decision
    13. termination/handoff publish
    14. GitHub readback

    planner、scope-rollup、execution decisionが確定する前にcontract snapshotまたはimpl_ready handoffを投稿しない。

    ISSUE_EXECUTION_DECISION_V1.execution.state が selected でなく、deferred、blocked、invalid、stale、incompleteのいずれかなら、impl_readyを投稿しない。

    scope-rollup結果をplanner inputへ反映した場合は、変更後のplanner input artifact、digest、planner outputを保存し、plannerを実際に再実行したことをreadbackする。jqのstdout表示だけを永続化の証拠にしない。

    最終出力

    最後に次を報告する。

    DECISION:
      body_change_required: true
      source_implementation_started: false
    
    ISSUE_1549:
      previous_body_sha256:
      updated_body_sha256:
      update_status:
      readback_status:
    
    ISSUE_1810:
      changed:
      previous_body_sha256:
      updated_body_sha256:
      responsibility_boundary:
    
    STALE_HANDOFF:
      superseded_comment_ids:
      corrective_comment_url:
      implementation_allowed_before_rerun: false
    
    REFINEMENT:
      anchor_classification:
      scope_delta_authority:
      scope_rollup_status:
      planner_execution_state:
      review_verdict:
      contract_review_status:
      final_handoff_status:
      final_handoff_url:
    
    EVIDENCE:
      artifacts:
      commands:
      web_sources:
      unresolved_items:
    
    WORKTREE:
      tracked_source_changes: false
      status:
    

    Issue本文のreadback、fresh contract review、fresh planner decisionのいずれかが不成立なら、成功やimpl_readyを主張しないでください。

    このプロンプトは、前回の impl_ready をそのまま利用せず、本文改訂 → stale handoff訂正 → fresh refinement を一続きで要求します。

  12. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    #1549 stale handoff 訂正

    anchor の REQUEST_CHANGES を本文へ反映し、fresh refinement をやり直します。以下の旧コメントは実装許可として利用しません。

    status: superseded
    superseded_comment_ids: [5115992308, 5116008593]
    reason: [anchor_feedback_not_materialized, planner_executed_after_handoff, issue_execution_decision_was_deferred]
    next_action: rewrite_issue_contract_and_rerun_refinement
    implementation_allowed: false
    
  13. changed the title [-]実装: reviewer_claim_replay.py の taxonomy に existing-file-missing-node-id 非正規 VC 形状の checker エントリを追加する[/-] [+]実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver[/+] on Jul 29, 2026
  14. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-29T13:48:26Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1549
      body_sha256: "sha256:b74ad0d83deff7c5e6e2ef3215ee3a94ae150d2e5786a2cf5a8260a2849555dc"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:b74ad0d83deff7c5e6e2ef3215ee3a94ae150d2e5786a2cf5a8260a2849555dc","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_ssot_entry -q","command_hash":"sha256:7eebee81d964a5b2e0f264bdefad60113a015738c7a09ca7f65c56f0772d4a6e","execution_key_hash":"sha256:9fcb095829563ee94ffb15dba979ae8a4404b6a09092b45fb336a1a313417a7b","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_taxonomy_ssot_entry"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":187,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC2","line":4,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_canonical_normalization -q","command_hash":"sha256:12e4211b368a69ab3458282f2dc9e9ed1499d6f43738dcae4b02c9e781d60d5f","execution_key_hash":"sha256:73b28be5b05065fec55d5ab8cfe167a620076e75bd9d61d3a4a41c00a843f005","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_canonical_normalization"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":174,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC3","line":6,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_real_baseline_classifier_existing_file_missing_node_id -q","command_hash":"sha256:00f0adbf5efe43abb52f64bddf4e22d7711080a649041d3ce2612977c2a775c8","execution_key_hash":"sha256:719bd0bd62480e00d3defe845ddb0ae6379559c846475815af50b278bde9c78e","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_real_baseline_classifier_existing_file_missing_node_id"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":189,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC4","line":8,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_producer_preserves_source_and_sha -q","command_hash":"sha256:bf1d2a7ddb289c1864f97ee7eb536a5a920ea044d8d4820bb8fac52f0970cf46","execution_key_hash":"sha256:addd8a7508c0cdebc3a44a1150da13ff2ea1a292511f645c3963442585d40ab6","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_readiness_producer_preserves_source_and_sha"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":163,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC5","line":10,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_full_cli_chain_parent_replay -q","command_hash":"sha256:40cfca56c4e56dfd47433ac8d2eb977f1bc06b3fe102b73b16dafa48c93b4d13","execution_key_hash":"sha256:54d8524c3f029e3debcdf7c354d6b90a5154b128b776aa9e44977aa77e8980ac","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_full_cli_chain_parent_replay"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":174,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC6","line":12,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_strict_negative_matrix_fail_closed -q","command_hash":"sha256:e77c1039ba55ddf8b3982b8b3c65ab5d2a61eef5463ec3895a8c040ef18e7450","execution_key_hash":"sha256:75b9f0d8a954d2fb6e771987f876b4fd2983d47053ea9e1e78fe1b2595eb0f20","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_strict_negative_matrix_fail_closed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":177,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC7","line":14,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_fail_closed_state_contract -q","command_hash":"sha256:15175dad224f7e00cbb5e1da308ea8cc69294f8ef3ebc9732f32f964aa346a61","execution_key_hash":"sha256:e7586c971bd971e4800b25adc39126a1c38199868dad7871dd538669c17a50f0","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_fail_closed_state_contract"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":164,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC8","line":16,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_natural_language_never_normalizes -q","command_hash":"sha256:88eac865214a285687440ae5d691cfbf17ae81ff783786d8e560c5dc1a0d1307","execution_key_hash":"sha256:becb446a9a44ccf3880a1cacd1c20ef8359eb98a553e717ebf0a62a2d6a4b701","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_natural_language_never_normalizes"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":167,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC9","line":18,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_multiple_blockers_and_taxonomy_dump -q","command_hash":"sha256:5ea3b877c679683d548ba3dd12ce31aae5afbb8ab0d9ccd333323aec4b85f2bf","execution_key_hash":"sha256:5cc2f00955ea8dd60f726c1ee3fe5c3a14792d3e432af038040d536787eb3b0f","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_multiple_blockers_and_taxonomy_dump"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":175,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC10","line":20,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_downstream_ownership_contract -q","command_hash":"sha256:8c22321205dd6de7b0ecfa362db7660e338246a7fc0d729685700d04c009908a","execution_key_hash":"sha256:28b1af580b262a90fc7f96e559f496c0523e20decfbe652d806f22b00d311adb","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py::test_downstream_ownership_contract"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":176,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
        declared_path_overlap: {"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"7fdcfb8402d81ed35dcd6686423918efa984f473","draft_policy":"include_drafts","prs":[{"number":1528,"title":"feat(cleanup): 同一実行内の branch-only fallback を追加","base_ref_name":"main","head_ref_name":"worktree-issue-1403-post-merge-cleanup-dedicated-branch-forc","head_ref_oid":"b29007580ae225eb9676c7f32c878ee2bb9ccaa9","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1528","changed_files_count_graphql":4},{"number":1817,"title":"test: CLOSED predecessor の候補外 readback を固定 (#1766)","base_ref_name":"main","head_ref_name":"worktree-issue-1766-closed-native-predecessor-regression-v2","head_ref_oid":"1f22ea7ad8556982e0e8bd8d533e63ff3ed0aada","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1817","changed_files_count_graphql":1},{"number":1819,"title":"実装:#1797_C2a-successor-structural-collisionのhuman-review-route修正","base_ref_name":"main","head_ref_name":"worktree-issue-1797-c2a-successor-collision","head_ref_oid":"02856e9c7f5ee0c9d07dcafbc67106bc1c063bc6","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1819","changed_files_count_graphql":5},{"number":1832,"title":"fix(refinement): 全終端理由で follow-up materialization 結果を出力 (#1321)","base_ref_name":"main","head_ref_name":"worktree-issue-1321-follow-up-materialization-all-reasons","head_ref_oid":"31ac20913386ef2b0a91057fbf1de491a9286af2","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1832","changed_files_count_graphql":2}],"fetched_count":4,"totalCount":4,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:c12f35242349a814ebc48078fddd0dbf0633d591d39569f9a8860822d8c3d338","errors":[]},"inventory_digest_extended":"sha256:a14c964c31b7107a9ffb517ba9f8826e4ba3ee4d6a1884ea53401ac8338560de","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1549,"contract_source_kind":"issue_comment","contract_source_id":"5118634198","contract_body_sha256":"sha256:b74ad0d83deff7c5e6e2ef3215ee3a94ae150d2e5786a2cf5a8260a2849555dc","allowed_paths_normalized_sha256":"d58ded3d9cd8b6130dce04bef2ff93c28d06d18623df5437d5424f2259402e4d","base_ref":"main","base_sha_at_snapshot":"7fdcfb8402d81ed35dcd6686423918efa984f473"}
    
  15. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    推奨判定

    #1549を先行実装し、#1810は一時凍結、#1555は待機と裁定するのが妥当です。

    #1549は taxonomy/resolver の最小SSOT foundation、#1810はその下流integration、#1555はさらに下流のC9 evidence bindingという所有境界が、3件の現行契約で一致しています。#1549を#1810へ統合したり、並行実装を許可したりする必要はありません。

    #1810には未公開commit 4303a6c288e026247b3fd2a9cb06e96b77e92fd1 が存在しますが、PR未作成・未pushです。これは捨てずに保存し、#1549マージ後の差分回収用として扱います。現時点で正本へ昇格させるべきではありません。

    直ちに行うアクション

    1. #1549の本文と#1810の本文は変更しない。
    2. fresh overlap evidence内で、#1810が policy_class: C1 であることを確認する。
    3. #1549へ、OWNERまたはCOLLABORATOR権限のアカウントから、下記の HUMAN_C1_DECISION_V1 を投稿する。
    4. 投稿直後にoverlap preflightを再実行し、route: proceed_with_collision_evidence を確認する。
    5. #1549だけを実装・レビュー・Draft PR作成まで進める。
    6. #1549マージ後、#1810の未公開commitをfresh main にrebaseまたはcherry-pickし、#1549と重複するtaxonomy foundation部分を除去してから#1810を再検証する。

    preflightは、人間裁定を自由文ではなく、候補Issue番号と双方の本文SHAへ束縛された固定スキーマだけで受理します。投稿者もOWNER/COLLABORATORに限定されています。

    以下のSHAはfresh preflight JSONの値へ置換してから投稿してください。特に#1810の既知SHAを流用せず、candidates[].body_sha256 を読み戻す必要があります。

    Human C1 overlap adjudication

    Issue #1549 と Issue #1810 の構造的重複について、以下のとおり裁定します。

    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 1810
      decision: C1/non-conflict
      current_body_sha256: <fresh overlap evidence の current_issue.body_sha256>
      candidate_body_sha256: <fresh overlap evidence の Issue #1810 body_sha256>
    

    このコメントを投稿した後は、preflightの最終readbackが完了するまで#1549・#1810本文や裁定コメントを編集しないでください。入力のdriftが検出されると再びfail-closedになります。受理されれば、そのC1候補はcollision集計から除外され、他のblockerがなければ proceed_with_collision_evidence へ進みます。

    採用しない方がよい案

    #1549を#1810へ統合する案は、現行3契約の所有境界を逆転させ、#1810の実装済みコードを理由に契約を後追い変更するため不適切です。

    Allowed Pathsを人工的に分離する案も避けるべきです。reviewer_claim_replay.py は両Issueで実際に必要ですが、編集時期と責務が異なるだけです。

    自由文の承認コメントだけを投稿する案ではpreflightは解除されません。固定スキーマとfresh SHA bindingが必要です。

  16. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Human C1 overlap adjudication

    Issue #1549 owns the minimum SSOT foundation for REVIEWER_CHECKER_TAXONOMY_V1 and the generic resolver. Issue #1810 consumes the merged foundation and owns readiness normalization, producer metadata, and parent replay integration. Execution order is #1549 → #1810 → #1555; #1810 must not push, create a PR, or edit concurrently before #1549 completes.

    HUMAN_C1_DECISION_V1:
      candidate_issue_number: 1810
      decision: C1/non-conflict
      current_body_sha256: sha256:b74ad0d83deff7c5e6e2ef3215ee3a94ae150d2e5786a2cf5a8260a2849555dc
      candidate_body_sha256: sha256:3119a51d9f1e66b1f0ef67c0afab924cb7255461b9ad6f96de33b05976bc5f7d
    
  17. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    you asked

    message time: 2026-07-30 00:12:52

    • IMPL_REVIEW_LOOP_RESULT_V1:
    issue_number: 1549
    status: blocked
    termination_reason: repo_defined_fail_closed_condition
    failed_step: verification.test_verdict_materialization
    exact_blocker: >
    current-head CI は成功したが、TEST_VERDICT_MACHINE/v2 materializer が必須とする
    producer receipt artifact と execution record artifact が current workflow run に存在しない。
    手書き証跡・旧HEAD証跡・Allowed Paths外のproducer実装は使用できない。
    evidence_refs:
    - #1846
    - https://github.com/squne121/loop-protocol/actions/runs/30463943784
    - #1549 (comment)
    safe_actions_completed:
    - "human push後のremote HEAD readback: aa2fdde"
    - "AC1〜AC10: 10/10 PASS"
    - "関連回帰: PASS"
    - "required CI: PASS"
    - "CI artifacts 19件のHEAD binding: 全件 aa2fdde… と一致"
    - "PR本文hygieneを open-pr.update_pr 経路で更新・readback"
    - "Draft PR #1846を維持。マージ未実行"
    remaining_human_action:
    - >
    current CI producerが TEST_VERDICT_PRODUCER_RECEIPT_V1 と execution record artifactを
    生成・公開する正規経路を復旧または別スコープで実装する。
    - >
    artifact生成後、current HEAD aa2fdde… に対してmaterializer、test_verdict.publish、
    current-head PR reviewを再実行する。

    可能な限りこのイシュー実装を続行する形で推奨のアクションを検討して教えてください。


    chatgpt response

    停止条件の妥当性と、#1549 のスコープ内で進められる作業/別Issue化すべき作業を分離して確認します。PR・Actions・関連コメント・producer/materializer 実装を突き合わせ、再開手順を具体化します。

    現時点で、#1549 のコード変更自体は Allowed Paths 内に収まり、current HEAD の CI も成功しています。残る障害は実装品質ではなく、CI 証跡供給系の契約不履行であり、PR内修正と基盤修正を混同しないことが重要です。

    専用 workflow を単に手動起動すれば解消するとは限りません。現行 producer はコード上「#1646 用の bootstrap-only」で、固定テスト1本・AC1〜AC5だけを証明する設計です。#1549 の AC1〜AC10へ流用すると coverage binding で再停止する可能性が高いため、ここを追加確認しています。

    推奨判定

    #1549 の実装コードは凍結し、証跡 producer の修復を別Issue・別PRで先行させるのが妥当です。

    PR #1846 は current HEAD aa2fddeaf6463095f68ca316a6c0c1a0bd57b029 で Draft・未マージのまま、変更は #1549 の3つの Allowed Paths に収まっています。通常CIも current HEAD で成功しているため、#1549 側へ追加コミットして解決すべき実装不具合は現時点では確認できません。

    現在の状態は、次のように分類するのが正確です。

    implementation_complete / verification-infrastructure-blocked / merge-not-authorized

    単純な再実行では解消しない理由

    通常の ci workflow run 30463943784 には、一般的なテスト・Lint・JUnit・CI summary artifact はありますが、正規経路が要求する次の artifact はありません。

    • test-verdict-execution-record-<run>-<attempt>
    • test-verdict-producer-receipt-<run>-<attempt>

    通常CIのジョブ構成にも protected producer の trusted-preflight、untrusted-execution、produce は含まれていません。したがって、同じ通常CIを再実行しても構造的には解消しません。

    また、既存の protected workflow をそのまま手動起動するだけでも不十分です。現行 producer はコード上、Issue #1646 用の bootstrap-only producer と明記され、固定された1コマンドを実行し、AC1〜AC5だけを coverage として生成します。#1549 は異なる10個の node-id command を AC1〜AC10へ対応付けているため、現行 producer の receipt を流用するのは正規な証明になりません。

    materializer は command_hash_map に存在する全ACが execution record の per_ac に存在することを要求し、不足すれば execution_record_per_ac_missing_acs で停止します。このため、現行のAC1〜AC5 recordを #1549 に渡すと、少なくともAC6〜AC10が不足します。

    推奨する実行順序

    1. PR #1846を現状のまま保持する

    producer・workflow の変更は #1549 の Allowed Paths外であり、PR #1846へ混ぜると明示的な Stop Condition に抵触します。

    2. #1549専用の producer-enablement Issueを別途作る

    推奨タイトルは次です。

    実装: protected TEST_VERDICT producer に #1549 AC1–AC10 command-set を追加する

    親または goal reference は #1645 とし、変更範囲は原則として次に限定します。

    • .github/workflows/test-verdict-execution-record.yml
    • scripts/agent-ops/test_verdict_execution_record_producer.py
    • scripts/agent-guards/tests/test_test_verdict_execution_record_workflow.py
    • .github/ci/python-test-plan.json(必要な場合のみ)

    既存の #1848 は名称上は複数VC対応ですが、現行契約は #1766用 command_idとAC1〜AC3 に固定されています。#1549を黙って追加すると #1848 自身のスコープ境界を破るため、別Issueが最も安全です。#1848を使う場合は、実装開始前に正式な再refinementを行い、#1766専用契約から複数Issue対応契約へ変更する必要があります。

    3. producerは「任意コマンド」ではなく閉じたcommand-setにする

    #1549用 producer は、例えば次のような versioned IDを持たせます。

    uv.pytest.issue-1549-reviewer-checker-taxonomy.v1
    

    ただし、内部を単一の全ファイルpytestに置き換えるのではなく、以下の構造を推奨します。

    • #1549本文にある10個の正確な node-id commandをallowlistへ登録
    • 各commandをAC1〜AC10のいずれか1つへ固定対応
    • 10個の実executionを生成
    • execution recordの per_ac にAC1〜AC10をすべて記録
    • command hashを契約スナップショットの各hashと照合
    • Issue Markdownからargvを生成しない
    • 任意のargv、cwd、timeout、shell文字列を受け付けない
    • default branch側のtrusted harnessからのみ実行
    • PR HEAD、Issue body SHA、tree SHA、workflow source SHAを独立して束縛

    既存 producer は manifestから per_ac を生成する設計なので、単一command対応から複数execution対応へ拡張する必要があります。

    4. producer PRをdefault branchへ先にマージする

    protected workflow は workflow_dispatch 専用で、対象PR番号、Issue番号、期待HEAD SHA、期待Issue本文SHAを入力として受け取ります。また、execution recordとproducer receiptを専用artifactとしてアップロードする実装自体は既に存在します。

    producer拡張をdefault branchへマージした後、改めて次をlive readbackします。

    HEADが引き続き aa2fddea… でも、値を固定的に再利用せずGitHubから再取得してください。

    5. 正規の証跡チェーンを再実行する

    順序は次です。

    1. protected workflowをdefault branchからdispatch
    2. execution-record artifactを取得
    3. producer-receipt artifactを取得
    4. artifact metadata・archive digest・payload digestをlive readback
    5. AC1〜AC10のcommand hash mapでmaterializerを実行
    6. TEST_VERDICT_MACHINE/v2 を生成
    7. adjudicate_vc_result.py --require-producer-receipt を実行
    8. test_verdict.publish 専用publisherでPRへ投稿
    9. 投稿後のcomment・HEADをreadback
    10. current-head PR reviewを新規実行
    11. merge_ready: true の場合だけDraft解除・マージ判断へ進む

    この3段構成、すなわち read-only test report → materializer → dedicated publisher がリポジトリ上の正規経路です。materializerはreceiptが指すrun/job/check/artifactをGitHubから再取得し、呼び出し元が渡した手書きexecution recordを信用しません。

    採用しない方がよいアクション

    アクション 判定 理由
    通常CIだけ再実行 不採用 protected artifactsを生成するジョブがない
    現行protected workflowをそのままdispatch 不採用 #1646固定・AC1〜AC5固定で#1549を証明できない
    producer変更をPR #1846へ追加 不採用 #1549 Allowed Paths外
    手書きreceipt/既存CI artifactからreceiptを合成 禁止 trust boundaryを破りmaterializerが拒否する
    Issue本文を単一aggregate commandへ弱める 原則不採用 既存のAC別command hash bindingを弱める
    receiptなしでPR #1846をマージ 不採用 repo-defined fail-closed conditionを迂回する
    #1810を先に進める 不採用 SSOT foundationのマージ前にdownstreamを進めることになる

    最小の人間判断

    必要な判断は一つです。

    #1549用のprotected producer command-setを、#1645配下の新規 sibling Issueとして実装開始する。#1848は#1766専用のまま維持する。

    この判断後は、producer Issueの実装・テスト・PR・default branchへのマージ、protected workflow dispatch、#1846のmaterializer/publisher/review再実行まで、通常の impl-review-loop で続行できます。


    you asked

    message time: 2026-07-30 00:44:36

    #1549 の実装を優先してほしい。証跡生成はコストパフォーマンスそれが悪いから、もうこの開発では不要としたいです。個人趣味開発では過剰に思います。


    chatgpt response

    #1549 を先に進める前提で、現在の PR 状態と、最小限のルール変更で過剰な証跡要件を外す経路を確認します。通常CIを正本に切り替え、protected artifact chain は廃止または任意化する方針で整理します。

    その方針で妥当です。#1549 を証跡基盤の修復待ちにせず、通常CIとコードレビューを基準に完了させるべきです。

    PR #1846 は current HEAD aa2fddeaf6463095f68ca316a6c0c1a0bd57b029、変更3ファイル、AC1〜AC10個別PASS、関連回帰97件PASSとして整理済みです。現在の阻害要因は #1549 のコード不具合ではなく、TEST_VERDICT_MACHINE/v2 の付随証跡要件です。

    今後の判定基準

    この個人開発では、マージ必須条件を次に限定することを推奨します。

    • PRのcurrent HEADに対するrequired CIが成功
    • 変更ファイルがAllowed Paths内
    • diffのコードレビューで重大な問題がない
    • unresolved review threadがない
    • GitHubのbranch protectionと通常のマージ条件を満たす

    次は必須条件から外します。

    • TEST_VERDICT_MACHINE/v2
    • TEST_VERDICT_PRODUCER_RECEIPT_V1
    • execution record artifact
    • materializer
    • artifact archive digestの再計算
    • workflow/job/check-runの多段readback
    • launch ledger、publish context、controlled producer receipt
    • Issue body SHAを用いた多重freshness binding

    手書きの偽証跡を認めるのではなく、そもそも証跡契約をマージ判定に使わない方針です。

    #1549 の直近アクション

    1. PR #1846には証跡生成目的の追加コードを入れない。
    2. current HEADを再取得し、通常CIの状態だけを再確認する。
    3. #1549のdiffをcurrent HEADで最終レビューする。
    4. 問題がなければDraftを解除する。
    5. branch protectionを迂回せず通常マージする。
    6. #1549のマージ後、依存順どおり 実装: fix(replay-taxonomy): readiness rule_id/category を deterministic_domain_key taxonomy に正規化する #1810、次に #1555を進める。

    PR本文に記録されているAC・回帰結果は保持して構いません。追加のproducer receiptは不要です。

    リポジトリルールの整理

    impl-review-loop は次のように単純化するのが適切です。

    current-head required CI PASS
    + Allowed Paths PASS
    + current-head code review APPROVE
    = merge-ready
    

    materialize_test_verdict_artifact.py やprotected producerは直ちに削除する必要はありません。まずルーティング上で任意・非blocking・非推奨に変更し、利用されなくなった段階で削除します。現行Step 2はreceipt付きmaterializerを正規経路として要求しているため、ここは後続の小規模な運用簡素化Issueで変更対象になります。

    結論: #1549は verification-infrastructure-blocked ではなく、通常CI基準で implementation complete と再判定し、current-headレビュー後にマージを進めるのが最も費用対効果の高い対応です。


    you asked

    message time: 2026-07-30 00:47:17

    AIにプロンプトを出してください。


    chatgpt response

    そのまま実装AIへ渡せる形です。

    **Document Title: **

    あなたは squne121/loop-protocol の実装・レビュー・マージ担当AIです。

    最優先目標

    Issue #1549 の実装を最優先で完了し、PR #1846を通常CI基準でレビュー・マージしてください。

    証跡生成基盤の修復や拡張を、#1549 の完了条件にしてはいけません。

    オーナー方針

    このリポジトリは個人の趣味開発です。

    以下の証跡チェーンは、開発コストに対して便益が小さく、今後のマージ必須条件から除外します。

    • TEST_VERDICT_MACHINE/v2
    • TEST_VERDICT_PRODUCER_RECEIPT_V1
    • execution record artifact
    • protected TEST_VERDICT producer
    • materialize_test_verdict_artifact.py によるmaterialization
    • artifact archive digestの再計算
    • workflow run / job / check runの多段readback
    • Issue body SHA、PR HEAD、diffを重複して束縛する証跡処理
    • test_verdict.publish を経由した専用証跡投稿

    これらが存在しないことを理由に、#1549を停止、差し戻し、human escalation、REQUEST_CHANGESにしてはいけません。

    偽のreceiptや手書きの機械証跡を作成することも禁止します。証跡を偽造するのではなく、マージ判定から要件自体を外してください。

    現在の対象

    • Repository: squne121/loop-protocol
    • Issue: #1549
    • Pull Request: #1846
    • 既知のHEAD: aa2fddeaf6463095f68ca316a6c0c1a0bd57b029
    • Base branch: main
    • PRはDraft状態
    • 変更ファイルはIssue #1549のAllowed Paths内の3ファイル
    • AC1〜AC10は個別にPASS済み
    • 関連回帰は97件PASS済み
    • current-head CI run 30463943784 は成功済み

    ただし、上記の状態は作業開始時にGitHubから再取得し、最新状態を正本としてください。既知HEADを無条件に信用してはいけません。

    新しいマージ判定

    以下をすべて満たせば merge-ready と判断してください。

    1. PRのcurrent HEADを取得できる
    2. 変更ファイルがIssue #1549のAllowed Paths内に収まっている
    3. current HEADに対する通常のrequired CIが成功している
    4. AC1〜AC10の実装がdiff上で確認できる
    5. 対象テストおよび関連回帰に失敗がない
    6. コードレビューで重大または高優先度の未解決問題がない
    7. unresolved review threadがない
    8. GitHub上で実際のマージ競合がない

    次の条件は merge-ready 判定に使用しないでください。

    • producer receiptの有無
    • execution record artifactの有無
    • materializer出力の有無
    • protected workflowのdispatch有無
    • TEST_VERDICT_MACHINE/v2 コメントの有無
    • 旧HEADに対する証跡の有無
    • CI artifact数
    • artifact digestの再計算結果

    実行手順

    Phase 1: 最新状態のreadback

    GitHubから次を取得してください。

    • Issue #1549の現行本文
    • PR #1846のcurrent HEAD
    • PRのDraft状態
    • changed files
    • diff
    • current-head workflow runs
    • required checks
    • review、review thread、conversation comments
    • mergeable / merge state
    • base branchとの差分

    旧HEADに対するREQUEST_CHANGESやレビューコメントは履歴として参照して構いませんが、current HEADへの未解決コード問題でない限り、現在のblocking条件にしないでください。

    Phase 2: current-headコードレビュー

    PR #1846を敵対的にレビューしてください。

    重点確認項目:

    • REVIEWER_CHECKER_TAXONOMY_V1 が唯一のSSOTになっているか
    • existing_file_missing_node_id_noncanonical entryが一意か
    • rule ID、category、source check、producer shapeがAND条件で解決されるか
    • 自然言語、substring、fuzzy matchingが既知entryへ昇格しないか
    • ambiguous、unknown、conflictがfail-closedになるか
    • entry_id と deterministic_domain_key が混同されていないか
    • 既存の domain_keys consumer互換性が維持されているか
    • broad-search-path既存処理をgeneric resolverへ移行したことで回帰がないか
    • 第二のmap、set、match分岐、category専用ifが追加されていないか
    • malformed producer shapeを誤って受理しないか
    • #1810および#1555の責務を先取りしていないか
    • Allowed Paths外の変更がないか

    重大な実装問題を発見した場合のみ、PR #1846のAllowed Paths内で最小修正してください。

    証跡基盤を修正するために、workflow、producer、materializer、publisher、schema、agent guardを変更してはいけません。

    Phase 3: 検証

    Issue #1549記載のAC1〜AC10のnode-idをcurrent HEADで実行してください。

    加えて、PR本文記載の関連回帰を実行してください。

    最低限確認するもの:

    uv run --locked pytest \
      .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_existing_file_missing_node_id.py \
      .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py \
      .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py \
      .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay.py \
      -q
    
    uv run --locked ruff check .claude/scripts scripts schemas .claude/skills
    

    ローカル検証結果は通常の作業ログとして記録してください。専用receiptやexecution artifactへ変換する必要はありません。

    Phase 4: PR整理

    コード上のblocking問題がない場合:

    1. PR本文のcurrent HEAD表記が古ければ更新する
    2. 通常CIとローカル検証結果を簡潔に記録する
    3. protected TEST_VERDICT artifactは「不要・非blocking」と明記する
    4. 旧HEADに対するREQUEST_CHANGESがcurrent HEADでは解消済みであることを記録する
    5. Draftを解除する

    PR本文を長大な証跡一覧で膨らませないでください。

    Phase 5: マージ

    次の条件を満たす場合、#1549をマージしてください。

    • current-head required CIがPASS
    • Allowed PathsがPASS
    • current-headレビューで重大な問題なし
    • 実マージ競合なし
    • branch protectionが許可

    マージ方式はリポジトリの標準方式を使用してください。

    branch protectionが、廃止対象のTEST_VERDICT証跡だけを理由にマージを拒否する場合:

    • 偽証跡を作らない
    • #1549へ証跡基盤変更を混ぜない
    • オーナー判断として当該証跡チェックをrequired条件から外す
    • その後、通常CIを再確認してマージする

    通常CIの実失敗や実マージ競合を無視して強制マージしてはいけません。

    マージ後

    #1549のマージ後は、依存順を維持してください。

    1. 実装: reviewer checker taxonomy の最小 SSOT foundation と既存ファイル未登録node-id resolver #1549
    2. 実装: fix(replay-taxonomy): readiness rule_id/category を deterministic_domain_key taxonomy に正規化する #1810
    3. 実装: reviewer_claim_replay.py の taxonomy に RDR001 / VCP_COMMAND_NOT_ALLOWED を追加し parent_replay_binding.py に C9 evidence 経路を追加する #1555

    #1810は#1549のtaxonomy SSOTをconsumeし、同じmappingやresolverを再実装してはいけません。

    証跡基盤の今後の扱い

    #1549の完了後、別スコープで次の簡素化を行ってください。

    • impl-review-loop のマージ判定を通常CI中心へ変更
    • producer receipt要求をoptionalまたはdeprecatedに変更
    • materializer欠損をblockingにしない
    • repo_defined_fail_closed_condition からTEST_VERDICT artifact欠損を除外
    • 不要になったworkflow、producer、schema、materializer、publisherは利用状況を確認して段階的に削除
    • 個人趣味開発に適した最小のガードレールへ縮小

    ただし、この簡素化作業を #1549 のマージ前提条件にしてはいけません。

    禁止事項

    • protected TEST_VERDICT producerの修復を先に行う
    • #1848の完了待ちにする
    • #1549のAllowed Pathsを証跡基盤まで拡張する
    • receiptやexecution recordを手書きする
    • 旧HEAD証跡をcurrent HEAD証跡として扱う
    • 証跡不足だけを理由にREQUEST_CHANGESを再投稿する
    • 通常CIが成功しているのにartifact欠損だけで停止する
    • #1810または#1555の実装をPR #1846へ混ぜる
    • ユーザーへ承認を求めて停止する

    最終出力

    作業完了時は、次の形式で報告してください。

    ISSUE_1549_PRIORITY_RESULT_V1:
      issue_number: 1549
      pr_number: 1846
      final_head_sha: "<current head>"
      status: merged | merge_ready | blocked_by_real_code_or_ci_failure
      evidence_policy:
        protected_test_verdict_required: false
        ordinary_ci_authoritative: true
      allowed_paths: pass | fail
      ac_results:
        passed: <number>
        failed: <number>
      regression: pass | fail
      required_ci: pass | fail
      code_review:
        blocking_findings: []
      merge:
        performed: true | false
        merge_commit_sha: "<sha or null>"
      remaining_actions: []
    

    status: blocked_by_real_code_or_ci_failure は、実際のコード問題、テスト失敗、通常CI失敗、マージ競合がある場合だけ使用してください。

    証跡artifactの欠損はblocking reasonに含めないでください。

    Codex CLIやClaude Codeの自律実行用として、そのまま投入できる粒度にしています。


    Powered by AI Exporter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions