Repository navigation
impl(#896): Node/pnpm/uv setup を Composite Action 化して CI YAML 重複を削減する - #916
Conversation
…を削減する - .github/actions/setup-node-pnpm/action.yml を追加(pnpm/action-setup + actions/setup-node をラップ) - .github/actions/setup-python-uv/action.yml を追加(astral-sh/setup-uv をラップ) - typecheck/lint/test/build/e2e/python-test の各 job で local Composite Action を使用するよう ci.yml を更新 - pnpm_install / uv_python_install / uv_sync の runtime baseline step_id は workflow 側に維持 - actions/checkout は Composite Action 内に移動せず、各 job の先頭に維持 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-916/ The preview will be removed when this PR is closed. |
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
LOOP_VERDICT_V2:
verdict: REQUEST_CHANGES
merge_ready: false
merge_state_status: UNSTABLE
reviewed_head_sha: fb7a08e0c85ad3bb20873cbd10749ec7c3a64fe2
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
changed_files:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
allowed_paths:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
out_of_scope_files: []
contract_source_kind: issue_comment
contract_source_id: "https://github.com/squne121/loop-protocol/issues/896#issuecomment-4701860460"
expected_contract_fingerprint: "sha256:628f18313cacd8fe5c93de98860867ed7c055d2b2b990a5572d22a6adf02f807"
required_auto_actions: []
blockers:
- id: B1
severity: required
description: >
PR Body Japanese Check CI gate が FAIL。failed_blocks=4(ratio=0.000 の英語のみブロックが 4 件存在)。
aggregate_ratio=0.278 で全体閾値は満たすが、per-block 判定でブロックされている。
PR 本文の「Verification」「Runtime Verification」見出しおよび関連散文ブロックに
日本語を追加する必要がある。mergeStateStatus=UNSTABLE の直接原因。
fix_delta:
description: >
PR 本文の英語のみ prose block に日本語テキストを追加して
PR Body Japanese Check を green にする。
具体的には「## Verification」「## Runtime Verification」見出しを日本語化し、
その下の prose ブロックにも日本語説明を加える。AC 照合結果(review_subagent 独立検証)
base: c96419988c86779527c547e67ed36306f9864fe3 / head: fb7a08e0c85ad3bb20873cbd10749ec7c3a64fe2
| AC | 結果 | 証跡 |
|---|---|---|
| AC1: setup-node-pnpm/action.yml 追加 | PASS | ファイル存在確認済み |
| AC2: setup-python-uv/action.yml 追加 | PASS | ファイル存在確認済み |
| AC3: 全 job (typecheck/lint/test/build/e2e/python-test) が checkout 後に Composite Action 使用 | PASS | ci.yml 内 6 job すべてで checkout → setup-node-pnpm の順序確認(行番号: 19/22, 136/139, 253/256, 389/392, 506/509, 716/719) |
| AC4: actions/checkout が Composite Action 内に存在しない | PASS | 両 action.yml ともに checkout 参照なし |
| AC5: cache: pnpm / cache-dependency-path: pnpm-lock.yaml が setup-node-pnpm に明示 | PASS | cache: pnpm と cache-dependency-path: pnpm-lock.yaml 確認済み |
| AC6: pnpm/action-setup が run_install: false | PASS | run_install: false 確認済み |
| AC7: pnpm_install / uv_python_install / uv_sync の step_id が workflow 側に維持 | PASS | ci.yml 内で 8 件マッチ |
| AC8: e2e Playwright report / test-results upload 維持 | PASS | upload-artifact / test-results 18 件確認 |
| AC9: python-test の ci_test_selection artifact 維持 | PASS | ci_test_selection 8 件確認 |
| AC10: ci_verdict_summary_v2 関連変更なし | PASS | ci.yml に該当文字列なし |
| AC11: actionlint | PASS | CI gate green(run 27500316195) |
| AC12: pnpm typecheck / lint / test / build | PASS | CI gate 全 green |
CI 結果サマリー
| job | 結果 |
|---|---|
| actionlint | pass |
| typecheck | pass |
| lint | pass |
| test | pass |
| build | pass |
| e2e | pass |
| python-test | pass |
| PR Body Japanese Check | fail |
設計制約チェック
actions/checkoutは Composite Action 内に存在しない: OKpnpm install/uv python install/uv syncは workflow 側 timed step に残存: OKsetup-node-pnpmの cache owner はactions/setup-node(cache: pnpm+cache-dependency-path明示): OKpnpm/action-setupのrun_install: false: OKci_verdict_summary_v2関連変更禁止: OK(変更なし)e2ePlaywright 実行方式変更禁止: OK(変更なし)- Allowed Paths 外変更禁止: OK(3 ファイルのみ変更、全て Allowed Paths 内)
ブロッカー詳細
B1(必須修正): PR 本文の日本語比率不足
CI ログより:
aggregate_ratio: 0.278(全体は閾値 0.1 超)failed_blocks: 4(各 ratio=0.000)
per-block 判定(memory 記録の運用ルール)により、英語のみの prose block が 4 件あるため FAIL。
PR 本文の ## Verification と ## Runtime Verification セクション見出しおよびその直下の散文を日本語化することで解消できる。
実装の内容自体(Composite Action の設計・AC 適合)は全て正しい。PR 本文の日本語化のみが必要。
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2 — PR #916 再レビュー
LOOP_VERDICT_V2:
verdict: REQUEST_CHANGES
merge_ready: false
merge_state_status: UNSTABLE
reviewed_head_sha: fb7a08e0c85ad3bb20873cbd10749ec7c3a64fe2
contract_source_kind: issue_comment
contract_source_id: "896#issuecomment-4701860460"
expected_contract_fingerprint: "sha256:628f18313cacd8fe5c93de98860867ed7c055d2b2b990a5572d22a6adf02f807"
allowed_paths_gate:
status: ok
changed_files:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
allowed_paths:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
producer_role: review_subagent
worker_report_used_as_canonical: false
blockers:
- id: B1
kind: ci_gate_failure
description: "PR Body Japanese Check が失敗している。CI ログに failed_blocks=2 (ratio=0.000) が報告されており、PR body 内に日本語ゼロの prose block が 2 箇所存在する。"
run_url: "https://github.com/squne121/loop-protocol/actions/runs/27501714180/job/81285678031"
required_auto_actions: []
fix_delta:
B1: "PR body の日本語ゼロ prose block 2 箇所を修正する。CI ログによると block[1]=10文字・block[2]=28文字がゼロ比率。PR body のヘッダー(## で始まる見出し)を含む全 prose ブロックに日本語テキストが必要。本 checker は per-block 判定のため、コードブロック内ではなく見出し行・説明行を確認すること。"AC 検証結果
contract fingerprint: sha256:628f18313cacd8fe5c93de98860867ed7c055d2b2b990a5572d22a6adf02f807 で照合(一致)。
| AC | 判定 | 根拠 |
|---|---|---|
| AC1 | PASS | diff で .github/actions/setup-node-pnpm/action.yml 新規追加確認 |
| AC2 | PASS | diff で .github/actions/setup-python-uv/action.yml 新規追加確認 |
| AC3 | PASS | ci.yml diff で typecheck/lint/test/build/e2e/python-test の全 6 job が uses: ./.github/actions/setup-node-pnpm を使用 |
| AC4 | PASS | action.yml 本文に actions/checkout の記述なし(ファイル内容を直接確認) |
| AC5 | PASS | setup-node-pnpm/action.yml に cache: pnpm と cache-dependency-path: pnpm-lock.yaml が明示 |
| AC6 | PASS | setup-node-pnpm/action.yml に run_install: false が明示 |
| AC7 | PASS | ci.yml 本文に pnpm_install / uv_python_install / uv_sync の step_id が維持 |
| AC8 | PASS | ci.yml の e2e job に upload-artifact / test-results の記述が維持(変更なし) |
| AC9 | PASS | ci.yml の python-test job に ci_test_selection artifact が維持 |
| AC10 | PASS | diff に ci_verdict_summary_v2 関連変更なし |
| AC11 | PASS | CI の actionlint job が green(runs/27500316195) |
| AC12 | PASS | CI の typecheck / lint / test / build / e2e / python-test すべて green |
Blocker 詳細: B1 — PR Body Japanese Check 失敗
CI run 27501714180 の Check PR body Japanese ratio ステップのログ:
aggregate_ratio: 0.339
threshold: 0.1
prose_blocks: 11
failed_blocks: 2
--- 日本語比率不足の prose block ---
[1] ratio=0.000 (jp=0, total=10)
[2] ratio=0.000 (jp=0, total=28)
FAIL: 日本語比率不足 (aggregate=0.339, threshold=0.1, failed_blocks=2)
aggregate は閾値を満たしているが、per-block 判定により 2 ブロックが落ちている。PR body を確認すると、英語のみで構成されている prose ブロックが存在する。🤖 Generated with [Claude Code](https://claude.com/claude-code) 行(約10文字)および別箇所の英語のみブロック(約28文字)が候補。PR body の全 prose ブロックに日本語テキストを追加する必要がある。
実装 AC 自体はすべて満たされており、Allowed Paths 外の変更もない。CI gate(Japanese Check)の解消が唯一の blocker。
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2 — PR #916 レビュー (iteration 2)
LOOP_VERDICT_V2:
verdict: APPROVE
merge_ready: true
merge_state_status: CLEAN
pr_number: 916
reviewed_head_sha: fb7a08e0c85ad3bb20873cbd10749ec7c3a64fe2
reviewed_base_sha: c96419988c86779527c547e67ed36306f9864fe3
linked_issue: 896
contract_source_kind: issue_comment
contract_source_id: "squne121/loop-protocol/issues/896#issuecomment-4701860460"
expected_contract_fingerprint: "sha256:628f18313cacd8fe5c93de98860867ed7c055d2b2b990a5572d22a6adf02f807"
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
changed_files:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
contract_allowed_paths:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
verdict: all changed files within Allowed Paths
ac_verification:
AC1: pass # setup-node-pnpm/action.yml 存在確認
AC2: pass # setup-python-uv/action.yml 存在確認
AC3: pass # 6 job すべてが checkout 後に local Composite Action を使用
AC4: pass # actions/checkout は両 composite action 内に存在しない
AC5: pass # cache-dependency-path: pnpm-lock.yaml が setup-node-pnpm/action.yml に明示
AC6: pass # run_install: false が setup-node-pnpm/action.yml に明示
AC7: pass # pnpm_install / uv_python_install / uv_sync の step_id が ci.yml に維持
AC8: pass # upload-artifact / test-results が e2e job に維持
AC9: pass # ci_test_selection artifact が python-test job に維持
AC10: pass # ci_verdict_summary_v2 の変更なし
AC11: pass # actionlint CI gate 通過
AC12: pass # typecheck / lint / test / build CI gate 通過
ci_status:
pr_body_japanese_check: pass
actionlint: pass
typecheck: pass
lint: pass
test: pass
build: pass
e2e: pass
python_test: pass
deploy_pr: pass
validate_generated_artifact: pass
required_auto_actions: []
blockers: []
fix_delta: null判定根拠
Allowed Paths Gate (review_subagent 独立再計算): PR の変更ファイル 3 件(setup-node-pnpm/action.yml, setup-python-uv/action.yml, ci.yml)はすべてコントラクトの Allowed Paths と完全一致。逸脱なし。
AC1〜AC12: git show FETCH_HEAD で各ファイルの実内容を直接検証。
setup-node-pnpm/action.yml:pnpm/action-setup@v6 run_install: false+actions/setup-node@v6 cache: pnpm cache-dependency-path: pnpm-lock.yaml— AC5/AC6 満足setup-python-uv/action.yml:astral-sh/[email protected]のみ — AC4 満足(checkout なし)ci.yml: typecheck/lint/test/build/e2e/python-test の 6 job すべてがactions/checkout後に./.github/actions/setup-node-pnpmを呼び出し(AC3)、pnpm_install/uv_python_install/uv_syncの timed step_id が workflow 側に残存(AC7)、ci_test_selectionartifact 維持(AC9)、ci_verdict_summary_v2変更なし(AC10)
PR Body Japanese Check: CI で pass 確認済み。本文全ブロック(12 ブロック)に日本語あり。Closes #896 ブロックも「Issue #896 をクローズします。」で日本語混在、footer も「🤖 Claude Code により生成 —」で日本語あり。
merge_state_status: CLEAN — マージ可能状態。
判定REQUEST_CHANGES。 実装の方向性は概ね正しいですが、 なお、以前のレビューでは PR Body Japanese Check が失敗していましたが、同一 head SHA の最新 良い点
#895 の runtime baseline との衝突を避け、 ブロッカーB1:
|
uv-version input は action.yml 内の uses: astral-sh/[email protected] で 参照されておらず、呼び出し側 workflow も渡していないため不要。 description に cache policy と version pin 管理 issue (#375) の補足を追加。 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2 — PR #916 レビュー
レビュー実施: review_subagent (claude-sonnet-4-6)
Contract Snapshot: #896 (comment)
Head SHA: 3694c12
Base SHA: 6053c02
Allowed Paths Gate (独立再計算)
Changed files (git diff base...head):
.github/actions/setup-node-pnpm/action.yml— Contract Allowed Paths に含まれる: OK.github/actions/setup-python-uv/action.yml— Contract Allowed Paths に含まれる: OK.github/workflows/ci.yml— Contract Allowed Paths に含まれる: OK
Contract Allowed Paths (from snapshot):
.github/actions/setup-node-pnpm/action.yml.github/actions/setup-python-uv/action.yml.github/workflows/ci.yml
変更ファイルはすべて Allowed Paths 内。逸脱なし。
AC 検証結果
| AC | 検証内容 | 結果 |
|---|---|---|
| AC1 | .github/actions/setup-node-pnpm/action.yml が追加されている |
PASS — diff で ADDED 確認 |
| AC2 | .github/actions/setup-python-uv/action.yml が追加されている |
PASS — diff で ADDED 確認 |
| AC3 | 6 job が checkout 後に local Composite Action を使用 | PASS — ci.yml に uses: ./.github/actions/setup-node-pnpm が 6 箇所、uses: ./.github/actions/setup-python-uv が 1 箇所確認 |
| AC4 | actions/checkout が Composite Action 内に存在しない |
PASS — setup-node-pnpm/setup-python-uv ともに uses:.*checkout なし(description テキストの「checkout 後」は非該当) |
| AC5 | cache: pnpm と cache-dependency-path: pnpm-lock.yaml が setup-node-pnpm に明示 |
PASS — 両フィールド確認 |
| AC6 | pnpm/action-setup は run_install: false |
PASS — run_install: false 確認 |
| AC7 | pnpm_install / uv_python_install / uv_sync の step_id が workflow 側に維持 |
PASS — ci.yml の timed step に全 id 確認 |
| AC8 | e2e の Playwright report / test-results upload が維持 | PASS — upload-artifact と test-results の参照が ci.yml に存在 |
| AC9 | ci_test_selection artifact が維持 |
PASS — python-test job 内に ci_test_selection artifact upload ステップが存在 |
| AC10 | ci_verdict_summary_v2 関連の変更が含まれていない |
PASS — diff に ci_verdict_summary_v2 の変更行なし |
| AC11 | actionlint がエラーなしで通る |
PASS — CI actionlint job: SUCCESS |
| AC12 | pnpm typecheck / lint / test / build が通る |
PASS — CI 全 job: typecheck/lint/test/build/e2e/python-test すべて SUCCESS |
uv-version input 削除確認 (前回ブロッカー B1)
setup-python-uv/action.yml を直接確認: inputs: セクションなし。uv-version input は存在しない。B1 解消済み。
floating tag policy 記載確認 (前回ブロッカー B2)
PR body の ## 設計制約の遵守 セクションに以下の記述を確認:
upstream action のバージョンタグ(
@v6/@v8.1.0)は既存.github/workflows/ci.ymlの floating tag 方針に合わせる。full SHA pin への移行は #280 で追跡中。
B2 解消済み。
CI Status
全 required job が SUCCESS:
- typecheck, lint, test, build, e2e, python-test, actionlint, ci-verdict-summary — すべて SUCCESS
LOOP_VERDICT_V2:
verdict: APPROVE
merge_ready: true
merge_state_status: CLEAN
reviewed_head_sha: 3694c12557afcb43f4c69d3113938265f34ccb65
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
contract_source_kind: issue_comment
contract_source_id: "https://github.com/squne121/loop-protocol/issues/896#issuecomment-4701860460"
changed_files:
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
all_within_allowed_paths: true
required_auto_actions: []
blockers: []
fix_delta: null
Summary
Issue #896 の実装。
pnpm/action-setup+actions/setup-nodeの重複セットアップ(6 job 分)を Local Composite Action に集約し、astral-sh/setup-uvも同様に Composite Action 化した。Issue #896 をクローズします。 Closes #896
変更内容
以下のファイルを追加・更新した。
.github/actions/setup-node-pnpm/action.ymlを新規追加(pnpm/action-setup@v6+actions/setup-node@v6をラップ).github/actions/setup-python-uv/action.ymlを新規追加(astral-sh/[email protected]をラップ).github/workflows/ci.ymlを更新(6 job で Composite Action を使用、step_idは workflow 側に維持)設計制約の遵守
各 AC に対応する制約を列挙する。
actions/checkoutは Composite Action 内に存在しない(AC4)actions/setup-nodeの cache owner を維持しcache: pnpm/cache-dependency-path: pnpm-lock.yamlを明示(AC5)pnpm/action-setupはrun_install: false(AC6)e2eの Playwright レポートおよび test-results のアップロードは維持(AC8)python-testのci_test_selectionアーティファクトは維持(AC9)ci_verdict_summary_v2関連の変更なし(AC10)@v6/@v8.1.0)は既存.github/workflows/ci.ymlの floating tag 方針に合わせる。full SHA pin への移行は chore(ci): GitHub Actions workflow の SHA pin / actionlint 統合 #280 で追跡中。検証結果 (Verification)
AC1〜AC12 の検証コマンドをローカルで実行した結果はすべて pass。
動作検証方針 (Runtime Verification)
decision: deferred— CI の全 job が green になることで最終確認とする。Checks
以下をすべて実行し、pass を確認した。
pnpm typecheck— タイプエラーなしpnpm lint— lint エラーなしpnpm test— テスト全件 passpnpm build— ビルド成功Schema Change Applicability
GitHub Actions の変更は schema(machine-readable contract)に該当しない。
not_schema_changeSchema Consumer Inventory
対象なし(
not_schema_changeのため)。Safety Claim Matrix
対象なし — CI セットアップのリファクタリングであり、安全境界・権限・サンドボックス・transport・auth に変更を加えない。
Notes
🤖 Claude Code により生成。Generated with Claude Code