Skip to content

fix(agent-ops): baseline VC の pnpm non-TTY / CI env handling を全 pnpm gate へ一般化する #994

Closed

Description

@squne121

背景

baseline_vc_preflight.py は CI=true を pnpm build にだけ注入しており、pnpm no-TTY prompt の検出も pnpm build に偏っている。Issue #950 では pnpm typecheck / pnpm lint / pnpm build が non-TTY preflight で blocker 化し、Issue refinement が人間停止した。

In Scope

  • _FIXED_ENV_DELTA_BY_COMMAND を exact canonical pnpm gate(pnpm typecheck / pnpm lint / pnpm test / pnpm build)へ拡張する
  • _is_package_manager_no_tty_prompt() を全 canonical pnpm gate に適用する
  • category は既存 contract の package_manager_no_tty_prompt を維持する(package_manager_no_tty には変更しない)
  • no-TTY を body_author_fixable=false の tooling/env blocker として扱う
  • baseline-expect: pass の pnpm gate が no-TTY で失敗した場合、unexpected_fail ではなく blocked / package_manager_no_tty_prompt にする(classification != unexpected_fail を明示 assert)
  • shell=False、exact argv、env wrapper 拒否(CI=true pnpm <gate> shell prefix / env CI=true pnpm <gate> wrapper)、full env 非露出を全 canonical gate に維持する
  • no-TTY 検出時の fix_hint は "This is a package manager / no-TTY runner environment blocker, not an Issue body defect. Do not weaken ACs or rewrite the pnpm gate to runtime_only. Inspect pnpm/node_modules/tooling state; if runner_env_delta is missing, retry the same canonical pnpm gate with runner-side CI=true." とする
  • triage consumer(triage_contract_blockers.py)が failing gate(pnpm lint / pnpm typecheck)に応じた正しい argv を返す(pnpm build への誤誘導を防ぐ)

Out of Scope

  • # preflight-scope: runtime_only の実装(別 Issue)
  • pnpm install の副作用完全排除
  • consumer action の gate-specific 化の完全実装(誤誘導防止は本 Issue で担保するが、action の完全 gate-aware 化は follow-up)

Acceptance Criteria

  • AC1: pnpm typecheck の no-TTY stderr fixture が classification == blocked・category == package_manager_no_tty_prompt・decision == blocked・scope_class == regression_gate に分類される
  • AC2: pnpm lint の no-TTY stderr fixture が classification == blocked・category == package_manager_no_tty_prompt・decision == blocked・scope_class == regression_gate に分類される
  • AC3: pnpm test の no-TTY stderr fixture が classification == blocked・category == package_manager_no_tty_prompt・decision == blocked・scope_class == regression_gate に分類される
  • AC4: pnpm build の既存挙動は維持される(既存テストが PASS し続ける)
  • AC5: no-TTY 時の fix_hint が runtime_only を主要解決策として案内せず、runner-side CI=true 注入を促す
  • AC6: 既存の package_manager_no_tty_prompt テストが全 PASS する
  • AC7: baseline-expect: pass の pnpm gate が no-TTY で失敗した場合、unexpected_fail でなく blocked・category package_manager_no_tty_prompt に分類される(classification != unexpected_fail を明示 assert)
  • AC8: CI=true pnpm <gate> shell env prefix / env CI=true pnpm <gate> wrapper は block される(shell=False / exact argv 境界を全 canonical gate で維持)
  • AC9: triage consumer が pnpm lint / pnpm typecheck の no-TTY 失敗時に pnpm build ではなく failing gate の argv(例: pnpm lint)を提案する

