Skip to content

実装: issue-refinement-loop の control-plane を local root から起動できない guard 前提を read-only preflight profile で解消する #1228

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop の control-plane(planner/preflight) が local root default branch から起動できず planner SSOT routing を bypass せざるを得ない friction を解消する"
change_kind: code

Parent Issue

none

Parent Goal Ref

  • Goal: N/A(単独改善のため parent tracker なし)
  • Desired Destination: N/A

Current Validated Scope

  • scripts/agent-guards/skill_runtime_command_policy.py の is_exact_skill_runtime_executor_command から read-only preflight.run の worktree binding と active_issue_worktree_missing 前提を外す。ただし issue-number は exact argv から取り、resolve_active_issue() の汎用 semantics は変更しない
  • scripts/agent-guards/skill_runtime_exec.py の _validate_runtime_context を read-only preflight.run 用に修正し、canonical root / default branch / repo binding / artifact-only write は維持しつつ worktree 要求を外す
  • real PreToolUse hook chain で must-allow(no-worktree / no-env の preflight allow)と must-block(direct preflight・非 exact argv・mutation・artifact 外 write)を検証する adversarial harness を scripts/agent-guards/tests/ に追加する
  • local_main_branch_guard と worktree_scope_guard の両方で no-worktree read-only preflight.run が split-brain なく扱われることを確認し、必要なら同一 exact executor 契約で parity 修正する
  • 既存 guard テスト(.claude/hooks/tests/test_local_main_branch_guard.py / tests/codex/test_local_main_branch_guard.py / .claude/hooks/tests/test_worktree_scope_guard.py)へ no-worktree allow ケースを反映する
  • reviewer 指摘に対応するため docs/dev/agent-skill-boundaries.md を 実装: issue-refinement-loop の control-plane を local root から起動できない guard 前提を read-only preflight profile で解消する #1228 の no-worktree read-only preflight 仕様へ同期する

Remaining Parent Gaps

Outcome

skill_runtime_command_policy.py と skill_runtime_exec.py が修正され、main session(local root checkout・default branch・対象 issue の linked worktree 無し・LOOP_ISSUE_NUMBER 未設定)から exact command uv run python3 scripts/agent-guards/skill_runtime_exec.py --command-id preflight.run --issue-number <N> --repo squne121/loop-protocol を実行したとき、real PreToolUse hook chain で local_main_branch_guard と worktree_scope_guard が block せず refinement preflight が read-only で起動する状態。must-block 不変条件(direct run_refinement_preflight.py ブロック維持・非 exact argv ブロック維持・mutation/compound ブロック維持・repo tree outside allowed artifact root への write fail-close 維持)は保持され、real PreToolUse hook chain を用いた adversarial harness(must-allow / must-block 両軸)が PASS した PR がマージされた状態。

In Scope

  • preflight.run だけに限定して、is_exact_skill_runtime_executor_command / _validate_runtime_context から worktree 存在要求(active_issue_worktree_missing)と LOOP_ISSUE_NUMBER env 一致要求を外す
  • canonical root / default branch / repo binding / exact argv / network_effect: github_read_only / artifact-only write の各不変条件は維持する
  • 実 hook 経路(stdin JSON を渡した real PreToolUse chain)で must-allow(no-worktree / no-env の preflight.run)と must-block(direct preflight・非 exact argv・mutation/compound・wrong repo・artifact root 外 write)の両軸を検証する adversarial harness 追加
  • .claude/hooks/worktree_scope_guard.py / .claude/hooks/tests/test_worktree_scope_guard.py について、既存 exact skill runtime executor command class が no-worktree / no-env の preflight.run を block しないことを確認し、必要なら同一 reason code / 同一 parser contract で parity 修正する
  • 既存 guard テスト(.claude/hooks/tests/test_local_main_branch_guard.py / tests/codex/test_local_main_branch_guard.py / .claude/hooks/tests/test_worktree_scope_guard.py)の no-worktree allow ケース反映と回帰維持
  • docs/dev/agent-skill-boundaries.md の Privileged Skill Runtime Command Boundary を 実装: issue-refinement-loop の control-plane を local root から起動できない guard 前提を read-only preflight profile で解消する #1228 の最終仕様に同期する

Out of Scope

Acceptance Criteria

  • AC1a: 対象 issue の linked worktree 不在かつ LOOP_ISSUE_NUMBER 未設定でも、canonical root / default branch / exact preflight.run が real PreToolUse hook chain の local_main_branch_guard 経路で allow される
  • AC1b: 同条件の exact preflight.run が real PreToolUse hook chain の worktree_scope_guard 経路でも block されない
  • AC1c: direct uv run python3 .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py --issue-number 1228 --repo squne121/loop-protocol は root から block され続ける
  • AC1d: non-exact executor argv(--command-id 相違、余剰 / 欠落 / 重複フラグ、--flag=value、leading env、metachar、wrong repo、non-default branch、detached HEAD)は block される
  • AC1e: skill_runtime_exec.py の child が .claude/artifacts/issue-refinement-loop/1228/ 外へ write した場合、artifact-only write postcondition が fail-close する
  • AC2: 既存 claude hook guard テスト .claude/hooks/tests/test_local_main_branch_guard.py が回帰なく PASS する
  • AC3: 既存 codex guard テスト tests/codex/test_local_main_branch_guard.py が回帰なく PASS する
  • AC4: uv run pytest .claude/hooks/tests/test_worktree_scope_guard.py -k "skill_runtime_executor" -v が PASS する
  • AC5: pnpm typecheck が PASS する
  • AC6: pnpm lint が PASS する
  • AC7: pnpm test が PASS する
  • AC8: pnpm build が PASS する

Verification Commands

# AC1a
# baseline-expect: deferred
$ uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -k "local_main_branch_guard" -v

# AC1b
# baseline-expect: deferred
$ uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -k "worktree_scope_guard" -v

# AC1c
# baseline-expect: deferred
$ uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -k "direct_preflight_block" -v

# AC1d
# baseline-expect: deferred
$ uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -k "non_exact_executor_argv" -v

# AC1e
# baseline-expect: deferred
$ uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -k "artifact_only_write_postcondition" -v

# AC2
# baseline-expect: pass
$ uv run pytest .claude/hooks/tests/test_local_main_branch_guard.py -v

# AC3
# baseline-expect: pass
$ uv run pytest tests/codex/test_local_main_branch_guard.py -v

# AC4
# baseline-expect: pass
$ uv run pytest .claude/hooks/tests/test_worktree_scope_guard.py -k "skill_runtime_executor" -v

# AC5
# baseline-expect: pass
$ pnpm typecheck

# AC6
# baseline-expect: pass
$ pnpm lint

# AC7
# baseline-expect: pass
$ pnpm test

# AC8
# baseline-expect: pass
$ pnpm build

Runtime Verification Applicability

decision: immediate
applicable_acs:
  - AC1a
  - AC1b
  - AC1c
  - AC1d
  - AC1e
execution_environment:
  cli_tools:
    - python3
    - uv
    - git
  auth_required: false
  network_required: false
skip_conditions:
  - "local repository checkout が存在しない場合は SKIP ではなく environment blocked として扱う"
  - "real PreToolUse hook chain を subprocess で再現できない場合は PASS 扱いせず block として扱う"
fallback_policy:
  fallback_success_is_pass: false
  notes: "関数直接呼び出しや簡略ハーネス成功を runtime AC PASS に変換しない"
artifact_requirements:
  - "scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py の pytest 出力"
  - ".claude/hooks/tests/test_local_main_branch_guard.py の pytest 出力"
  - ".claude/hooks/tests/test_worktree_scope_guard.py -k \"skill_runtime_executor\" の pytest 出力"
reason: PreToolUse guard の判定挙動を変更するため、real hook chain(stdin JSON・実 git 状態: default branch root / worktree 不在)での allow/block 検証が必須。local_main_branch_guard だけでなく worktree_scope_guard との parity も実経路で確認しないと split-brain を見落とす。

Allowed Paths

  • scripts/agent-guards/skill_runtime_command_policy.py
  • scripts/agent-guards/skill_runtime_exec.py
  • scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py
  • .claude/hooks/worktree_scope_guard.py
  • .claude/hooks/tests/test_worktree_scope_guard.py
  • .claude/hooks/tests/test_local_main_branch_guard.py
  • tests/codex/test_local_main_branch_guard.py
  • docs/dev/agent-skill-boundaries.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • preflight.run 以外の command_id を worktree-free allow する必要が判明した場合
  • resolve_active_issue() の汎用 semantics を変更しないと成立しない場合
  • local_main_branch_guard / worktree_scope_guard の allow 判定が一致しない場合
  • read-only 前提を外すことで mutation 経路の allow が混入するなど security 境界の後退が判明した場合
  • codex parity(tests/codex/)の修正が非自明に大きくなり別 Issue 分離が妥当と判明した場合

Required Skills

なし

Scope Delta(任意)

  • reviewer comment #4825999581 に対応し、仕様同期用に docs/dev/agent-skill-boundaries.md を Allowed Paths へ追加

Notes for Reviewer

  • canonical fix 点として「privileged executor の preflight.run profile を worktree-free read-only に修正」を採用している。parse_exact_skill_runtime_command() の exact argv contract は緩めず、preflight.run 以外の root allow へ一般化しない
  • resolve_active_issue() は既存の active issue worktree 前提を他 command / test / reason code に提供しているため、本 Issue では汎用 helper を緩めず preflight.run 専用の issue source を分離して扱う前提でレビューする
  • security boundary として、canonical root / default branch / trusted repo binding / registry validation / network_effect: github_read_only / artifact-only write postcondition を維持する。direct run_refinement_preflight.py root 実行、registry 全件自動 allow、.claude/skills/**/*.py blanket allow、hook disable / bypass は不採用
  • 実装: docs/product/features/upgrade.md を新規作成し Upgrade Loop の正本 spec を定義する #1170 の refinement 実行時に本 friction が顕在化し、control-plane が planner(run_refinement_preflight.py / plan_refinement_loop.py)を bypass して downstream checker を直接実行する回避を強いられた

Activity

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

    @squne121
    OwnerAuthor

    結論

    Issue #1228 は 目的は妥当です。現行実装では preflight.run が「root checkout / default branch / repo binding / exact argv」までは満たしていても、LOOP_ISSUE_NUMBER と linked issue worktree の存在を要求しているため、Issue 本文が言う「local root default branch から planner/preflight を起動したい」経路と矛盾しています。該当箇所は明確で、is_exact_skill_runtime_executor_command() が active_issue == parsed.issue_number and entry is not None を要求し、_validate_runtime_context() も active_issue_mismatch / active_issue_worktree_missing で落とします。

    ただし、この Issue はそのまま実装投入すると security boundary を誤って緩める危険があります。特に「read-only profile」を新設するなら、単に worktree / env 要求を外すだけでは不十分です。preflight.run 専用の exact executor 境界、direct preflight block、artifact-only write postcondition、repo binding、default branch binding、shell/argv negative fixture を維持する必要があります。


    参照した主要文脈

    Issue #1228 は、skill_runtime_command_policy.py と skill_runtime_exec.py の preflight.run だけを worktree-free read-only にする実装 Issue です。AC1 は real PreToolUse hook chain で no-worktree / no-env の allow と、direct preflight・非 exact argv・mutation・artifact 外 write の block を要求しています。

    前身の #1154 は、preflight.run 専用 privileged executor を root checkout から安全実行するための Issue で、preflight.run 以外の root allow、registry 全件自動許可、.claude/skills/**/*.py blanket allow、hook disable / bypass を明確に Out of Scope にしています。

    PR #1177 は #1154 の実装 PR で、preflight.run exact privileged executor、Claude/Codex guard parity、active issue / repo binding、artifact subtree boundary を安全 claim として実装した merged PR です。 その過程で Codex parity test が古い direct-preflight allowlist expectation のまま失敗し、tests/codex/test_local_main_branch_guard.py を exact executor 契約へ更新する必要がレビューで指摘されています。

    #1147 は post-merge-cleanup の root checkout mutation 問題で、git checkout/pull/branch -d/worktree remove のような mutation 経路を扱う別問題です。#1228 本文が Out of Scope として分離している判断は正しいです。


    敵対的レビュー

    P0-1: resolve_active_issue() の意味を壊さず、preflight.run 専用の issue source を分離すべき

    現行 resolve_active_issue() は LOOP_ISSUE_NUMBER を読み、さらに worktree catalog から該当 issue worktree を探します。 #1228 の目的は「issue-number は exact argv から取る」なので、ここを汎用的に緩めると危険です。

    避けるべき実装:

    def resolve_active_issue(...):
        issue = os.environ.get("LOOP_ISSUE_NUMBER") or parsed.issue_number
        return issue, None

    これは既存の「active issue worktree があること」を前提にした他 command / test / reason code を汚染します。

    推奨:

    preflight.run だけに限定した helper を追加します。

    def command_issue_number_for_readonly_preflight(parsed: ExactSkillRuntimeCommand) -> str:
        if parsed.command_id != "preflight.run":
            raise ValueError("not_readonly_preflight")
        return parsed.issue_number

    そして is_exact_skill_runtime_executor_command() と _validate_runtime_context() の中で、preflight.run のみ resolve_active_issue() を使わない分岐にする。既存の active issue worktree semantics は温存します。


    P0-2: Issue #1228 の AC1 は「artifact 外 write fail-close」を要求しているが、現 executor の postcondition は child 実行後検査であり、preflight の失敗時にも必ず検査されることを固定すべき

    skill_runtime_exec.py は child 実行前に repo snapshot / git status を取り、child 実行後に _find_unauthorized_repo_changes() で artifact root 外の変化を検出して return 2 します。 この設計は良いですが、#1228 では worktree-free 化により実行される場面が増えるため、以下を必須にしてください。

    • child が non-zero で終了しても unauthorized write check は必ず走る
    • artifact root parent symlink は拒否
    • .claude/artifacts/issue-refinement-loop/<issue>/ 以外の untracked / modified / deleted を fail-close
    • direct run_refinement_preflight.py は引き続き root allow しない

    現行コードは大枠でこの構造ですが、テストがこれを real hook + executor subprocess で検証しないと false green になります。


    P0-3: local_main_branch_guard.py だけでなく worktree_scope_guard.py との split-brain を検証対象に入れるべき

    Issue #1228 は Allowed Paths に .claude/hooks/worktree_scope_guard.py とそのテストを含めていません。しかし #1154 の元設計では、root allow は worktree_scope_guard.py と local_main_branch_guard.py の両方で parity を保つことが AC でした。

    #1228 の本文は「real PreToolUse hook chain(local_main_branch_guard.py に stdin JSON)」だけを要求していますが、実際の Claude hook chain で複数 guard が動くなら片側 allow / 片側 block の split-brain が起き得ます。Claude Code の PreToolUse は tool 実行前に JSON input を hook stdin へ渡し、複数 hook decision は deny が優先されます。([Claude Platform Docs]1) ([Claude Platform Docs]1)

    修正推奨:

    Allowed Paths に最低限これを追加するか、Stop Condition に「worktree_scope_guard 側変更が必要なら分割」と明記するだけではなく、実装前に probe する。

    - .claude/hooks/worktree_scope_guard.py
    - .claude/hooks/tests/test_worktree_scope_guard.py

    少なくとも AC に以下を追加:

    uv run pytest .claude/hooks/tests/test_worktree_scope_guard.py -k "skill_runtime_executor" -v

    P0-4: shlex.split() だけを安全性の根拠にしない。exact token sequence + shell operator block を維持する

    Python docs は subprocess で sequence args を渡す方が escaping / quoting を扱いやすいと説明していますが、shell string の分解は複雑で、shlex 自体も Unix shell 向けです。([Python documentation]2) ([Python documentation]3) 現行 parse_exact_skill_runtime_command() は shlex.split() の前に metachar / leading env を拒否し、token 数 10、token 位置、flag 形式、repo、command_id を固定しているため筋が良いです。

    #1228 の実装でここを「registry render と同じなら OK」のように広げるのは危険です。#1154 でも registry 全件自動許可は Out of Scope でした。


    Issue #1228 本文への修正提案

    1. In Scope に worktree_scope_guard parity を追加

    現状の In Scope は local_main_branch_guard.py 寄りです。実 hook chain で deny が優先される以上、片方だけの allow は実運用で失敗します。

    追加案:

    - `.claude/hooks/worktree_scope_guard.py` / `.claude/hooks/tests/test_worktree_scope_guard.py` について、既存 exact skill runtime executor command class が no-worktree / no-env の `preflight.run` を block しないことを確認し、必要なら同一 reason code / 同一 parser contract で parity 修正する

    2. AC1 を分割する

    今の AC1 が巨大で、実装者が検証を雑にまとめやすいです。

    推奨:

    - [ ] AC1a: no-worktree / no-env / root default branch / trusted repo / exact preflight.run が `local_main_branch_guard.py` real stdin JSON 経路で allow される
    - [ ] AC1b: 同条件が `worktree_scope_guard.py` real stdin JSON 経路でも block されない
    - [ ] AC1c: direct `run_refinement_preflight.py` は root から block される
    - [ ] AC1d: non-exact executor argv は block される
    - [ ] AC1e: child が artifact root 外へ write した場合、`skill_runtime_exec.py` が return 2 で fail-close する

    3. Stop Condition を少し厳格化

    追加:

    - `preflight.run` 以外の command_id を worktree-free allow する必要が判明した場合
    - `resolve_active_issue()` の汎用 semantics を変更しないと成立しない場合
    - `worktree_scope_guard` と `local_main_branch_guard` の allow 判定が一致しない場合

    推奨実装方針

    最小パッチ方針

    1. parse_exact_skill_runtime_command() は変更しない。
    2. is_exact_skill_runtime_executor_command() で parsed.command_id == "preflight.run" の場合だけ、resolve_active_issue() の要求をスキップする。
    3. _validate_runtime_context() も preflight.run の場合だけ LOOP_ISSUE_NUMBER / linked worktree 要求をスキップし、args.issue_number を artifact root に使う。
    4. validate_registry_entry() は維持。network_effect == github_read_only、allowed_write_roots、cwd_policy、argv template の検証を弱めない。
    5. real PreToolUse hook subprocess test を追加し、関数直接呼び出しだけで済ませない。
    6. no-worktree allow だけでなく、wrong repo / wrong branch / direct script / shell metachar / leading env / duplicate or missing flag / --flag=value / artifact 外 write を must-block として固定する。

    CodexCLI に依頼する次の推奨アクション

    対象: https://github.com/squne121/loop-protocol/issues/1228
    
    関連 Issue / PR / repository assets / comments を参照し、Issue #1228 を実装してください。目的は、issue-refinement-loop の `preflight.run` だけを local root checkout / default branch / linked issue worktree なし / LOOP_ISSUE_NUMBER 未設定でも read-only preflight として exact executor 経由で allow することです。
    
    必ず以下を守ってください。
    
    1. 変更対象
    - scripts/agent-guards/skill_runtime_command_policy.py
    - scripts/agent-guards/skill_runtime_exec.py
    - scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py
    - .claude/hooks/tests/test_local_main_branch_guard.py
    - tests/codex/test_local_main_branch_guard.py
    - 必要なら .claude/hooks/worktree_scope_guard.py と .claude/hooks/tests/test_worktree_scope_guard.py も検証し、片側 guard が block するなら Issue #1228 のスコープ修正または Stop Condition として報告してください。
    
    2. 実装方針
    - `preflight.run` 専用の exact privileged executor 境界を維持する。
    - `parse_exact_skill_runtime_command()` の exact argv contract は緩めない。
    - `preflight.run` のみ、`is_exact_skill_runtime_executor_command()` と `_validate_runtime_context()` から `LOOP_ISSUE_NUMBER` / linked issue worktree existence requirement を外す。
    - issue number は exact argv の `--issue-number <N>` から取得する。
    - canonical root / default branch / trusted repo binding / registry validation / `network_effect: github_read_only` / artifact-only write postcondition は維持する。
    - `resolve_active_issue()` の汎用 semantics は変更しない。既存の active issue worktree 前提を他 command に波及させない。
    - direct `.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py` root 実行は引き続き block。
    - registry 全件自動 allow、mutation: false 全件 allow、`.claude/skills/**/*.py` blanket allow、hook disable / bypass は禁止。
    
    3. 必須テスト
    新規 adversarial harness は real PreToolUse hook chain を subprocess で起動してください。関数直接呼び出しのみは禁止です。
    
    must-allow:
    - temp repo / origin remote = https://github.com/squne121/loop-protocol.git
    - root checkout on default branch
    - linked issue worktree なし
    - LOOP_ISSUE_NUMBER 未設定
    - cwd = canonical root
    - command:
      `uv run python3 scripts/agent-guards/skill_runtime_exec.py --command-id preflight.run --issue-number 1228 --repo squne121/loop-protocol`
    - `scripts/agent-guards/local_main_branch_guard.py` に stdin JSON を渡し exit 0 / allow reason を確認
    
    must-block:
    - direct `uv run python3 .claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py --issue-number 1228 --repo squne121/loop-protocol`
    - `--command-id` が `preflight.run` 以外
    - missing / extra / duplicate flags
    - `--flag=value` form
    - leading env assignment
    - shell metachar / pipe / redirect / chain
    - wrong repo
    - non-default branch / detached root
    - `skill_runtime_exec.py` child が `.claude/artifacts/issue-refinement-loop/1228/` 外へ write した場合の fail-close
    
    4. 検証コマンド
    以下を実行し、結果を PR body に貼ってください。
    
    uv run pytest scripts/agent-guards/tests/test_skill_runtime_preflight_no_worktree.py -v
    uv run pytest .claude/hooks/tests/test_local_main_branch_guard.py -v
    uv run pytest tests/codex/test_local_main_branch_guard.py -v
    uv run pytest .claude/hooks/tests/test_worktree_scope_guard.py -k "skill_runtime_executor" -v
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build
    
    5. PR 作成
    - branch: worktree-issue-1228-preflight-no-worktree-readonly
    - PR title: `fix(#1228): allow read-only preflight.run without linked worktree`
    - PR body には Safety Claim Matrix を含める。
    - `Closes #1228` を入れる。
    - Allowed Paths 外の変更が必要な場合は実装せず停止し、必要な follow-up Issue 草案を出してください。
    

    追加で起票を検討する follow-up

    Issue #1228 の中で worktree_scope_guard.py も触る必要が出た場合、スコープが広がります。その場合は次の follow-up を切る方が安全です。

    Title: 改善: skill_runtime_exec preflight.run の no-worktree read-only profile を Claude/Codex hook chain 全体で parity 検証する
    
    ## Problem
    #1228 は local_main_branch_guard 側の no-worktree allow を主対象にしているが、実際の PreToolUse chain では worktree_scope_guard も decision に参加し、deny が優先される。片側だけの allow では実運用の root preflight 起動が成立しない。
    
    ## Scope
    - .claude/hooks/worktree_scope_guard.py
    - .claude/hooks/tests/test_worktree_scope_guard.py
    - tests/codex/test_local_main_branch_guard.py
    - scripts/agent-guards/tests/*
    
    ## Acceptance Criteria
    - local_main_branch_guard / worktree_scope_guard / Codex parity tests が同じ exact command class を allow
    - direct preflight / non-exact argv / wrong repo / branch drift / artifact 外 write は全 guard 経路で block
    - real stdin JSON subprocess harness で検証

    現時点では、#1228 は 実装可。ただし worktree-free 化は preflight.run の read-only profile に閉じ、guard 全体の security boundary を広げないことが条件です。

  3. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T10:11:51Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:4e02a63f73979b7efea21407794a71c5b3fbf4058ebc1a23fff6d3577e59eca5"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  4. added 2 commits that reference this issue on Jun 28, 2026
  5. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T13:02:36Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:0934dd64536b4320a32dec8121cacdabe0a9e2ec05fcf855e396d6d002b19234"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_refresh_after_stale_snapshot
    
  6. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T13:02:36Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:0934dd64536b4320a32dec8121cacdabe0a9e2ec05fcf855e396d6d002b19234"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_refresh_after_stale_snapshot
    
  7. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T13:02:36Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:0934dd64536b4320a32dec8121cacdabe0a9e2ec05fcf855e396d6d002b19234"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_refresh_after_stale_snapshot
    
  8. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T13:02:36Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:0934dd64536b4320a32dec8121cacdabe0a9e2ec05fcf855e396d6d002b19234"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_refresh_after_stale_snapshot
    
  9. squne121 commented on Jun 28, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-28T13:02:36Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1228
      body_sha256: "sha256:0934dd64536b4320a32dec8121cacdabe0a9e2ec05fcf855e396d6d002b19234"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_refresh_after_stale_snapshot
  10. added a commit that references this issue on Jun 28, 2026
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