Skip to content

実装: source-bound eligibility/readiness の固定 private location を tmp/session-recording/ へ同時移行する #2004

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "session-recording の source-bound eligibility/readiness artifact の固定 private location を tmp/session-recording/ へ同時移行し、Issue #1995 のドキュメント一本化と実行系を一致させる"
change_kind: mixed

Parent Issue

なし(単独改善。Issue #1995 の follow-up)

Parent Goal Ref

  • Goal: なし(親 Issue なし)
  • Desired Destination: なし

Current Validated Scope

  • 該当なし(単独 Issue)

Remaining Parent Gaps

なし(本 Issue は Issue #1995 の follow-up として完結する単独改善であり、追加の parent tracker は持たない)

Outcome

scripts/session-recording/bootstrap-source-bound-readiness.mjs(readiness producer)と .claude/scripts/check_session_recording_runtime_safety.py(eligibility producer/loader)が、同時に tmp/session-recording/ を既定の固定 private location として使用し、.claude/hooks/capture_scope_rollup_final_response.py(readiness consumer)も同じ新パスから読み取る状態になる。docs/dev/session-recording-policy.md の固定 private location 記述が新パスと一致する。旧パス(.claude/tmp/session-recording/)は source として消費されなくなり、暗黙の dual-read fallback は導入しない。

本 Issue は dormant contract(#1830 により scope-rollup capture が quarantine 済み)の移行であり、live Codex active path の production trust を主張しない。Runtime Verification Applicability は immediate。

In Scope

  • scripts/session-recording/bootstrap-source-bound-readiness.mjs の既定 readiness パスを tmp/session-recording/scope-rollup-readiness.json へ変更(SCOPE_ROLLUP_READINESS_ARTIFACT_PATH env override は維持しつつ、absolute path 以外を拒否するか repo root 基準へ正規化する)
  • .claude/scripts/check_session_recording_runtime_safety.py の既定 eligibility パスを tmp/session-recording/scope-rollup-eligibility.json へ変更(readiness と同時に移行する)
  • .claude/hooks/capture_scope_rollup_final_response.py の読み取り先を同じ新パスへ変更し、env override の相対パス解決を producer 側と同じ repo root 基準に統一する
  • docs/dev/session-recording-policy.md の固定 private location 記述(既定パス)を新パスへ更新し、policy digest 変更に伴う artifact 再生成順序を明記する
  • 新しい親ディレクトリ・artifact のパーミッション契約(親ディレクトリ: non-symlink・owner 一致・mode 0700、artifact: regular file・non-symlink・mode 0600)を実装で担保する
  • 旧パスにのみ artifact が存在する場合に消費しない fail-closed 挙動(固定 missing reason を返す)を実装・テストする
  • .claude/hooks/tests/test_scope_rollup_capture.py に新パスでの producer-consumer round trip テストと negative control(旧パスのみ存在/readiness のみ存在/eligibility のみ存在のそれぞれで fail-closed になること)を追加する
  • tests/session-recording/ 配下に必要な新規テストを追加する
  • 必要であれば package.json の bootstrap/検証コマンドを新パスに合わせて更新する
  • 上記変更に対応する既存テストの更新

Out of Scope

  • REPO_TEMP_FOLDER_ADVICE_V1 schema(schemas/repo_temp_folder_advice_v1.schema.json)の変更(approved_temporary_roots の一値化は破壊的変更であり、別 Issue で V2 migration として扱う)
  • scripts/agent-guards/root_temporary_residue_policy.py の APPROVED_TEMPORARY_ROOTS 定数・案内メッセージの変更
  • scripts/agent-ops/temp_residue_marker.py の変更(.claude/tmp/ を含む既存 marker の互換性を維持する)
  • scripts/agent-ops/temp_residue_classifier.py の変更(.claude/tmp/ の legacy residue read/scan/report 対象からの除外はしない)
  • legacy .claude/tmp/ residue の削除・削除 executor の追加
  • Codex 側の source-bound scope-rollup capture の active wiring 再導入(SCOPE_ROLLUP_REQUIRE_SOURCE_BOUND_ELIGIBILITY を設定する変更は含まない)
  • Issue 実装: repo-approved local temporary workspace を tmp/ へ一本化し .claude/tmp/ を非推奨化する #1995 で既に完了した ESLint containment の再変更
  • tmp/ / .claude/tmp/ 以外の新しい one-off temporary root の追加

Acceptance Criteria

  • AC1: .claude/scripts/check_session_recording_runtime_safety.py(eligibility)と scripts/session-recording/bootstrap-source-bound-readiness.mjs(readiness)の既定パスが、両方とも tmp/session-recording/ を使用する
  • AC2: scripts/session-recording/bootstrap-source-bound-readiness.mjs / .claude/hooks/capture_scope_rollup_final_response.py / .claude/scripts/check_session_recording_runtime_safety.py のソースコード中に旧既定パス .claude/tmp/session-recording の参照がゼロ件である
  • AC3: 新しい親ディレクトリが non-symlink・owner 一致・mode 0700、artifact が regular file・non-symlink・mode 0600 である
  • AC4: env override(SCOPE_ROLLUP_READINESS_ARTIFACT_PATH 等)は absolute path のみ受理するか、producer/consumer 双方で repo root 基準に正規化される
  • AC5: isolated fixture で eligibility を生成し readiness を bootstrap して gated capture producer を起動したとき、sidecar の eligibility/readiness reason code が双方 ok になる
  • AC6: 旧パスにのみ artifact が存在する場合は消費されず、固定 missing reason を返す(暗黙の dual-read fallback を導入しない)
  • AC7: policy digest/producer digest 更新後の artifact 再生成順序がテストと docs/dev/session-recording-policy.md に固定されている
  • AC8: Claude coordinator 経由の ungated raw-payload capture の既存回帰テスト、および legacy .claude/tmp/ residue の marker/classifier/advisory 契約テストが、本変更後も引き続き成功する(regression guard、baseline でも成功が期待される)

Verification Commands

# AC1
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_default_fixed_location_producer_paths -q

# AC2
$ ! rg -nP "['\"]\.claude['\"]\s*[,/]\s*['\"]tmp['\"]" scripts/session-recording/bootstrap-source-bound-readiness.mjs .claude/hooks/capture_scope_rollup_final_response.py .claude/scripts/check_session_recording_runtime_safety.py

# AC3
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_new_private_directory_and_artifact_mode -q

# AC4
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_env_override_repo_root_normalized -q

# AC5
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_source_bound_default_path_roundtrip -q

# AC6
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_old_default_location_not_consumed -q

# AC7
$ uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_digest_update_regeneration_order -q

# AC8
# baseline-expect: pass
$ uv run --locked pytest .claude/hooks/tests/test_scope_rollup_capture.py -q -k claude_coordinator_raw_payload
# baseline-expect: pass
$ uv run --locked pytest tests/agent_ops/test_temp_residue_classifier.py scripts/agent-guards/tests/test_root_temporary_residue_policy.py tests/codex/test_root_temporary_residue_advisory.py -q

# Full suite(全 AC 共通の最終ゲート)
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build

補足: pnpm policy:check:session(docs/dev/session-recording-policy.md の digest 整合性チェック)も実装完了後の手動確認として推奨するが、VC preflight の pnpm allowlist(typecheck/lint/test/build のみ)外のため、Verification Commands には含めない。

Allowed Paths

  • scripts/session-recording/bootstrap-source-bound-readiness.mjs
  • .claude/hooks/capture_scope_rollup_final_response.py
  • .claude/scripts/check_session_recording_runtime_safety.py
  • docs/dev/session-recording-policy.md
  • .claude/hooks/tests/test_scope_rollup_capture.py
  • tests/session-recording/
  • package.json
  • .github/ci/python-test-plan.json
  • .github/workflows/ci.yml
  • scripts/ci/tests/test_python_test_plan.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合(特に schemas/repo_temp_folder_advice_v1.schema.json・scripts/agent-guards/root_temporary_residue_policy.py・scripts/agent-ops/temp_residue_marker.py・scripts/agent-ops/temp_residue_classifier.py への変更が必要と判明した場合は、V2 migration follow-up Issue へ分離する)
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合(eligibility と readiness の同時移行という固定契約を含む)
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合(Codex 側 active wiring 再導入への波及を含む)
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • policy digest / producer digest の再生成順序について、テストと文書で固定した契約と矛盾する実装が必要になった場合

Runtime Verification Applicability

decision: immediate
applicable_acs:
  - AC1
  - AC3
  - AC4
  - AC5
  - AC6
  - AC7
  - AC8
execution_environment:
  cli_tools:
    - python3
    - uv
    - pnpm
  auth_required: false
  network_required: false
skip_conditions:
  - "local repository checkout が存在しない場合は SKIP ではなく environment blocked として扱う"
fallback_policy:
  fallback_success_is_pass: false
  notes: "fallback 経由の成功を PASS に変換しない。live Codex active path の production trust は主張しない(#1830 により quarantine 中の dormant contract の移行であるため)"
artifact_requirements:
  - "pytest output"
  - "contract_readiness_check.py JSON output"

AC5〜AC8 はプロセス起動・filesystem I/O・producer-consumer round trip を伴う実行時検証を要求するため、SKIP は許容しない。実行系のテストは uv run --locked pytest(対象 Python テスト)と pnpm test(Vitest 系)の両方を明示的に実行し、Python 側の変更を Vitest だけで代替しない。

Required Skills

なし

Required Design References

  • docs/dev/session-recording-policy.md
  • docs/dev/agent-skill-boundaries.md
  • docs/dev/runtime-verification-policy.md

Scope Delta(任意)

PR #2008 head 800116ec8718748208152eefcddbfed5a5e5376f に対する OWNER 敵対的レビュー(https://github.com/squne121/loop-protocol/pull/2008#issuecomment-5216409526)を受けて、以下の Allowed Paths 拡張を行う。

  • .github/ci/python-test-plan.json: tests/session-recording/test_fixed_location_cutover.py 系の新規 pure-Python テストを python-test-core job の targets/secondary_coverage に正しく登録するため。
  • .github/workflows/ci.yml: python-test-core(Python-only invariant を強制する job)内で Node subprocess を起動するテスト(node --test 等の外部プロセス実行を伴うテスト)を実行しないよう、該当テストを node-backed-hook-tests job の固定ステップへ移設し、secondary_coverage.dedicated_lanes[] の該当エントリを更新するため。
  • scripts/ci/tests/test_python_test_plan.py: python-test-plan.json の deselect リストへ tests/session-recording/test_fixed_location_cutover.py の node-backed 8 nodeid を追加した結果、test_real_plan_serial_lane_has_debounce の serial-lane argv snapshot アサーションが drift したため、期待値リストを実装に合わせて機械的に更新する(テストロジック自体の変更は含まない)。

この Scope Delta は、In Scope の固定契約(eligibility/readiness 同時移行、permission 契約、fail-closed 挙動)自体を変更するものではなく、既存 CI レーン分離契約(Issue #1760: python-test-core からの Node/npm/pnpm/Codex runtime 排除)を維持したまま新規テストを正しいレーンに配置するための手段的拡張である。

Notes for Reviewer

Delivery Rule

1 Issue = 1 PR。worktree で作業し、Draft PR を既定とする。

Activity

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

    @squne121
    OwnerAuthor

    敵対的レビュー結果

    判定:BLOCKED — Issue 契約を修正するまで着手不可

    Issue #2004 の目的自体、すなわち新規 session-recording artifact の既定保存先を tmp/ に寄せる方針は妥当です。しかし、現行本文は以下の三つを一つの PR に束ねています。

    1. source-bound eligibility/readiness artifact の保存先移行
    2. REPO_TEMP_FOLDER_ADVICE_V1 の破壊的 schema 変更
    3. legacy .claude/tmp/ residue の marker/classifier 互換性変更

    Issue #1995 の敵対的レビューでは、これらを分離し、PR #2001 は意図的に writer・schema・marker・classifier を変更せず、.claude/tmp/ の read/scan/report 安全境界を維持してマージされています。#2004 はその follow-up ですが、分離した問題を再び一つに結合しています。


    P0-1:Issue 自身の Stop Condition が既に発火している

    現行 REPO_TEMP_FOLDER_ADVICE_V1 は次の制約です。

    • approved_temporary_roots.items.enum = ["tmp/", ".claude/tmp/"]
    • minItems: 2
    • uniqueItems: true

    許容値が二つしかなく、二件以上かつ重複禁止なので、valid instance は事実上、両方の root を含む配列だけです。enum を tmp/ 一値にして minItems: 2 を残せば充足不能になり、minItems: 1 に変えれば、従来 valid だった V1 payload が invalid になる後方非互換変更です。JSON Schema の enum は許容値を制限する assertion、minItems は配列長の下限を定める assertion であり、単なる非推奨 annotation ではありません。 (JSON Schema)

    ところが #2004 の Stop Conditions は、V1 enum 変更が breaking change になると判明した場合に停止するよう要求しています。本文自身もその可能性を認識しています。したがって調査は既に完了しており、結論は Stop です。

    V2 へ分離する案も、現在の Allowed Paths では実装できません。少なくとも次が不足しています。

    • schemas/repo_temp_folder_advice_v2.schema.json
    • schemas/catalog.yaml
    • docs/dev/schema-governance.md
    • docs/dev/hook-boundaries.md
    • docs/dev/repository-folder-policy.md
    • .claude/hooks/root_temporary_residue_advisory.sh
    • tests/codex/test_root_temporary_residue_advisory.py
    • V1/V2 consumer migrationテスト

    PR #2001 の時点でも「一値化は breaking change なので schema V2 follow-up」と明記されています。現行 #2004 はその判断を実装可能な migration contract に落とせていません。


    P0-2:readiness だけを移しており、固定 private location のもう半分が欠落している

    session-recording policy が定義する source-bound artifact は次の二件です。

    • scope-rollup-eligibility.json
    • scope-rollup-readiness.json

    policy は両方を同じ固定 private location に置き、adapter/producer が両方を検証する契約として記述しています。

    しかし #2004 が変更対象としているのは主に readiness 側です。

    • readiness writer
      scripts/session-recording/bootstrap-source-bound-readiness.mjs
    • readiness reader
      .claude/hooks/capture_scope_rollup_final_response.py

    eligibility の producer/reader authority は .claude/scripts/check_session_recording_runtime_safety.py にあり、現在も次の旧パスに固定されています。

    .claude/tmp/session-recording/scope-rollup-eligibility.json
    

    このファイルは #2004 の Allowed Paths に含まれていません。

    そのため現行スコープでは、次のどちらかにしかなりません。

    • policy を tmp/session-recording/ に更新し、eligibility 実装と文書を不一致にする
    • readiness だけ tmp/、eligibility は .claude/tmp/ に残し、「単一 fixed location」という契約を壊す

    さらに eligibility は docs/dev/session-recording-policy.md の SHA-256 digest に bind されています。policy 文書を変更した時点で既存 eligibility artifact は stale になるため、eligibility の再生成まで含む cutover 順序が必要です。readiness も capture producer 自身の digest に bind されるため、reader コード変更後は再生成が必要です。

    必要な修正は、eligibility と readiness の同時移行です。


    P0-3:marker/classifier を狭めると legacy residue の安全な可視性を失う

    Issue #1417 は temp_residue_classifier.py を read-only advisory として導入し、tmp/ と .claude/tmp/ の両方を認識する契約です。Issue #1616 も、将来の削除 executor が exact owned session subdirectory を再検査する前提で、両 root の legacy residue を扱います。

    現在の owner schema も次の両形式を valid としています。

    ^(tmp|\.claude/tmp)/[^/]+$

    ここから .claude/tmp を除去すると、既存 marker が突然 malformed になります。一方、classifier の APPROVED_ROOTS から除去すると、legacy residue は「deprecated」として分類されるのではなく、scan 対象から消える可能性があります。これは移行ではなく、観測可能性の喪失です。

    しかも、marker 実装が同期を要求している owner schema は Allowed Paths 外であり、実際の parity test は scripts/agent-ops/tests/ ではなく tests/agent_ops/test_temp_residue_classifier.py にあります。このテストパスも #2004 の Allowed Paths 外です。

    #2004 では「互換性を調査して狭める可能性」を残すのではなく、次の判断を本文で固定すべきです。

    temp_residue_marker.py、temp_residue_owner_v1.schema.json、temp_residue_classifier.py は変更しない。.claude/tmp/ の新規書き込みは禁止するが、既存 residue の read/scan/report 互換性は維持する。


    P1-1:「production hot path の移行」という前提が現行 wiring と一致しない

    Issue #1527 では、Codex adapter が eligibility/readiness を検証して capture producer を起動する source-bound hot path が設計されました。

    その後 Issue #1830 により、Codex enforcing harness と scope-rollup capture は quarantine されました。現在の .codex/hooks.json は SessionEnd/SubagentStop の passive recorder のみを起動し、composite entrypoint も passive/fail-open adapter を importするだけです。

    Claude 側では session_manifest_coordinator.sh が capture producer を呼びますが、producer が source-bound artifact を検証する条件である SCOPE_ROLLUP_REQUIRE_SOURCE_BOUND_ELIGIBILITY=1 を設定しません。capture producer 自身も「Claude coordinator はこの gate を設定しない」と明記しています。

    session-recording policy 冒頭も、#1830 後は後続の scope-rollup 記述を「履歴・再導入時の設計資料」であり active wiring ではないとしています。

    したがって #2004 は、現状では active production hot path の移行ではなく dormant contract/future reintroduction preparation の移行です。

    これは移行を不要にする指摘ではありません。ただし Outcome と Runtime Verification Evidence で、次を主張してはいけません。

    • live Codex path が新 artifact を消費した
    • runtime-active hook が移行済み
    • production trust が確認済み

    #1830 に従えば active scope-rollup capture の再導入は別 Issue が必要です。


    P1-2:AC6 は consumer を一度も動かしていない

    現行 AC6 の Verification Commands は次の二点だけです。

    node scripts/session-recording/bootstrap-source-bound-readiness.mjs
    test -f tmp/session-recording/scope-rollup-readiness.json

    これは writer がファイルを作ったことしか証明しません。AC本文の「consumer がそれを読める」は未検証です。

    実際の gated consumer は、readiness より先に eligibility を検証し、次の条件も確認します。

    • mode 0600
    • owner
    • no-symlink
    • repo root binding
    • policy digest
    • producer digest
    • timestamps
    • prepared: true
    • safety_verdict: allow

    既存テストには、valid eligibility/readiness を用意して gated producer を起動し、sidecar provenance の両 reason code が ok になる経路があります。#2004 はこれを新しい既定パスで通す round-trip test に拡張すべきです。

    必要な negative control も不足しています。

    • 新パスに artifact がなく、旧パスにだけ存在する場合は読まない
    • readiness だけ存在して eligibility がない場合は fail-closed
    • eligibility だけ存在して readiness がない場合は fail-closed
    • old-path fallback や dual-read を暗黙に導入しない
    • sidecar に実際に検証した artifact digest と reason code が記録される

    P1-3:Verification Commands の成功条件が逆転している

    AC1、AC2、AC5 は「旧文字列が存在しないこと」が成功条件ですが、Verification Commands は生の rg です。

    rg -n "\.claude/tmp/session-recording" ...
    rg -n "\.claude/tmp" ...
    rg -n "\.claude/tmp/ を使い" ...

    ripgrep は無一致時に非ゼロ終了するため、望ましい状態でコマンドが failure になります。否定検証なら ! rg ...、または専用テストで exit semantics を固定する必要があります。([GitHub]2)

    逆に AC3 の rg -n "tmp/session-recording" は、新旧両方が文書に残っていても成功します。単なる新文字列の存在確認であり、authority contract の一意性を証明しません。


    P1-4:Runtime Verification Applicability が欠落している

    リポジトリの runtime verification policy は、全 Issue に次のいずれかを明示するよう要求しています。

    • not_applicable
    • immediate
    • deferred

    #2004 にはこの節がありません。さらに AC6 はプロセス起動、dependency sync、filesystem I/O、producer-consumer round trip を要求するため、明確に immediate です。runtime AC タグ、SKIP exit 77、fallback を PASS にしない規約、証跡要件が必要です。

    また pnpm test は主に Vitest 系であり、変更対象となる Python hook/marker/classifier の pytest を十分に代替しません。対象 Python tests を明示的に実行する必要があります。


    P1-5:folder policy が要求する同時更新セットを満たしていない

    docs/dev/repository-folder-policy.md は folder policy 変更時に、次を同一変更セットでそろえるよう要求しています。

    • folder policy SSOT
    • hook registration/advisory docs
    • schema、producer、tests
    • cleanup skill/operator docs

    しかし #2004 の Allowed Paths には、少なくとも次がありません。

    • docs/dev/repository-folder-policy.md
    • docs/dev/hook-boundaries.md
    • docs/dev/schema-governance.md
    • schemas/catalog.yaml
    • cleanup safety docs
    • Codex advisory integration test

    root guard の定数と V1 schema だけを変えると、既存の正本文書と実装が再び食い違います。


    P2:新パスの private-directory contract が弱い

    readiness bootstrap は artifact file を 0600 で作成しますが、親ディレクトリは次の呼出しです。

    mkdirSync(dirname(targetPath), { recursive: true })

    Node.js のディレクトリ作成 mode の既定値は 0o777 で、最終権限は umask に依存します。tmp/session-recording/ を「fixed private location」と呼ぶなら、少なくとも directory mode 0700、owner、regular directory、parent symlink 不在を検査すべきです。 ([Node.js]3)

    また env override の相対パス処理が非対称です。

    • Node writer:resolve(envValue) なので writer の current working directory 基準
    • Python reader:Path(envValue) なので reader の current working directory 基準

    異なる cwd から起動すると、同じ override 文字列が異なるファイルを指し得ます。absolute path 以外を拒否するか、両方を repo root 基準で正規化する必要があります。 ([Node.js]4)


    推奨するスコープ再編

    Issue #2004 は fixed-location cutover のみに縮小する

    推奨タイトル:

    実装: source-bound eligibility/readiness の固定 private location を tmp/session-recording/ へ同時移行する

    In Scope

    • scripts/session-recording/bootstrap-source-bound-readiness.mjs
    • .claude/hooks/capture_scope_rollup_final_response.py
    • .claude/scripts/check_session_recording_runtime_safety.py
    • docs/dev/session-recording-policy.md
    • .claude/hooks/tests/test_scope_rollup_capture.py
    • tests/session-recording/**
    • 必要なら package.json の bootstrap/検証 command

    明示的 Out of Scope

    • REPO_TEMP_FOLDER_ADVICE_V1 の変更
    • root advisory producer の schema変更
    • temp_residue_marker.py
    • temp_residue_classifier.py
    • legacy .claude/tmp/ residue の削除
    • Codex source-bound capture の active wiring 再導入

    修正版 Acceptance Criteria

    1. eligibility producer/loader と readiness producer/loader の既定パスが、両方とも tmp/session-recording/ を使用する。
    2. source code 内の旧既定パスはゼロ件。文書上の旧パス言及は migration history と明示した箇所だけに限定する。
    3. 新しい親ディレクトリは non-symlink、owner 一致、mode 0700。artifact は regular file、non-symlink、mode 0600。
    4. env override は absolute path のみ受理するか、producer/consumer の双方で repo root 基準に統一する。
    5. isolated fixture で eligibility を生成し、readiness を bootstrap し、gated capture producer を起動する。sidecar の eligibility/readiness reason code が双方 ok になる。
    6. 旧パスにだけ artifact がある場合は消費せず、固定 missing reason を返す。暗黙の dual-read fallback は導入しない。
    7. policy digest/producer digest 更新後の artifact 再生成順をテストと文書で固定する。
    8. Claude の ungated raw-payload capture regression test は引き続き成功する。
    9. Runtime Verification Applicability は immediate。ただし live Codex active/trust の成功は主張しない。

    advisory contract は別 Issue で V2 migration にする

    V1 は変更せず凍結し、V2 で「書込先」と「legacy 認識先」を分離するのが自然です。

    schema: REPO_TEMP_FOLDER_ADVICE_V2
    approved_write_roots:
      - tmp/
    deprecated_legacy_roots:
      - .claude/tmp/
    approved_replacement: tmp/
    block: false

    V2 Issue では schema catalog、consumer inventory、producer、Claude/Codex wrapper、hook docs、folder policy、cleanup docs、V1/V2 migration tests を同時に変更します。

    marker/classifier は引き続き .claude/tmp/ を認識し、legacy residue の read/scan/report を維持します。approved_write_roots と recognized_legacy_roots は別概念です。


    修正版 Verification Commands の骨格

    # 旧 default location が実装から消えている
    ! rg -n '\.claude/tmp/session-recording' \
      scripts/session-recording/bootstrap-source-bound-readiness.mjs \
      .claude/hooks/capture_scope_rollup_final_response.py \
      .claude/scripts/check_session_recording_runtime_safety.py
    
    # 新 fixed location の producer-consumer round trip
    uv run --locked pytest \
      .claude/hooks/tests/test_scope_rollup_capture.py \
      -q -k 'default_fixed_location_cutover or old_default_location_not_consumed or source_bound_default_path_roundtrip'
    
    # Claude ungated route の回帰防止
    uv run --locked pytest \
      .claude/hooks/tests/test_scope_rollup_capture.py \
      -q -k 'claude_coordinator_raw_payload'
    
    # legacy read/scan contract が壊れていない
    uv run --locked pytest \
      tests/agent_ops/test_temp_residue_classifier.py \
      scripts/agent-guards/tests/test_root_temporary_residue_policy.py \
      tests/codex/test_root_temporary_residue_advisory.py \
      -q
    
    pnpm policy:check:session
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    最終結論

    現行 #2004 のままでは、schema branch、marker/classifier branch、fixed-location branchのどれを選んでも Allowed Paths または Stop Conditions に違反します。

    着手前に最低限、次の三点を修正する必要があります。

    1. eligibility と readiness を同時移行する
    2. marker/classifier を 実装: source-bound eligibility/readiness の固定 private location を tmp/session-recording/ へ同時移行する #2004 から除外し、legacy read/scan/report を維持する
    3. advice schema の一値化を V2 migration の別 Issue に分離する

    現行契約に対する implementation verdict は BLOCKED です。

  3. changed the title [-]実装: session-recording writer と advisory producer を .claude/tmp/ から tmp/ へ移行する(Issue #1995 follow-up)[/-] [+]実装: source-bound eligibility/readiness の固定 private location を tmp/session-recording/ へ同時移行する[/+] on Aug 6, 2026
  4. squne121 commented on Aug 6, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-08-06T13:05:50Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/2004
      body_sha256: "sha256:faa05365bd65cbf11db78241e317138e97524ed51e3bea545fd07ce87503da1f"
      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:faa05365bd65cbf11db78241e317138e97524ed51e3bea545fd07ce87503da1f","source_provenance":{"source_type":"body_file","body_file":"/tmp/contract_review_once_body_4ijhk9rr.md"}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_default_fixed_location_producer_paths -q","command_hash":"sha256:6f77d26bb6f128cc78fdc36a921f6011223bb1d4f5afceae169435688d74e1a8","execution_key_hash":"sha256:2425e680d5da99b26a1ee9b77a6f5264948cbb34f1edf685529e8bbcb59d06a7","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: tests/session-recording/test_fixed_location_cutover.py::test_default_fixed_location_producer_paths"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":180,"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":5,"raw_command":"! rg -nP \"['\\\"]\\.claude['\\\"]\\s*[,/]\\s*['\\\"]tmp['\\\"]\" scripts/session-recording/bootstrap-source-bound-readiness.mjs .claude/hooks/capture_scope_rollup_final_response.py .claude/scripts/check_session_recording_runtime_safety.py","command_hash":"sha256:6d3224fe55aa89f988aaa42cec4b0ab09beea27ce0993637be9b8189b89d005a","execution_key_hash":null,"runner":"exec","exit_code":null,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"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":8,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_new_private_directory_and_artifact_mode -q","command_hash":"sha256:ea833c41da62374e922b2be3fe00911a41aeeda8bdd944b759073583324aeb85","execution_key_hash":"sha256:ab0d6cafde934ab6f1be74ecf52be82086e7398ecebf1bf5a64c6cbbf7b55189","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: tests/session-recording/test_fixed_location_cutover.py::test_new_private_directory_and_artifact_mode"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":188,"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":11,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_env_override_repo_root_normalized -q","command_hash":"sha256:29061364ab4cf02a8f3d6e4f114195cc9458c521e8dbabd536716546a308540c","execution_key_hash":"sha256:02cd49b71d5e6bbbb104d66406e9020c69cda6e579d150107bd25d311c1ceba1","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: tests/session-recording/test_fixed_location_cutover.py::test_env_override_repo_root_normalized"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":169,"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":14,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_source_bound_default_path_roundtrip -q","command_hash":"sha256:e3d1ab0162af6f9b285734d652aa7e750c1789f68ff8d37d0761e804ddf2a641","execution_key_hash":"sha256:06144f1805b79905b926e17d3050f19e521de7bc7e6b4cb5604da8168a1c7641","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: tests/session-recording/test_fixed_location_cutover.py::test_source_bound_default_path_roundtrip"],"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":"AC6","line":17,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_old_default_location_not_consumed -q","command_hash":"sha256:5ebb389f4e794f9c7a1c581a18be5d6f2ef2bf81b51aa9767c0cf600879098e0","execution_key_hash":"sha256:9033e09cd19a9f8c4f99302793bd491271a88627a11aaeaed2ec797d414807da","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: tests/session-recording/test_fixed_location_cutover.py::test_old_default_location_not_consumed"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":188,"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":20,"raw_command":"uv run --locked pytest tests/session-recording/test_fixed_location_cutover.py::test_digest_update_regeneration_order -q","command_hash":"sha256:02ab80e00bbffdb69bbe25c3af2ba26b426776f497127ee684adbd4ce7e677cb","execution_key_hash":"sha256:4b0a08a9189332e6a5cda6c8712cf44b6277b4041390f30c1b02dbc4c12d2441","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: tests/session-recording/test_fixed_location_cutover.py::test_digest_update_regeneration_order"],"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":"AC8","line":24,"raw_command":"uv run --locked pytest .claude/hooks/tests/test_scope_rollup_capture.py -q -k claude_coordinator_raw_payload","command_hash":"sha256:d99bcc6faf88841a63289b4d009ce8d320d2ac067dfa85638cf8957c9b2d5d9a","execution_key_hash":"sha256:52a48957cb40a2cc317d867c76f81606083f226c5a1649ba53f546d6ca070965","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[".                                                                        [100%]","1 passed, 12 deselected in 0.20s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":370,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":23,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC8","line":26,"raw_command":"uv run --locked pytest tests/agent_ops/test_temp_residue_classifier.py scripts/agent-guards/tests/test_root_temporary_residue_policy.py tests/codex/test_root_temporary_residue_advisory.py -q","command_hash":"sha256:0f85e34b17aeb9acb629bae683b00888e1858d3d6f2fc9aeb3d73ae23df9e9d0","execution_key_hash":"sha256:05ba54ded243afcf846b5166e402468b2a84eece755dafe82ac2a58f8b7bb2f7","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["........................................................................ [ 87%]","..........                                                               [100%]","82 passed in 1.53s"],"stdout_truncated":false,"stdout_original_line_count":4,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":1737,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":25,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC8","line":29,"raw_command":"pnpm typecheck","command_hash":"sha256:1b65adab2d69e0f148ddd11c15c7dcd73ca087b66cc02dac2672f9493093cc6d","execution_key_hash":"sha256:2a5548a6820835ccf2801bab7677ba19fb2791d6ca9112a30085c72c15c3910b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":["$ tsc --noEmit"],"stderr_truncated":false,"stderr_original_line_count":2,"runner_env_delta":{"CI":"true"},"duration_ms":981,"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,"pnpm_gate_evidence_required":true,"pnpm_gate_evidence":{"schema":"pnpm_gate_evidence/v1","gate_id":"pnpm.typecheck.v1","exact_request_argv":["pnpm","typecheck"],"launch_argv":["/home/squne/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/corepack/dist/pnpm.js","run","typecheck"],"runner_env_delta":{"CI":"true"},"manifest_path":"/home/squne/projects/LOOP_PROTOCOL/package.json","manifest_integrity_digest":"sha256:db2e25fc7dae3882ed2b85e1e039f8e5c87512d058ffc8ae4775142faf426c6a","validator_digest":"sha256:170b449efe5e974158481604bc5f94bd57935e18257143a2d3970b98263cc096"}},{"ac":"AC8","line":30,"raw_command":"pnpm lint","command_hash":"sha256:ede823a2d5f2814db6ddd8a2969504d513bf5a4428b806aa4d1a0499fb38462f","execution_key_hash":"sha256:7a4c20d4033efe9c052fc543447fd408f14a6e9b022e920968da7eeb9f140ce3","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":["$ eslint ."],"stderr_truncated":false,"stderr_original_line_count":2,"runner_env_delta":{"CI":"true"},"duration_ms":4589,"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,"pnpm_gate_evidence_required":true,"pnpm_gate_evidence":{"schema":"pnpm_gate_evidence/v1","gate_id":"pnpm.lint.v1","exact_request_argv":["pnpm","lint"],"launch_argv":["/home/squne/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/corepack/dist/pnpm.js","run","lint"],"runner_env_delta":{"CI":"true"},"manifest_path":"/home/squne/projects/LOOP_PROTOCOL/package.json","manifest_integrity_digest":"sha256:bffbd84769f6a3a529a69a91c07b702779a76e614ec09c7c397c2cc3a027cd30","validator_digest":"sha256:170b449efe5e974158481604bc5f94bd57935e18257143a2d3970b98263cc096"}},{"ac":"AC8","line":31,"raw_command":"pnpm test","command_hash":"sha256:ae7aca4de98e885127fe392c0b60056f3472ed0f0be972870a06df422b3f140a","execution_key_hash":"sha256:e197d1c4254971cc2b9021586f41bd6453b19b15a95f08af50f04f8152200fba","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[" RUN  v4.1.6 /home/squne/projects/LOOP_PROTOCOL"," Test Files  108 passed (108)","      Tests  1856 passed (1856)","   Start at  22:05:15","   Duration  14.65s (transform 21.47s, setup 0ms, import 34.32s, tests 137.05s, environment 9.60s)"],"stdout_truncated":false,"stdout_original_line_count":10,"stderr_head":["$ vitest run --exclude 'tests/e2e/**' --exclude 'tests/component/**' --exclude '.claude/worktrees/**' --exclude '.claude/tmp/**' --exclude 'tmp/**'"],"stderr_truncated":false,"stderr_original_line_count":2,"runner_env_delta":{"CI":"true"},"duration_ms":15398,"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,"pnpm_gate_evidence_required":true,"pnpm_gate_evidence":{"schema":"pnpm_gate_evidence/v1","gate_id":"pnpm.test.v1","exact_request_argv":["pnpm","test"],"launch_argv":["/home/squne/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/corepack/dist/pnpm.js","run","test"],"runner_env_delta":{"CI":"true"},"manifest_path":"/home/squne/projects/LOOP_PROTOCOL/package.json","manifest_integrity_digest":"sha256:e1d15b364034f4dad94733c56e5f4c4c2150a698e1a88aff485c22fd5534a33c","validator_digest":"sha256:170b449efe5e974158481604bc5f94bd57935e18257143a2d3970b98263cc096"}},{"ac":"AC8","line":32,"raw_command":"pnpm build","command_hash":"sha256:702e948d947e109310cb2bf19c157b5bb8142b88c87e02ae87a7594c9b797893","execution_key_hash":"sha256:cc287d18a4a29b399a8cd3a50ca464e1a5496a446332b2ef0897b1e674c8182c","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["\u001b[36mvite v8.0.13 \u001b[32mbuilding client environment for production...\u001b[36m\u001b[39m","\u001b[2K","transforming...✓ 43 modules transformed.","rendering chunks...","computing gzip size...","dist/index.html                  0.46 kB │ gzip:  0.29 kB","dist/assets/index-oeiGE_cs.css   5.00 kB │ gzip:  1.74 kB","dist/assets/index-D--ksE14.js   70.47 kB │ gzip: 21.25 kB","\u001b[32m✓ built in 53ms\u001b[39m"],"stdout_truncated":false,"stdout_original_line_count":11,"stderr_head":["$ tsc && vite build"],"stderr_truncated":false,"stderr_original_line_count":2,"runner_env_delta":{"CI":"true"},"duration_ms":1170,"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,"pnpm_gate_evidence_required":true,"pnpm_gate_evidence":{"schema":"pnpm_gate_evidence/v1","gate_id":"pnpm.build.v1","exact_request_argv":["pnpm","build"],"launch_argv":["/home/squne/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/corepack/dist/pnpm.js","run","build"],"runner_env_delta":{"CI":"true"},"manifest_path":"/home/squne/projects/LOOP_PROTOCOL/package.json","manifest_integrity_digest":"sha256:5cd459743411275f0df5594c3f96de7140420a3a4535fb9a46352435215eccda","validator_digest":"sha256:170b449efe5e974158481604bc5f94bd57935e18257143a2d3970b98263cc096"}}]
        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":"e00e5f41ca18dbc660b42c0ede9907934832bd3b","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":2003,"title":"test(e2e): PR #1984 pause-dialog/result-surface 追従の残存差分を修正","base_ref_name":"main","head_ref_name":"worktree-issue-1986-e2e-followup-1984","head_ref_oid":"514a4b9aaf2c44b6cf4a430c998950fc6181bda9","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2003","changed_files_count_graphql":2},{"number":2005,"title":"実装: codebase-investigator/web-researcher を AGY-only provider route へ固定する","base_ref_name":"main","head_ref_name":"worktree-issue-1886-codebase-investigator-web-researcher-del","head_ref_oid":"4a648d3da35db8f856c086b0f4746803f2672ebd","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2005","changed_files_count_graphql":14},{"number":2006,"title":"実装: combat HUD の配置・safe-zone・情報優先度を実装する (#1958)","base_ref_name":"main","head_ref_name":"worktree-issue-1958-combat-hud-safe-zone","head_ref_oid":"5e2054ef60ac55dfc4008de1fd3348ccd864fde0","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/2006","changed_files_count_graphql":9}],"fetched_count":4,"totalCount":4,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:09df4fa17ec9aeea55bbe8d3f5eeefbadaddb55ca150d3c7a1c960ea2b993d3e","errors":[]},"inventory_digest_extended":"sha256:fb7290b12658ca19abea7af8cd7a0c8235b5437cae08fc5a8dbaa8b25c1c531d","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":2004,"contract_source_kind":"issue_comment","contract_source_id":"5205005090","contract_body_sha256":"sha256:faa05365bd65cbf11db78241e317138e97524ed51e3bea545fd07ce87503da1f","allowed_paths_normalized_sha256":"cab88fd9a1579490693d0568713bce6f448beb35a618adad66638927928cc82e","base_ref":"main","base_sha_at_snapshot":"e00e5f41ca18dbc660b42c0ede9907934832bd3b"}
  5. squne121 commented on Aug 6, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: approved

    Issue #2004 は issue-refinement-loop(自律 3 iteration、人間承認不要モード)で approved 終了しました。

    経緯

    Final Gate

    issue-contract-review(run_contract_review_once.py --mode execute)を実行し、CONTRACT_REVIEW_RESULT_V1.status: go を確認しました。全 8 AC の VC preflight が go 判定(AC1/AC3〜AC7 は baseline で expected collection error, AC2 は baseline で expected negation-fail, AC8 の regression gate 6 コマンドは baseline で実際に PASS)。fresh go snapshot コメントを Issue に投稿し、body_sha256 が現在の Issue 本文と一致することを確認しました。

    Follow-up

    OWNER が指摘した REPO_TEMP_FOLDER_ADVICE_V1 schema の破壊的変更(一値化)を、follow-up Issue #2007(実装: REPO_TEMP_FOLDER_ADVICE_V2 schema と write-root/legacy-root 分離を導入する)として分離・起票しました。

    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/2004#issuecomment-5205005090"
        generated_at: "2026-08-06T13:05:50Z"
        body_sha256: "sha256:faa05365bd65cbf11db78241e317138e97524ed51e3bea545fd07ce87503da1f"
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: "2026-08-06T13:05:50Z"
      checked_body_sha256: "sha256:faa05365bd65cbf11db78241e317138e97524ed51e3bea545fd07ce87503da1f"
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []

    FOLLOW_UP_MATERIALIZATION_RESULT_V1

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues:
        - request_dedupe_key: "follow-up:squne121/loop-protocol:issue-2004-anchor-comment-5204465943:schema-v2-migration"
          status: created
          issue:
            number: 2007
            url: "https://github.com/squne121/loop-protocol/issues/2007"
          reason: null
      note_only_observations: []
  6. self-assigned this
    on Aug 6, 2026
  7. squne121 commented on Aug 7, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-08-07T10:11:16Z)

    • PR: 実装: source-bound eligibility/readiness の固定 private location を tmp/session-recording/ へ同時移行する #2008
    • Worktree: .claude/worktrees/issue-2004-source-bound-eligibility-readiness-priva
    • Branch: worktree-issue-2004-source-bound-eligibility-readiness-priva
    • Verification: pnpm typecheck/lint/test/build 4/4 PASS。AC1・AC3-AC7 の新規 pytest(tests/session-recording/test_fixed_location_cutover.py、6 tests)PASS。AC8 既存回帰テスト(claude_coordinator_raw_payload、temp_residue 系、計 83 tests)PASS。
    • Allowed Paths: 遵守(.claude/hooks/capture_scope_rollup_final_response.py、.claude/scripts/check_session_recording_runtime_safety.py、docs/dev/session-recording-policy.md、scripts/session-recording/bootstrap-source-bound-readiness.mjs、tests/session-recording/ のみ変更。package.json は変更不要と判断)
    • Stop Condition: なし
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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