Repository navigation
Open
Labels
agent/implementerAI implementer agentenhancementNew feature or requestfollow-up後続 Issue として切り出された follow-upphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "VC の unsupported_shell_syntax が body-author-fixable にもかかわらず contract_readiness_human_judgment / operator intervention へ誤分類される readiness taxonomy gap を解消する"
change_kind: code
dedupe_key: "follow-up:squne121/loop-protocol:issue-2826:unsupported-shell-syntax-body-fixable-routing"Parent Issue
none(Issue #2826 の refinement 中に実測した standalone recurrence-prevention follow-up)。
Parent Goal Ref
- fix: baseline_vc_preflight.py の VC format contract と unsafe command policy を明文化・強制する #514 は
$(...)/ backtick /${...}をunsupported_shell_syntax / blockedとして subprocess 実行前に拒否する producer 契約を確立済み。 - 実装: route_canonical_step2_result() に verified failure_class ベースの operator intervention route を追加する #2397 は
contract_readiness_human_judgment/step_5_operator_intervention_requiredを genuinely operator-only な readiness 状態に限定し、body-fixable なcommand_not_allowedは Step 4 rewrite へ送る設計を確立済み。 - OPEN 再発防止: invalid baseline-expect annotation を body-author-fixable needs_fix として扱う #2760 は同じ recurrence class のうち
invalid_baseline_expect_annotationのみを所有しており、unsupported_shell_syntaxは所有していない。
Current Validated Scope
current main 070f99fc34605178791ccc4969dd3ac9614af6d3 では:
.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py::classify_static_command()が shell substitution を
classification=blocked / category=unsupported_shell_syntax / decision=blockedとし、
“use a direct command without command substitution” という body rewrite の fix hint を返す。.claude/skills/issue-contract-review/scripts/contract_readiness_check.pyの readiness mapping には
command_not_allowed -> needs_fixとvc_grep_syntax_error -> needs_fixが明示されている一方、
unsupported_shell_syntaxが存在しない。- そのため
unsupported_shell_syntaxは defaulthuman_judgmentに落ち、
failure_class=contract_readiness_human_judgmentを経由して canonical
step_5_operator_intervention_requiredを発生させる。 - 実装: refinement_approved signal で未 claim の Issue を FACT_TASK_IDENTITY_CONFLICT と誤報告しない #2826 で
test -z "$(git diff ...)"を AC7 VC に追加した際、この exact path が実際に発生し、
Issue 本文の VC を直接コマンドへ書き換えれば解消可能なのに refinement loop が terminal stop した。
Outcome
unsupported_shell_syntax は従来どおり subprocess 実行前に blocked のまま維持しつつ、
readiness aggregation では body-author-fixable な needs_fix として扱われる。
production-shaped root review では canonical_step2_route: step_4 に到達し、通常の bounded rewrite loop で修復可能になる。
genuine operator/environment/runtime categories は従来どおり operator intervention を維持する。
In Scope
.claude/skills/issue-contract-review/scripts/contract_readiness_check.pyunsupported_shell_syntaxを明示的にneeds_fixへ map する。- default/unknown および genuine operator-only category の fail-closed semantics は変更しない。
- regression tests
- shell substitution 自体は
baseline_vc_preflight.pyで実行前 blocked のままであること。 - readiness aggregate が
contract_readiness_human_judgmentにならないこと。 - canonical root pipeline が
step_4に route すること。 - genuine operator-only fixtures は
step_5_operator_intervention_requiredを維持すること。
- shell substitution 自体は
- 必要なら既存 test fixture の最小拡張。新しい schema / wrapper / approval layer は追加しない。
Out of Scope
- shell substitution を VC preflight で許可すること。
baseline_vc_preflight.pyの command safety policy を緩めること。route_canonical_step2_result()の operator-intervention 契約を一般に緩めること。- 再発防止: invalid baseline-expect annotation を body-author-fixable needs_fix として扱う #2760 の
invalid_baseline_expect_annotationscope を取り込むこと。 - 未観測 category を一括で
needs_fixに変更する generic policy。 - 新規 schema registry / approval layer / security gate の追加。
Acceptance Criteria
- AC1:
$(...)/ backtick /${...}を含む VC は従来どおり subprocess 実行前にblocked / unsupported_shell_syntaxとなり、実行されない。 - AC2:
contract_readiness_check.pyはunsupported_shell_syntaxをneeds_fixに集約し、これ単独ではcontract_readiness_human_judgmentを生成しない。 - AC3: production-shaped root review fixture で
unsupported_shell_syntaxを含む body はcanonical_step2_route == step_4に到達し、step_5_operator_intervention_requiredへは到達しない。 - AC4: genuine operator/environment categories(最低限、既存 fixture が所有する
env_missing_dep/ timeout / regression gate failure /package_manager_no_tty_prompt等)の現行 operator-intervention semantics は変わらない。 - AC5: issue-contract-review と issue-refinement-loop の関連 focused tests が PASS する。
Verification Commands
# AC2
# baseline-expect: fail
$ rg -n '"unsupported_shell_syntax": "needs_fix"' .claude/skills/issue-contract-review/scripts/contract_readiness_check.py# AC1 / AC3 / AC4 / AC5
# baseline-expect: pass
$ uv run --locked pytest .claude/skills/issue-contract-review/scripts/tests/ .claude/skills/issue-refinement-loop/tests/test_operator_intervention_route.py .claude/skills/issue-refinement-loop/tests/test_operator_intervention_route_scope_delta.py -qAllowed Paths
- .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
- .claude/skills/issue-contract-review/scripts/tests/
- .claude/skills/issue-refinement-loop/tests/test_operator_intervention_route.py
- .claude/skills/issue-refinement-loop/tests/test_operator_intervention_route_scope_delta.py
Stop Conditions
- Allowed Paths 外の production code 変更が必要と判明した場合。
unsupported_shell_syntax -> needs_fixではなく command safety policy 自体を変更する必要が判明した場合。- genuine operator-only category の意味論変更が必要と判明した場合。
- 再発防止: invalid baseline-expect annotation を body-author-fixable needs_fix として扱う #2760 または別 OPEN Issue と semantic ownership が重複すると fresh evidence で判明した場合。
- generic taxonomy framework / schema 追加が不可避と判明した場合。
Required Skills
なし
Runtime Verification Applicability
- decision: not_applicable
- reason: repository-owned deterministic classifier / readiness aggregation / hermetic root-pipeline regression tests で完結し、外部 runtime を必要としない。
Required Design References
- Issue fix: baseline_vc_preflight.py の VC format contract と unsafe command policy を明文化・強制する #514
- Issue 実装: route_canonical_step2_result() に verified failure_class ベースの operator intervention route を追加する #2397
- Issue 再発防止: invalid baseline-expect annotation を body-author-fixable needs_fix として扱う #2760
.claude/skills/issue-contract-review/SKILL.md.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py.claude/skills/issue-refinement-loop/SKILL.md
Source
- 実装: refinement_approved signal で未 claim の Issue を FACT_TASK_IDENTITY_CONFLICT と誤報告しない #2826 termination evidence: 実装: refinement_approved signal で未 claim の Issue を FACT_TASK_IDENTITY_CONFLICT と誤報告しない #2826 (comment)
- dedupe search: no OPEN Issue found that owns
unsupported_shell_syntax -> readiness needs_fix / Step 4routing.
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestfollow-up後続 Issue として切り出された follow-upphase/implementationImplementation phase
Activity