Skip to content

再発防止: unsupported_shell_syntax を body-author-fixable needs_fix として Step 4 に戻す #2832

Open

Description

@squne121

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

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 は default human_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.py
    • unsupported_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 を維持すること。
  • 必要なら既存 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_annotation scope を取り込むこと。
  • 未観測 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 -q

Allowed 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

Source

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    follow-up
    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/implementerenhancementfollow-upphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions