Skip to content

fix: harden pnpm build preflight (#943) - #956

Closed
squne121 wants to merge 3 commits into
mainfrom
worktree-issue-943-pnpm-ci-build
Closed

squne121 wants to merge 3 commits into
mainfrom
worktree-issue-943-pnpm-ci-build

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

Issue #943 の Step 1 として、pnpm build の no-TTY false blocker を決定論的に扱う変更だけに絞って実装しました。

  • baseline_vc_preflight.py に pnpm build 専用の runner-side fixed env delta {CI:"true"} を追加し、shell=False のまま安全に実行するようにしました。
  • ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY / Aborted removal of modules directory due to no TTY を package_manager_no_tty_prompt として分類し、body-author-fixable ではなく tooling/env blocker として扱うようにしました。
  • env CI=true pnpm build と CI=true pnpm build の workaround を許可しない方針を tests / docs / skill guidance に同期しました。

Checks

以下の確認をすべてローカルで実行し、pass を確認しました。

  • 構文確認: python3 -m py_compile .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py
  • 対象テスト: uv run pytest .claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py -v
  • 型検査: pnpm typecheck
  • lint: pnpm lint
  • 単体テスト: pnpm test
  • build: pnpm build

Schema Change Applicability

  • decision: not_schema_change
  • reason: validator script の実行経路と guidance を更新したが、外部 schema / machine-readable contract のキー集合は変更していない

Schema Consumer Inventory

対象なし。
理由: not_schema_change のため、consumer inventory を更新すべき schema 変更はありません。

Safety Claim Matrix

この PR で制御した安全境界と、その確認根拠を以下に整理します。

Claim Implemented? Not controlled Evidence Follow-up
pnpm build の no-TTY false blocker を shell/env prefix を解禁せず修正した yes fixed env delta の実装、package_manager_no_tty_prompt 分類、追加 pytest で確認
env wrapper を一般解禁せず allowlist 境界を維持した yes test_env_wrapper_exact_env_ci_pnpm_gate_is_blocked と test_shell_env_prefix_ci_true_pnpm_build_is_blocked で確認
evidence には full environment を残さず injected delta のみを出力する yes test_runner_env_delta_output_exposes_only_fixed_env で {\"CI\":\"true\"} のみ出力されることを確認

Notes

関連情報とスコープ境界を以下に記録します。

squne121 and others added 3 commits June 16, 2026 07:49
…istry/spec

Add issue-refinement-ops-review task-kind to agent_ops_inventory.py with:
- MUST_READ paths per AC2 (AGENTS.md, CLAUDE.md, contract scripts, refinement loop entrypoints)
- Optional inventory artifact generation with coverage of required prefixes (AC3)
- DO_NOT_READ_INITIAL_ONLY for src/ and docs/product/ (AC4)
- Parameterized build_agent_ops_inventory() to share implementation between both ops-review task-kinds (AC7)
- Comprehensive test suite in test_issue_refinement_ops_review.py covering all ACs

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…s/ prefix support

Fixes:
- GAP 1 (AC3): Add ".claude/agents/" to target_prefixes so inventory has items under that prefix
- GAP 2 (AC6 / MAJOR-2): Add per-prefix coverage block with tracked_matches count and empty_ok flag

Implementation:
- Updated build_agent_ops_inventory() to include ".claude/agents/" in target_prefixes (line 297)
- Added coverage computation before return statement with 7 required prefixes
- Coverage dict includes: prefix, tracked_matches (int), empty_ok (bool)
- Returned dict now includes "coverage" key alongside existing schema fields

Tests (test_issue_refinement_ops_review.py):
- Added test_inventory_coverage_includes_claude_agents_and_codex_agents() to coverage class
  Verifies: coverage field exists, all required prefixes present, .claude/agents/ has tracked_matches >= 1
- Added test_security_coverage_tracked_matches_and_empty_ok() to security class
  Verifies: all coverage entries have correct type and empty_ok == (tracked_matches == 0)

All 36 tests in test_issue_refinement_ops_review.py pass.
All 59 tests in test_agent_ops_inventory.py pass (no regression).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add a runner-side CI=true env delta for pnpm build, classify pnpm no-TTY failures as tooling blockers, and sync the related tests and guidance.
@github-actions

Copy link
Copy Markdown
Contributor

Preview URL

⏳ publish requested(asset-level live check 未検証 / Pages source 設定後に有効化): https://squne121.github.io/loop-protocol/pr-956/

Pages source の設定が必要な場合: Settings → Pages → Source → gh-pages (root)
base path 修正だけでは hosted runtime 復旧を保証しません。publish trigger / source fault は別問題として切り分けてください。
The preview will be removed when this PR is closed.

@squne121

Copy link
Copy Markdown
Owner Author

PR #957 に supersede されたため close します。#956 は local main の未公開コミットを巻き込んでいたため、origin/main 起点で #943 の commit のみを載せ直した Draft PR #957 を正本とします。

@squne121 squne121 closed this Jun 17, 2026
@squne121 squne121 mentioned this pull request Jun 17, 2026
34 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: pnpm regression gate の no-TTY / CI env prefix を baseline preflight で決定論的に扱う

1 participant