Repository navigation
Closed
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "CI の Node/pnpm/uv setup 重複を Composite Action に集約し、version 管理の一元化と将来の cache 調整を容易にする"
change_kind: workflowParent Issue
none(単独改善)
Parent Goal Ref
- Goal: CI YAML の Node/pnpm/uv setup 重複を削減し、設定の一元管理を実現する
- Desired Destination: .github/actions/setup-node-pnpm / setup-python-uv が追加され、ci.yml の重複 setup が置き換えられた状態
Current Validated Scope
.github/actions/setup-node-pnpm/action.ymlを新規作成する(pnpm/action-setup/actions/setup-node/cache: pnpm/cache-dependency-path: pnpm-lock.yamlを集約。actions/checkoutとpnpm installは含めない).github/actions/setup-python-uv/action.ymlを新規作成する(astral-sh/setup-uvを集約。uv python install/uv syncは含めない).github/workflows/ci.ymlの重複 setup を Composite Action 呼び出しに置き換える(actions/checkoutは各 job に残す・pnpm install/uv syncは workflow 側 timed step に残す)
Remaining Parent Gaps
- CI Runtime Baseline 計測との連携(実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895 が先行)
- Playwright E2E 安定化(別 Issue 化予定)
- S3 cache / self-hosted runner 採用判断(計測後)
Outcome
.github/actions/setup-node-pnpm/action.yml と .github/actions/setup-python-uv/action.yml が追加され、.github/workflows/ci.yml の重複 setup が置き換えられ、既存 CI が同等の検証結果を維持した状態になる。
In Scope
.github/actions/setup-node-pnpm/action.ymlを新規作成する(pnpm/action-setup/actions/setup-node/ cache 設定を集約。actions/checkoutとpnpm installは含めない).github/actions/setup-python-uv/action.ymlを新規作成する(astral-sh/setup-uvを集約。uv python install/uv syncは含めない).github/workflows/ci.ymlの typecheck / lint / test / build / e2e / python-test job の setup 重複を Composite Action 呼び出しに置き換える- Node version / pnpm version / cache-dependency-path を action.yml 内で一元管理する
pnpm installは各 job の timed step として workflow 側に残す- cache owner は
actions/setup-nodeとし、cache: pnpmとcache-dependency-path: pnpm-lock.yamlを明示する astral-sh/setup-uvの version pin / cache policy を action.yml で一元管理する。uv python install/uv syncは workflow 側 timed step に残す- Composite Action の inputs/description で利用範囲を明記する
actionlintがエラーなしで通ることを確認する
Out of Scope
- S3 cache は導入しない
node_modulescache は導入しない- CI job 構成の大幅な統廃合は行わない
- Playwright Docker 化は別 Issue で行う
- CI 高速化の実測数値検証は別 Issue(実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895)で行う
Required Design Constraints
- Local Composite Action は
actions/checkout後にしか呼び出さない。actions/checkoutは Composite Action 内へ移動しない。 pnpm install/uv python install/uv syncの stablestep_id/phase_idは 実装: CI Runtime Baseline を収集し job / step 単位の所要時間を可視化する #895 runtime baseline の証跡維持のため workflow 側 timed step に残す。setup-node-pnpmの cache owner はactions/setup-nodeとし、cache: pnpmとcache-dependency-path: pnpm-lock.yamlを明示する。pnpm/action-setupのrun_installはfalseにする。- Python patch pin / uv version pin policy は Python/uv の patch-level reproducibility 方針を明文化し、必要なら uv と Python patch を固定する #375 の範囲であり、本 Issue では現行挙動を変更しない。
e2eの Playwright 実行方式(調査: Playwright E2E の実行方式を比較し browser install 失敗と visual 差分を安定化する #897)、CI verdict schema(実装: CI verdict artifact を正規化し AIエージェントの CI 待機・判定を安定化する #898)は変更しない。.github/actions/**/action.yml内の upstream actions も既存の action pinning policy (chore(ci): GitHub Actions workflow の SHA pin / actionlint 統合 #280/実装: GitHub Actions の Node.js 20 deprecation を first-party action の Node 24 同梱版更新で解消する #731) の対象とする。floating tag を許すのか full SHA pin を要求するのかは、既存ポリシーに合わせる。
Acceptance Criteria
- AC1:
.github/actions/setup-node-pnpm/action.ymlが追加されている - AC2:
.github/actions/setup-python-uv/action.ymlが追加されている - AC3:
typecheck / lint / test / build / e2e / python-testjob が checkout 後に local Composite Action を使用している - AC4:
actions/checkoutは local Composite Action 内に存在しない - AC5:
actions/setup-nodeのcache: pnpmとcache-dependency-path: pnpm-lock.yamlがsetup-node-pnpm/action.ymlに明示されている - AC6:
pnpm/action-setupはrun_install: falseで pnpm version setup のみを担当する - AC7:
pnpm_install/uv_python_install/uv_syncの runtime baselinestep_idが workflow 側に維持されている - AC8:
e2eの Playwright report / test-results upload と visual evidence summary が維持されている - AC9:
python-testのci_test_selectionartifact が維持されている - AC10:
ci_verdict_summary_v2関連の変更が含まれていない - AC11:
actionlint .github/workflows/ci.ymlがエラーなしで通る - AC12:
pnpm typecheck/pnpm lint/pnpm test/pnpm buildが通る
Verification Commands
# AC1
$ test -f .github/actions/setup-node-pnpm/action.yml
# AC2
$ test -f .github/actions/setup-python-uv/action.yml
# AC3
$ rg -c "setup-node-pnpm|setup-python-uv" .github/workflows/ci.yml
# AC4
# baseline-expect: fail
$ rg -L -e "actions/checkout" .github/actions/setup-node-pnpm/action.yml
# baseline-expect: fail
$ rg -L -e "actions/checkout" .github/actions/setup-python-uv/action.yml
# AC5
# baseline-expect: fail
$ rg -c "cache-dependency-path" .github/actions/setup-node-pnpm/action.yml
# AC6
# baseline-expect: fail
$ rg -c "run_install.*false" .github/actions/setup-node-pnpm/action.yml
# AC7
# baseline-expect: pass
$ rg -c "pnpm_install|uv_python_install|uv_sync" .github/workflows/ci.yml
# AC8
# baseline-expect: pass
$ rg -c "upload-artifact|test-results" .github/workflows/ci.yml
# AC9
# baseline-expect: pass
$ rg -c "ci_test_selection" .github/workflows/ci.yml
# AC10
$ rg -L "ci_verdict_summary_v2" .github/workflows/ci.yml
# AC11
# actionlint は CI gate で検証。ローカルでは setup-node-pnpm/action.yml 内の uses: 記述が shell 指定を持つことを確認
# baseline-expect: fail
$ rg -c "shell:" .github/actions/setup-node-pnpm/action.yml
# baseline-expect: fail
$ rg -c "shell:" .github/actions/setup-python-uv/action.yml
# AC12
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm buildAllowed Paths
- .github/actions/setup-node-pnpm/action.yml
- .github/actions/setup-python-uv/action.yml
- .github/workflows/ci.yml
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- GitHub Actions Composite Action(inputs / steps / uses)
- pnpm cache 設定(cache-dependency-path)
- uv Python 環境管理(uv sync / uv python install)
Scope Delta(任意)
N/A
Delivery Rule
1 Issue = 1 PR。worktree を使用。Draft PR として起票し、CI 通過後に ready にする。
Runtime Verification Applicability
decision: deferred
applicability: deferred
deferred_destination: CI pass (GitHub Actions run after PR merge)
deferred_verification_condition: PR の CI が全 job green になること
reasoning: AC1〜AC12 の大半は新規ファイル作成(.github/actions/**)後にのみ検証可能。pnpm/actionlint は CI runtime での確認が必要。実装後 CI pass をもって verified とする。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Jun 14, 2026
判定
#896 は方向性は妥当ですが、このまま実装に渡すのは NG です。
主因は、#895 実装後の
.github/workflows/ci.yml実体と #896 の契約がずれており、Composite Action 化によって CI runtime baseline 証跡・E2E evidence・uv/Python 再現性・workflow supply-chain policy を壊すリスクが高いためです。#896 自体のコメントは 0 件でした。
Blocking findings
1.
actions/checkoutをローカル Composite Action 内に入れる設計が危険#896 は
.github/actions/setup-node-pnpm/action.ymlにactions/checkout / pnpm/action-setup / actions/setup-node / pnpm installを集約するとしています。しかし、同一リポジトリ内のローカル action を
uses: ./.github/actions/...で呼ぶには、その action 定義ファイルが runner 上に存在している必要があります。GitHub 公式の同一 repo composite action 利用例も、先にactions/checkoutを実行してからローカル action を呼び出す構造です。Composite action 内のrunstep にはshell指定も必要です。([GitHub Docs]1)修正:
actions/checkoutは各 job の最初の step として残す。setup-node-pnpm/setup-python-uvは checkout 後に呼ぶ。#896 の In Scope から「checkout を集約」を削除すべきです。2. #895 の runtime baseline を壊す
現在の
ci.ymlはすでに #895 により、pnpm_install,pnpm_typecheck,uv_python_install,uv_syncなどをmeasurements.jsonlに記録し、ci_runtime_baseline_v1.jsonartifact と Step Summary を出す構造になっています。たとえば typecheck job はpnpm installを timed step として記録しています。python-test job でも
uv python install,uv sync --locked --group dev,pnpm installが個別に timed step 化されています。#896 が
pnpm installやuv syncを Composite Action の内部に隠すと、#895 が意図した stable phase id / step_id の before/after 比較が不透明になります。#895 は #896 後も比較できる stable phase id を要求しており、CI 高速化の順序も「baseline measurement → setup 重複削減 → E2E 安定化 → cache 拡張」です。修正: #896 では原則として
pnpm install,uv python install,uv syncを workflow 側の timed step に残す。Composite Action は「toolchain setup + cache 設定」までに限定するのが安全です。3. In Scope と AC が矛盾している
#896 の In Scope は
typecheck / lint / test / build / e2e / python-testの setup 重複置換を対象にしています。一方で AC3 / AC7 は
typecheck / lint / test / buildだけを検証対象にしており、e2eとpython-testが抜けています。これは危険です。
e2eは Playwright report / test-results を持つ evidence producer、python-testはci_test_selectionartifact を持つ agent-ops evidence job と定義されています。この 2 job こそ壊してはいけない対象です。
修正: AC3 / AC7 に
e2eとpython-testを必ず含める。逆に #896 で触らないなら In Scope から外す。4. cache 設定の責務が曖昧
現在の workflow は
actions/setup-node@v6でcache: pnpmを指定していますが、cache-dependency-path: pnpm-lock.yamlはありません。actions/setup-nodeは pnpm cache とcache-dependency-pathをサポートし、依存ファイルの hash を使います。ただしnode_modulesは cache しません。([GitHub]2) ([GitHub]2)一方、
pnpm/action-setup側にもrun_installや cache 関連 option がありますが、同 action は Node.js 自体は setup しないため、通常はactions/setup-nodeと併用します。([GitHub]3)修正: cache owner を 1 つに決める。現行に合わせるなら
actions/setup-nodeを cache owner とし、setup-node-pnpm/action.yml内で以下を明示する。5. uv / Python reproducibility policy と衝突しうる
#375 は、
.python-version=3.12と CI assertion は minor-level pin であり、patch version / uv version / uv-managed Python distribution artifact / runner platform は未固定だと整理しています。必要なら.python-versionを3.12.xまで固定し、setup-uvの version pin も検討する方針です。astral-sh/setup-uvは uv version を明示しない場合、設定ファイルや latest 解決に依存します。またpython-versioninput は.python-version等を上書きできます。([GitHub]4)さらに setup-uv には
uv python installを使う方式と、GitHub runner 既存 Python / setup-python を使う方式のトレードオフもあります。([GitHub]4)修正: #896 は Python patch pin / uv version pin の policy を決めない。
setup-python-uvは現行挙動を維持し、#375 の決定を先取りしない、と Required Design Constraints に書くべきです。6. supply-chain policy をローカル action の中に隠す
#280 系では workflow action の SHA pin / actionlint 統合が追跡されており、
.github/workflows/ci.ymlの action を floating tag から commit SHA pin に移す方針が存在します。#731 でも Node 24 同梱版への更新や full SHA pin、CI warning 消失確認が論点になっています。
Composite Action 化すると、
ci.yml上から upstream action のuses:が見えにくくなります。これは悪くありませんが、pinning policy の検査対象が.github/actions/**/action.ymlに移るだけです。修正: AC に「
.github/actions/**/action.yml内の upstream actions も既存 pinning policy の対象」と明記する。少なくとも floating tag を許すのか full SHA pin を要求するのかを #896 で曖昧にしない。推奨する設計修正
#896 は次の形に縮小するのが安全です。
setup-node-pnpmの責務:setup-python-uvの責務:e2eについては、#897 が Playwright Docker image / browser install / visual diff 安定化を調査対象にしているため、#896 では Playwright install の方式変更をしない方がよいです。#898 の
ci_verdict_summary_v2も別 Issue なので、#896 で verdict artifact / merge-ready 判定 schema に触れてはいけません。Issue 本文に追加すべき Required Design Constraints
AC の差し替え案
最終判断
#896 は 「setup 重複削減」自体は採用可です。ただし現状の契約は、checkout の実行順序、#895 runtime baseline、e2e/python-test evidence、uv 再現性、action pinning policy を十分に守れていません。
実装前に、Composite Action は checkout 後に呼ぶ・install/sync は timed step として残す・e2e/python-test を AC に含める、この 3 点を最低限リファインしてください。
squne121 commentedon Jun 14, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: max iterations exceeded
human_escalationmax_iterations_exceededBlockers
squne121 commentedon Jun 14, 2026
Refinement residual fixes applied: added Runtime Verification decision and normalized AC9 baseline-expect comment. Ready for implementation.
squne121 commentedon Jun 14, 2026
CONTRACT_REVIEW_RESULT_V1
Checks
Handoff to implement-issue
注記(AC annotation 改善推奨 / non-blocking)
実装完了後の将来の preflight 精度向上のために、以下の VC アノテーション追加を推奨します(本 Issue への blocking 要因ではない):
# baseline-expect: passを追加# baseline-expect: passを追加fix(#896): setup-python-uv から未使用 uv-version input を削除
impl(#896): Node/pnpm/uv setup を Composite Action 化して CI YAML 重複を削減する (…