Allowed Paths

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
  • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py
  • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py
  • tests/fixtures/issue-body/**
  • .claude/skills/impl-review-loop/scripts/triage_contract_blockers.py
  • .claude/skills/impl-review-loop/tests/test_triage_contract_blockers.py
  • .claude/skills/impl-review-loop/tests/test_triage_contract_blockers_pnpm_gate.py

Verification Commands

# AC1
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "typecheck_no_tty" -v

# AC2
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "lint_no_tty" -v

# AC3
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "test_no_tty" -v

# AC4
# baseline-expect: pass
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k "package_manager_no_tty_prompt_classified" -v

# AC5
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "fix_hint_no_runtime_only" -v

# AC6
# baseline-expect: pass
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k "package_manager_no_tty_prompt" -v

# AC7
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "baseline_pass_reclassify" -v

# AC8
# baseline-expect: fail
$ uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py -k "env_wrapper_rejected" -v

# AC9
# baseline-expect: fail
$ uv run pytest .claude/skills/impl-review-loop/tests/test_triage_contract_blockers_pnpm_gate.py -k "pnpm_lint_gate_action" -v

Runtime Verification Applicability

  • decision: not_applicable
  • reason: スクリプト内部ロジック修正。pytest fixture で完結。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Parent Issue

none

Parent Goal Ref

  • Goal: pnpm non-TTY の誤 blocker 化解消
  • Desired Destination: pnpm gate no-TTY が Issue contract 問題として扱われない状態

Current Validated Scope

  • baseline_vc_preflight.py の _FIXED_ENV_DELTA_BY_COMMAND / _is_package_manager_no_tty_prompt() を全 canonical pnpm gate(typecheck / lint / test / build)へ拡張
  • triage consumer(triage_contract_blockers.py)の failing gate 別 argv 誘導の正確化

Remaining Parent Gaps

なし

Outcome

pnpm typecheck / pnpm lint / pnpm test の no-TTY 失敗が package_manager_no_tty_prompt に分類され、body_author_fixable=false の tooling blocker として扱われる状態。triage consumer は failing gate に応じた正しい argv を返す。

Activity

  1. added
    enhancement
    on Jun 18, 2026
  2. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    LOOP_VERDICT: REQUEST_CHANGES

    #994 の方向性は妥当です。現行 baseline_vc_preflight.py は pnpm gate 自体は typecheck / lint / test / build を許可している一方、CI=true 注入は pnpm build だけ、no-TTY 検出も pnpm build だけに固定されています。これは #994 の問題設定と一致します。

    ただし、現状の #994 は そのまま実装させると既存 blocker schema / triage consumer / VC パスを壊す可能性が高いです。特に category 名、Allowed Paths、consumer 連携が危険です。

    #994 自体にはコメントはありません。 関連PRとしては、#943 を実装した #957 と、#959 を実装した #980 が今回の実質的な先行実装です。#957 は pnpm build 専用の runner-side {CI:"true"}、package_manager_no_tty_prompt 分類、env wrapper / shell env prefix 拒否を導入しています。#980 は CONTRACT_BLOCKER_TRIAGE_V1 で package_manager_no_tty_prompt を consume しています。

    BLOCKER 1: category 名が既存 contract とズレている

    #994 は AC / In Scope で package_manager_no_tty と書いていますが、既存 producer は package_manager_no_tty_prompt を返します。現行 classify_result() も category を package_manager_no_tty_prompt として返しています。

    さらに #944 は current scope で package_manager_no_tty_prompt / runner_env_delta / body_author_fixable=false / downstream bucket env_or_runtime を明示しており、#959 / #980 側も同じ category を consume しています。

    修正要求: #994 の AC / Outcome / fixture 期待値は package_manager_no_tty_prompt に統一してください。どうしても package_manager_no_tty に変えるなら、producer/consumer 両方の migration issue です。#994 の Allowed Paths では足りません。

    BLOCKER 2: Allowed Paths と Verification Commands のテストパスが怪しい

    #994 の VC は次を指定しています。

    uv run pytest .claude/skills/issue-contract-review/tests/test_baseline_vc_preflight_pnpm_no_tty.py -v

    しかし、#943 / #957 の実装テストは .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py に追加されています。#957 の patch でも test_fixed_env_injects_ci_true_for_pnpm_build、test_package_manager_no_tty_prompt_* はこの既存ファイルに追加されています。

    このままだと、実装者が存在しない/別系統の test path に新規ファイルを作るか、pytest exit 4/5 系の「VC設計不備」を発生させます。pytest 公式では exit code 4 は command line usage error、exit code 5 は no tests collected です。つまり、パス・selector のミスは「テストが通った」証拠ではありません。([pytestドキュメント]1)

    修正要求: Allowed Paths に次を入れてください。

    .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py
    

    既存テストを分離して新規 test_baseline_vc_preflight_pnpm_no_tty.py を作るなら、その意図・import path・collection 確認を AC に入れる必要があります。

    BLOCKER 3: pnpm test が In Scope にあるのに AC がない

    #994 の In Scope は _FIXED_ENV_DELTA_BY_COMMAND を pnpm typecheck / lint / test / build へ広げるとしています。 しかし AC は typecheck、lint、build しか見ていません。pnpm test の no-TTY fixture が抜けています。

    修正要求: AC を追加してください。

    - [ ] AC3: `pnpm test` の no-TTY stderr fixture が `package_manager_no_tty_prompt` に分類される

    既存 AC3 build 維持は AC4 へずらすのがよいです。

    BLOCKER 4: triage consumer が pnpm build を hard-code しており、#994 の一般化と衝突する

    #980 の triage_contract_blockers.py は、package_manager_no_tty_prompt かつ runner_env_delta != {"CI":"true"} のとき、suggested action として argv: ["pnpm", "build"] を返します。

    #994 が pnpm lint や pnpm typecheck の no-TTY を同じ category に一般化すると、consumer は lint が失敗したのに build を再試行せよ という誤った action を出す可能性があります。#994 の Allowed Paths には .claude/skills/impl-review-loop/scripts/triage_contract_blockers.py もそのテストも含まれていません。

    修正要求: どちらかが必要です。

    1. fix(agent-ops): baseline VC の pnpm non-TTY / CI env handling を全 pnpm gate へ一般化する #994 のスコープを producer-only に限定し、「consumer action の gate-specific 化は follow-up」と明記する。
    2. fix(agent-ops): baseline VC の pnpm non-TTY / CI env handling を全 pnpm gate へ一般化する #994 の Allowed Paths に triage_contract_blockers.py と test_triage_contract_blockers.py を追加し、failing gate を action に反映する。

    敵対的には 2 を推奨します。producer だけ直すと、downstream の誤誘導が残ります。

    BLOCKER 5: fix_hint に runtime_only を案内するのは #943/#944 の設計と逆行している

    #994 は no-TTY 時の fix_hint に # preflight-scope: runtime_only を案内するとしています。 しかし #943 の目的は、まさに pnpm build no-TTY を Issue body workaround に逃がさず、preflight 実装側で environment/tooling blocker として扱うことでした。#957 も Issue body workaround に逃がさず と明記しています。

    runtime_only を第一案内にすると、Issue author が AC/VC を弱体化させて blocker を回避する方向へ戻ります。これは #944 の「non-body-author-fixable blocker を consume して早期停止する」設計とも矛盾します。

    修正要求: fix_hint は次の方向にしてください。

    This is a package manager / no-TTY runner environment blocker, not an Issue body defect.
    Do not weaken ACs or rewrite the pnpm gate to runtime_only.
    Inspect pnpm/node_modules/tooling state; if runner_env_delta is missing, retry the same canonical pnpm gate with runner-side {"CI":"true"}.
    

    runtime_only は「canonical pnpm gate ではない runtime-only verification command」の逃げ道であり、今回の canonical pnpm gate no-TTY の主要解決策にすべきではありません。

    BLOCKER 6: baseline-expect: pass の再分類を検証していない

    #994 の In Scope は、baseline-expect: pass の pnpm gate が no-TTY で失敗した場合、unexpected_fail ではなく blocked にすると書いています。 しかし Verification Commands は # baseline-expect: fail になっています。

    これは契約として矛盾しています。今回直したいのは「pass 期待の regression gate が環境 no-TTY で落ちたときの誤分類」なので、fixture も baseline-expect: pass でなければ不十分です。

    修正要求: 各 pnpm gate について、少なくとも次を unit test してください。

    classification == "blocked"
    category == "package_manager_no_tty_prompt"
    decision == "blocked"
    scope_class == "regression_gate"

    加えて unexpected_fail ではないことを明示 assert してください。

    BLOCKER 7: shell=False / exact argv / env wrapper 拒否を AC に固定していない

    Python の subprocess.run は shell=False がデフォルトで、env mapping を渡すと子プロセス環境を指定できます。今回の安全な実装は、#943 と同じく subprocess.run(argv, shell=False, env=run_env) で runner-side delta だけを注入する形です。([Python documentation]2)

    一方 GNU env は単なる環境表示コマンドではなく、env [option]... [name=value]... [command [args]...] として任意 command を modified environment で起動できます。env CI=true pnpm lint のような wrapper を一般解禁すると allowlist 境界を壊します。([GNU]3)

    #957 はこの点を既に抑えており、env wrapper / shell env prefix を拒否しています。 #994 でも同じ境界を明文化してください。

    追加AC案:

    - [ ] `CI=true pnpm <gate>` shell env prefix は block される
    - [ ] `env CI=true pnpm <gate>` wrapper は block される
    - [ ] `pnpm <gate> --filter foo` など extra args は canonical gate ではない
    - [ ] full environment は JSON / fragment に出さず、`runner_env_delta` のみ記録される

    技術調査メモ

    pnpm 公式 docs では、CI 判定に env.CI が使われ、CI では --frozen-lockfile の既定値や install failure 条件が変わります。また non-TTY stdout では reporter の既定が append-only になります。したがって no-TTY / CI handling を runner-side に閉じ込める設計は妥当です。([pnpm]4)

    ただし、CI=true は pnpm の挙動を変える環境変数です。typecheck / lint / test / build へ一律注入するなら、「これは baseline runner の非対話性を表す固定 delta であり、Issue body の command grammar を拡張しない」という契約を明記する必要があります。

    推奨する #994 修正版の骨子

    ## In Scope
    
    - `_FIXED_ENV_DELTA_BY_COMMAND` を exact canonical pnpm gate:
      - `pnpm typecheck`
      - `pnpm lint`
      - `pnpm test`
      - `pnpm build`
      に拡張する
    - `_is_package_manager_no_tty_prompt()` を全 canonical pnpm gate に適用する
    - category は既存 contract の `package_manager_no_tty_prompt` を維持する
    - no-TTY は `body_author_fixable=false` の tooling/env blocker として扱う
    - `baseline-expect: pass` の no-TTY failure は `unexpected_fail` ではなく `blocked / package_manager_no_tty_prompt` にする
    - `shell=False`、exact argv、env wrapper 拒否、full env 非露出を維持する
    - triage consumer が failing gate を build に誤変換しないことを保証する
    ## Allowed Paths
    
    - `.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py`
    - `.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py`
    - `tests/fixtures/issue-body/**`
    - `.claude/skills/impl-review-loop/scripts/triage_contract_blockers.py`
    - `.claude/skills/impl-review-loop/tests/test_triage_contract_blockers.py`
    # producer regression
    uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -k "package_manager_no_tty_prompt or runner_env_delta or fixed_env" -v
    
    # consumer regression
    uv run pytest .claude/skills/impl-review-loop/tests/test_triage_contract_blockers.py -k "pnpm_no_tty" -v
    
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    結論

    #994 は 「pnpm build 専用だった #943 の解決を全 canonical pnpm gate へ一般化する」Issue としては必要です。ただし、現本文は category 名、test path、consumer 連携、runtime_only guidance が弱いです。

    このまま実装すると、producer は直っても CONTRACT_BLOCKER_TRIAGE_V1 側が pnpm build hard-code のまま残る、または package_manager_no_tty / package_manager_no_tty_prompt の schema drift が発生します。実装前に #994 本文を上記の形へ修正するべきです。

  3. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  4. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    CONTRACT_REVIEW_RESULT_V1

    schema: CONTRACT_REVIEW_RESULT_V1
    issue_number: 994
    repo: squne121/loop-protocol
    status: go
    generated_at: "2026-06-19T12:53:00Z"
    body_sha256: "sha256:de6598e868eef44c80ae10662849107b035fc68627b35980e6e506328a3cae48"
    
    outcome: |
      baseline_vc_preflight.py の CI=true 注入と no-TTY 検出を pnpm typecheck / lint / test / build
      の全 canonical gate へ拡張し、triage consumer の誤誘導(pnpm build へのハードコード)を修正する。
    
    acceptance_criteria:
      - AC1: pnpm typecheck no-TTY → classification==blocked / category==package_manager_no_tty_prompt
      - AC2: pnpm lint no-TTY → classification==blocked / category==package_manager_no_tty_prompt
      - AC3: pnpm test no-TTY → classification==blocked / category==package_manager_no_tty_prompt
      - AC4: pnpm build 既存挙動維持(regression_gate pass)
      - AC5: no-TTY fix_hint が runtime_only を主解として案内しない
      - AC6: 既存 package_manager_no_tty_prompt テスト全 PASS
      - AC7: baseline-expect:pass gate が no-TTY 失敗 → unexpected_fail でなく blocked/package_manager_no_tty_prompt
      - AC8: shell env prefix / env wrapper が block される(shell=False / exact argv 境界維持)
      - AC9: triage consumer が lint/typecheck の no-TTY 時に pnpm build でなく failing gate を提案
    
    allowed_paths:
      - .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
      - .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py
      - .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py
      - tests/fixtures/issue-body/**
      - .claude/skills/impl-review-loop/scripts/triage_contract_blockers.py
      - .claude/skills/impl-review-loop/tests/test_triage_contract_blockers.py
      - .claude/skills/impl-review-loop/tests/test_triage_contract_blockers_pnpm_gate.py
    
    worktree: .claude/worktrees/issue-994-pnpm-no-tty-generalize
    branch: worktree-issue-994-pnpm-no-tty-generalize
    
    checks:
      template_compliance: pass
      state_label: pass  # state/needs-human なし
      allowed_paths_present: pass
      vc_present: pass
      stop_conditions_complete: pass
      ac_verifiability: pass
      product_spec_check:
        applicability: not_applicable
        decision: pass
        routing_action: continue
      worktree_branch_collision: pass  # issue-994 worktree 未存在
      next_action: implement-issue
      blocked_reasons: []
    
    vc_preflight:
      status: pass
      summary:
        expected_fail: 7
        unexpected_pass: 0
        blocked: 0
        human_judgment: 0
        expected_pass: 2
        skipped: 0
        extraction_errors: 0
      classifications:
        - ac: AC1
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
          note: "test file not yet created (exit4) — expected baseline fail"
        - ac: AC2
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
        - ac: AC3
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
        - ac: AC4
          classification: expected_pass
          scope_class: regression_gate
          decision: go
          note: "test_package_manager_no_tty_prompt_classified_as_tooling_blocker_after_runner_delta PASSED"
        - ac: AC5
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
        - ac: AC6
          classification: expected_pass
          scope_class: regression_gate
          decision: go
          note: "2 passed (package_manager_no_tty_prompt tests)"
        - ac: AC7
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
        - ac: AC8
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
        - ac: AC9
          classification: expected_fail
          scope_class: baseline_fail_expected
          decision: go
          note: "test file not yet created (exit4)"
    
    runtime_verification_applicability:
      decision: not_applicable
      reason: "スクリプト内部ロジック修正。pytest fixture で完結。"
  5. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    実装完了 — PR #1001

    実装が完了しました。

    PR: #1001
    Branch: worktree-issue-994-pnpm-no-tty-generalize

    変更ファイル

    • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py — _FIXED_ENV_DELTA_BY_COMMAND と _is_package_manager_no_tty_prompt を全 canonical pnpm gate へ拡張、AC5 fix_hint 更新、AC7 baseline-expect: pass guard 追加
    • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py — 既存テスト 2 件を新挙動に更新
    • .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight_pnpm_no_tty.py (新規) — AC1–AC3, AC5, AC7, AC8 をカバー
    • .claude/skills/impl-review-loop/scripts/triage_contract_blockers.py — _normalize_action が raw_command から failing gate argv を動的取得(AC9)
    • .claude/skills/impl-review-loop/tests/test_triage_contract_blockers_pnpm_gate.py (新規) — AC9 をカバー

    VC 結果

    AC k フィルタ 結果
    AC1 typecheck_no_tty 2 passed
    AC2 lint_no_tty 2 passed
    AC3 test_no_tty 2 passed
    AC4 package_manager_no_tty_prompt_classified 1 passed
    AC5 fix_hint_no_runtime_only 3 passed
    AC6 package_manager_no_tty_prompt 2 passed
    AC7 baseline_pass_reclassify 3 passed
    AC8 env_wrapper_rejected 2 passed
    AC9 pnpm_lint_gate_action 2 passed

    回帰チェック

    • issue-contract-review 全テスト: 175 passed, 1 skipped
    • impl-review-loop 全テスト: 251 passed, 4 xfailed
    • pnpm typecheck / lint / test / build: すべて exit 0
  6. added 2 commits that reference this issue on Jun 19, 2026
  7. squne121 commented on Jun 19, 2026

    @squne121
    OwnerAuthor

    PR repair 完了 — fix_delta 適用結果

    PR #1001 に人間レビュワーの REQUEST_CHANGES に基づく修正を適用し push しました。

    適用した修正

    修正 1: triage_contract_blockers.py — canonical gate allowlist 追加

    • _CANONICAL_PNPM_GATES = [["pnpm", "typecheck"], ["pnpm", "lint"], ["pnpm", "test"], ["pnpm", "build"]] を定義
    • raw_command が存在するが canonical gate でない場合(pnpm install、pnpm lint --filter foo 等)は retry_with_runner_env_delta を返さず non_canonical_pnpm_gate として fail-closed
    • raw_command 欠落時のみ legacy fallback ["pnpm", "build"] を許可

    修正 2: test_triage_contract_blockers_pnpm_gate.py — negative テスト追加

    • raw_command="pnpm install" → retry_with_runner_env_delta を返さないことを確認
    • raw_command="pnpm lint --filter foo" → 非 canonical として reject されることを確認
    • raw_command 欠落時 → legacy fallback として ["pnpm", "build"] を返すことを確認

    修正 3: test_baseline_vc_preflight_pnpm_no_tty.py — AC7 full-pipeline テスト追加

    • run_command() をモンキーパッチして pnpm typecheck が no-TTY stderr + exit 1 を返す状態をシミュレート
    • main() を通して JSON 出力で classification == "blocked" / category == "package_manager_no_tty_prompt" / decision == "blocked" を assert
    • classification != "unexpected_fail" かつ category != "baseline_regression_failed" を確認

    検証結果

    test_triage_contract_blockers_pnpm_gate.py: 9 passed
    test_baseline_vc_preflight_pnpm_no_tty.py: 16 passed (AC7 full-pipeline 含む)
    test_baseline_vc_preflight.py -k package_manager_no_tty_prompt: 2 passed
    test_triage_contract_blockers.py: 12 passed
    pnpm typecheck: PASS (CI=true)
    pnpm test: 741 passed
    pnpm lint / pnpm build: 環境起因の pre-existing failure (dist/assets root 所有 / playwright-report artifact) — 本 PR 変更と無関係
    

    PR URL: #1001

  8. added a commit that references this issue on Jun 19, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions