Skip to content

実装: runtime_only VC の repository PreToolUse guard 互換性を Step 2 で早期検証する #2824

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "runtime_only VC が current repository-owned PreToolUse guard に決定論的に拒否される場合、semantic review まで持ち越さず deterministic contract review で早期に needs-fix として返し、refinement iteration を無駄に消費しない"
change_kind: workflow
dedupe_key: "issue-refinement:runtime-vc-pretool-guard-compatibility:v1"

Parent Issue

none(Issue #2810 の refinement max-iteration 到達から発見した独立 recurrence-prevention follow-up)。

Parent Goal Ref

Current Validated Scope

2026-09-28 current main eb7abf5dd44ac7475eb05f575cb6dcdbca3a45b9 と live #2810 / repository contract を確認した。

Remaining Parent Gaps

Outcome

# preflight-scope: runtime_only 付き VC でも、current repository-owned deterministic PreToolUse/Bash guard がその literal command を拒否することを secret-free synthetic input で再現できる場合は、baseline execution を行わず deterministic review が needs-fix を返し、guard-safe な command shape へ rewrite されてから semantic review に進む状態。

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本変更は repository-owned hook script に synthetic PreToolUse JSON を与える deterministic local check と focused pytest で完結し、Claude Code session / credential / network / external runtime を必要としないため。

In Scope

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
    • runtime_only を即 skipped/go に確定する前に、VC の literal Bash command を current repository-owned .claude/hooks/secret_boundary_guard.sh の synthetic secret-free PreToolUse input で評価する narrow compatibility check を追加する。
    • hook exit 2 の場合は VC 本体を実行せず、既存 result contract 内で deterministic needs-fix / blocking classification と fix hint を返す。
    • hook exit 0 の場合は既存 runtime_only の skipped/go semantics を維持する。
    • hook 実行時に actual env dump / secret / credential / sensitive file を読み出さない。payload は tool_name=Bash と Issue body 由来の literal command だけを含める。
  • .claude/skills/issue-contract-review/tests/
  • .claude/skills/create-issue/references/body-authoring.md
    • # preflight-scope: runtime_only は「baseline で実行しない」指定であり、current repository-owned deterministic PreToolUse deny を無視する免除ではないことを明記する。

Out of Scope

Acceptance Criteria

  • AC1: runtime_only VC の literal Bash command は、skipped/go を確定する前に current repository-owned secret_boundary_guard.sh へ synthetic secret-free PreToolUse payload として渡され、hook exit 2 は deterministic non-go / needs-fix になる。VC command 自体は baseline で実行されない。
  • AC2: 実装: Claude-GPT model/proxy 更新の runtime migration を完了工程に含め、人間介入を genuine blocker に限定する #2810 で late semantic blocker になった env -u CLAUDE_GPT_PROXY_BIN bash scripts/claude-gpt/launch.sh --check-only fixture は、semantic review を必要とせず deterministic check で拒否される。
  • AC3: guard-safe replacement bash -c 'unset CLAUDE_GPT_PROXY_BIN; bash scripts/claude-gpt/launch.sh --check-only' fixture は guard compatibility check を通過し、従来の runtime_only skipped/go と verification_owner=impl-review-loop / runtime_verification_required=true を維持する。
  • AC4: runtime_only でない既存 VC、ならびに guard exit 0 の既存 runtime_only VC の classification / baseline semantics を変更しない focused regression がある。
  • AC5: synthetic hook check は Issue body 由来の literal command と固定 tool_name=Bash 以外の secret/env value を payload に入れず、actual command execution、credential access、sensitive file read を行わない。
  • AC6: hook script が unavailable / malformed / unexpected exit を返す場合は silent approve せず、既存 contract の fail-closed categoryへ写像する。新 schema family は追加しない。
  • AC7: body-authoring.md は runtime_only marker が repository-owned deterministic PreToolUse deny の免除ではないことと、deny 時は guard-safe equivalent command shape へ rewrite することを明記する。
  • AC8: issue-contract-review の既存 test suite が回帰しない。

Verification Commands

# AC1-AC6
# baseline-expect: fail
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_runtime_vc_pretool_guard_compatibility.py -q

# AC7
# baseline-expect: fail
$ rg -n "runtime_only.*PreToolUse|PreToolUse.*runtime_only|deterministic.*guard" .claude/skills/create-issue/references/body-authoring.md

# AC8
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/ -q

# AC7 / regression
$ uv run --locked pytest .claude/skills/create-issue/tests/ -q

Allowed Paths

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
  • .claude/skills/issue-contract-review/tests/
  • .claude/skills/create-issue/references/body-authoring.md
  • .claude/skills/create-issue/tests/

Stop Conditions

Required Skills

なし

Required Design References

Scope Delta(任意)

N/A

Related

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    triage-required
    on Sep 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