Repository navigation
Closed
Labels
phase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "CI ワークフローの actions を v6 系に更新し、Node.js 20 deprecation(2026-06-16 強制切替)に対応する"
change_kind: workflowParent Issue
なし(単独改善)
Parent Goal Ref
- Goal:
.github/workflows/ci.ymlで使用しているactions/checkout@v4、pnpm/action-setup@v4、actions/setup-node@v4を v6 系に更新し、Node.js 20 action の deprecation warning を解消する。PR docs(#257): ADR 0002 — SDD ツール採否(Spec Kit upstream-compatible / accepted-with-deferral)を確定する #269 の typecheck CI はすでに SUCCESS(2026-05-23 06:41)になっているが、Node.js 20 actions の deprecation(2026-06-16 に Node.js 24 強制切替、fall 2026 に Node.js 20 runner から削除)により全 GitHub Actions が壊れるリスクが継続している。 - Desired Destination: 全ジョブ(typecheck / lint / test / build / python-test)の actions が v6 系に更新され、Node.js 20 deprecation warning が解消された状態になる。
Current Validated Scope
.github/workflows/ci.ymlの全ジョブで使用している actions のバージョンアップactions/checkout@v4→actions/checkout@v6(最新 stable: v6.0.2)pnpm/action-setup@v4→pnpm/action-setup@v6(最新: v6.0.8)actions/setup-node@v4→actions/setup-node@v6(最新: v6.4.0)persist-credentials: falseを checkout step に追加(read-only CI では安全側)refは明示しない(pull_requestの既定で PR merge commit を検証する動作を維持)
setup-uvを使用する python-test ジョブについては、現行バージョン(setup-uv@v5)を確認した上で対応要否を判断する
Remaining Parent Gaps
なし
Background
PR #269 CI の実行結果(https://github.com/squne121/loop-protocol/actions/runs/26325529912)で typecheck のみ fail が発生していた。ただし PR #269 の typecheck CI はその後 SUCCESS(2026-05-23 06:41)になっており、「PR #269 unblock」という元の緊急目的は解消されている。
当該 run のログでは、以下の deprecation warning が記録されていた:
actions/checkout@v4、actions/setup-node@v4、pnpm/action-setup@v4が Node.js 20 action として deprecation warning を出力- 2026-06-16 から Node.js 24 強制切替(公式 changelog による正確な日付)
- fall 2026 に Node.js 20 が runner から削除される予定(公式発表は fall 2026 のみ)
修正方針の根拠:
contents: readで checkout は動作する(pull-requests: readは checkout に不要)。同一 run の lint / test / build もactions/checkout@v4+contents: readで正常動作している点が根拠。ref: github.event.pull_request.head.shaは merge commit ではなく HEAD commit を checkout するため、PR merge commit 検証を放棄することになる。AC と矛盾するため採用しない。actions/checkout@v6は credential handling を改善し、Node 24 runtime で動作する。
修正後の最小構成(全ジョブ共通):
permissions:
contents: read
jobs:
typecheck:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# ref は指定しない。pull_request の既定で PR merge commit を検証する。
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheckSource
- dedupe_key: "follow-up:squne121/loop-protocol:docs(#257): ADR 0002 — SDD ツール採否(Spec Kit upstream-compatible / accepted-with-deferral)を確定する #269"
- origin: PR docs(#257): ADR 0002 — SDD ツール採否(Spec Kit upstream-compatible / accepted-with-deferral)を確定する #269 pr-review-judge non-blocker observation [1] → anchor comment (OWNER, 2026-05-23T06:37:56Z) による reframe_in_place
Outcome
.github/workflows/ci.yml の全ジョブで actions が v6 系に更新され、Node.js 20 deprecation warning が解消された状態になる。PR merge commit checkout の動作(pull_request イベントの既定)は維持される。
In Scope
.github/workflows/ci.ymlの全ジョブ(typecheck / lint / test / build)における以下の actions バージョンアップ:actions/checkout@v4→actions/checkout@v6(persist-credentials: false を追加)pnpm/action-setup@v4→pnpm/action-setup@v6actions/setup-node@v4→actions/setup-node@v6
- python-test ジョブの setup-uv バージョン確認(setup-uv@v5 が適切かどうかを確認)
Out of Scope
- typecheck ジョブのロジック変更(
pnpm typecheckコマンド自体は正常) - PR docs(#257): ADR 0002 — SDD ツール採否(Spec Kit upstream-compatible / accepted-with-deferral)を確定する #269 のコード内容変更
ref: github.event.pull_request.head.shaへの切り替え(merge commit 検証を放棄するため)pull-requests: read権限の追加(checkout に不要なことが確認済み)
Acceptance Criteria
- PR の
pull_requestrun で全ジョブ(typecheck / lint / test / build / python-test)のactions/checkoutstep が成功している - typecheck ジョブで
pnpm typecheckが実行され、exit 0 で完了している(型エラーなし) - PR merge commit を checkout している(
pull_requestイベントの既定動作を維持。head SHA に切り替える場合は Issue contract 更新後に実装し、「merge commit 検証を放棄する」トレードオフを明記する) - Node.js 20 deprecation warning が CI ログから解消されている
- 全ジョブ(typecheck / lint / test / build / python-test)が actions v6 系に更新されている
- workflow permissions は least privilege を維持する(
contents: readを基本とし、追加権限は不要性の根拠を明記する) - lint / test / build / python-test の各ジョブが引き続き PASS する(デグレなし)
Verification Commands
gh pr checks <PR番号> --repo squne121/loop-protocol— 全ジョブが pass になっていることを確認pnpm typecheck— ローカルで TypeScript 型エラーなしpnpm lint— ESLint エラーなしpnpm test— Vitest 全件 PASSpnpm build— vite build 成功- CI ログで Node.js 20 deprecation warning が出ていないことを確認
Allowed Paths
.github/workflows/ci.yml
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- 再実行(re-run)で typecheck が成功し、再現性が確認できない場合は権限変更を blind patch しない
ref: github.event.pull_request.head.shaが必要と判断した場合は、Issue contract 更新後に実装する(merge commit 検証を放棄するトレードオフを明記すること)contents: readで checkout できない原因が repository / organization / fork security policy にある場合は、PAT や secrets に逃げず、セキュリティ方針の別 Issue に分割する
Runtime Verification Applicability
- decision: deferred
- reason: actions バージョンアップが正常に動作するかどうかは PR を実際に push して GitHub Actions を実行しなければ確認できず、ローカル静的検証では完結しない
- if deferred:
- deferred_destination:
- destination_type: pr
- destination_ref: 本 Issue の実装 PR の CI 結果で確認(PR URL は実装後に更新)
- deferred_verification_condition: 修正を含む PR の CI 全ジョブ(typecheck / lint / test / build / python-test)が PASS し、Node.js 20 deprecation warning が解消されること
- deferred_destination:
Required Skills
- GitHub Actions / workflow permissions
- actions/checkout@v6
- Node.js 20 deprecation 対応
Scope Delta
本文を anchor comment (OWNER, 2026-05-23T06:37:56Z) の reframe_in_place 指示に基づき以下の通り変更:
- Outcome を「PR docs(#257): ADR 0002 — SDD ツール採否(Spec Kit upstream-compatible / accepted-with-deferral)を確定する #269 unblock」から「CI インフラ改善(全ジョブの actions v6 更新、Node.js 20 deprecation 対応)」に変更
- 原因仮説セクションを修正(
pull-requests: read不足・head.shaworkaround の仮説を削除) - 修正方針を
actions/checkout@v6、pnpm/action-setup@v6、actions/setup-node@v6+persist-credentials: falseに変更 - In Scope を全ジョブ対象に拡大
- Out of Scope から「他の CI ジョブの改修は out of scope」を削除
- AC に Node.js 20 deprecation warning 解消・全ジョブ対応・merge commit 検証維持を追加
- Stop Conditions に再実行による再現性確認・head.sha 切替時の contract 更新・security policy 分割を追加
- Node.js 20 deprecation 日付を「2026年6月2日」→「2026年6月16日」、「2026年9月16日」→「fall 2026」に修正
- title を「CI ワークフローを actions v6 に更新し Node.js 20 deprecation に対応する」に変更
Delivery Rule
1 Issue = 1 PR- Draft PR 既定(CI 確認後に Ready for Review に変更する)
Metadata
Metadata
Assignees
Labels
phase/implementationImplementation phase
Activity
squne121 commentedon May 23, 2026
判定
REQUEST CHANGES 相当。
Issue #270 は「PR #269 の typecheck CI を unblock する」という目的自体は妥当ですが、現状の本文は 原因仮説が弱いまま
pull-requests: read追加またはhead.shacheckout に誘導している のが危険です。このまま AI エージェントに実装させると、CI を通すだけの cargo-cult fix になり、PR merge commit を検証するというブランチ保護上の意味を壊す可能性があります。
確認した事実
Issue #270 は PR #269 の typecheck CI failure を対象にした workflow 修正 Issue で、本文では「TypeScript 型エラーではなく
actions/checkout@v4が PR merge commit を fetch する際の認証エラー」と判断し、pull-requests: read追加またはgithub.event.pull_request.head.shacheckout を第一候補にしています。([GitHub]1) ([GitHub]1)PR #269 は Issue #257 の ADR 追加PRで、レビュー上は実装内容・ローカル検証は PASS、ただし CI は
typecheckだけ FAILURE、lint / test / build / python-testは PASS と扱われています。([GitHub]2)現行
.github/workflows/ci.ymlは workflow レベルでpermissions: contents: readを設定済みで、typecheck / lint / test / buildはいずれもactions/checkout@v4、pnpm/action-setup@v4、actions/setup-node@v4、Node 22、pnpm 11 というほぼ同一構成です。([GitHub]3)該当 run では pull_request トリガーで実行され、
typecheckの annotation は/usr/bin/gitexit code 128 およびcould not read Username for 'https://github.com': terminal prompts disabledです。([GitHub]4) ([GitHub]4)ブロッカー
1.
pull-requests: read不足が原因という推定が弱いactions/checkoutの公式 README は、checkout 利用時の推奨GITHUB_TOKEN権限としてcontents: readを示しています。([GitHub]5)一方、Issue #270 の本文は
contents: readがあるにもかかわらずpull-requests: read不足を第一候補にしています。これは根拠が薄いです。GitHub Actions の permissions 仕様上、pull-requests: readは存在しますが、未指定 permission はnoneになるという一般仕様であって、checkout が PR merge ref を fetch するためにpull-requests: readを要求する、という根拠にはなりません。([GitHub Docs]6) ([GitHub Docs]6)さらに致命的なのは、同じ workflow 内の他ジョブは
actions/checkout@v4を通過している点です。現行 CI は全ジョブでほぼ同じ checkout 設定なのに、typecheck だけ落ちています。([GitHub]3)したがって、まず必要なのは「権限不足の修正」ではなく、同一 run 内で typecheck の checkout だけ失敗した理由の切り分けです。
2.
github.event.pull_request.head.shaは Issue の Acceptance Criteria と矛盾するIssue #270 の AC は「typecheck ジョブが PR merge commit を正常に checkout できる」ことです。([GitHub]1)
しかし
ref: ${{ github.event.pull_request.head.sha }}は、公式 README 上も「merge commit ではなく pull request HEAD commit を checkout する」方法です。([GitHub]5)GitHub の pull_request イベントでは
GITHUB_SHAは PR merge branch の最後の merge commit であり、head branch の最後の commit ID が欲しい場合にgithub.event.pull_request.head.shaを使う、と公式ドキュメントが明記しています。([GitHub Docs]7)つまり head SHA に切り替えると、merge commit の検証をやめることになります。これは「CI を通す」目的には効く可能性がありますが、ブランチ保護の品質保証としては弱くなります。
3.
typecheckだけを直すスコープが不自然Issue #270 は他ジョブ改修を out of scope にしていますが、現行 workflow は全ジョブで同じ古い action major を使っています。([GitHub]1) ([GitHub]3)
該当 run では
actions/checkout@v4、actions/setup-node@v4、pnpm/action-setup@v4が Node.js 20 action として deprecation warning を出しており、2026年6月2日から Node.js 24 強制、2026年9月16日に Node.js 20 が runner から削除される旨も表示されています。([GitHub]4)これは #270 の直接原因ではないかもしれませんが、CI infra 修正 Issue としては見逃すべきではありません。
checkout@v6は credential handling を改善し、checkout@v5以降は Node 24 runtime です。([GitHub]5)actions/setup-nodeも現行 README はactions/setup-node@v6を例示し、Node version は明示指定推奨です。([GitHub]8)pnpm/action-setupも README の使用例はpnpm/action-setup@v6です。([GitHub]9)推奨する Issue 高品質化
Issue #270 は、本文を次の方向に修正した方がよいです。
修正方針
最小修正案: merge commit 検証を維持する。
persist-credentials: falseは、CI が authenticated git command を後続で実行しないなら妥当です。checkout はデフォルトで token を local git config に保持し、post-job cleanup で削除しますが、不要なら opt-out できます。([GitHub]5)Issue 本文に追加すべき診断タスク
Acceptance Criteria の差し替え案
Stop Conditions の追加案
実装優先順位
head.shaworkaround は使わない。 使うなら Issue の目的を「merge commit checkout」から変更する。actions/checkout@v6、actions/setup-node@v6、pnpm/action-setup@v6へ更新。 CI infra 修正として妥当。persist-credentials: falseを付与。 後続 git push 等をしない read-only CI では安全側。pull-requests: readは最後。 追加するなら「なぜcontents: readだけでは不足するのか」を明記する。結論として、#270 は「CI checkout 認証エラーの修正 Issue」としては成立していますが、現状の本文は 原因同定・検証設計・ref semantics の扱いが甘い です。特に
head.shaは unblock には効いても、PR merge commit 検証という CI の意味を変えるため、第一候補から外すべきです。[-]infra: typecheck CI の FAILURE(actions/checkout@v4 認証エラー)を修正する[/-][+]infra: CI ワークフローを actions v6 に更新し Node.js 20 deprecation に対応する[/+]squne121 commentedon May 23, 2026
Issue 本文更新の経緯
anchor comment (OWNER, squne121, 2026-05-23T06:37:56Z) の
reframe_in_place指示に基づき、edit-issueskill の手順で以下の変更を適用しました。変更概要
タイトル変更:
infra: typecheck CI の FAILURE(actions/checkout@v4 認証エラー)を修正するinfra: CI ワークフローを actions v6 に更新し Node.js 20 deprecation に対応するOutcome の reframe:
削除した原因仮説:
pull-requests: read不足が原因という仮説(contents: readで checkout は動作する。同一 run の他ジョブが通過していることが根拠)ref: github.event.pull_request.head.shaworkaround(merge commit 検証を放棄することになり、AC と矛盾)修正方針の具体化:
actions/checkout@v6(v6.0.2)+persist-credentials: falsepnpm/action-setup@v6(v6.0.8)actions/setup-node@v6(v6.4.0)refは明示しない(pull_request既定で PR merge commit 検証を維持)スコープ拡大:
日付修正(NBI-3):
2026年6月2日→2026-06-16(公式 changelog の正確な日付)2026年9月16日→fall 2026(公式発表は fall 2026 のみ)追加した Stop Conditions:
head.sha切替が必要な場合は Issue contract 更新後に実装contents: read不足が security policy 由来の場合は別 Issue に分割変更分類
squne121 commentedon May 23, 2026
issue-refinement-loop: 完了 (2026-05-23T07:10:00Z)
reframe_in_place分類に基づき以下を更新pull-requests: read不足仮説・head.shaworkaround を削除(外部仕様で否定)actions/checkout@v6+persist-credentials: falseに具体化issue-contract-reviewで着手前 preflight を実施してくださいsqune121 commentedon May 23, 2026
Contract Snapshot (2026-05-23T07:00:00Z)
CONTRACT_REVIEW_RESULT_V1:
.github/workflows/ci.ymlの全ジョブで actions が v6 系に更新され、Node.js 20 deprecation warning が解消された状態になる。pull_requestrun で全ジョブのactions/checkoutstep が成功pnpm typecheckが exit 0 で完了pull_requestイベントの既定動作を維持)contents: read基本)gh pr checks,pnpm typecheck,pnpm lint,pnpm test,pnpm build.github/workflows/ci.yml.claude/worktrees/issue-270-ci-actions-v6-node-js-20-deprecationworktree-issue-270-ci-actions-v6-node-js-20-deprecationgh pr checksPR未作成), 想定外 pass = 0, 実行不可 = 0squne121 commentedon May 23, 2026
implement-issue: 実装完了 (2026-05-23T07:00:00Z)
.claude/worktrees/issue-270-ci-actions-v6-node-js-20-deprecationworktree-issue-270-ci-actions-v6-node-js-20-deprecationactions/checkout@v4→actions/checkout@v6+persist-credentials: false追加pnpm/action-setup@v4→pnpm/action-setup@v6actions/setup-node@v4→actions/setup-node@v6astral-sh/setup-uv@v5は最新 stable のため維持fix(ci): setup-uv を v8.1.0 に更新して Node.js 20 deprecation を解消 (#270)
fix(ci): actions を v6 に更新し Node.js 20 deprecation に対応 (#270) (#279)
squne121 commentedon May 23, 2026
post-merge-cleanup: 完了 (2026-05-23T07:50:00Z)
cleanup サマリ:
worktree-issue-270-ci-actions-v6-node-js-20-deprecation→ 削除済み.claude/worktrees/issue-270-ci-actions-v6-node-js-20-deprecation→ 削除済み