Agent-job engine-install "Setup Node.js" step ignores `runtimes.node.version`

オープン 初心者向け
#76,559 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, go
領域
ci-cd, devtools

調査の方向性

pkg/workflow/nodejs.goを読み、generateNodeJsSetupStep(data)とresolveNodeSetupActionOverride(data)をたどって、ランタイム設定が生成されるセットアップステップにどう渡されるかを確認してください。インポートされたruntimes.node.versionの値がどのように表現されるかを調べ、その後、関連するworkflowテストを実行するか、焦点を絞ったケースを追加してください。エージェントジョブのエンジンインストール用セットアップで、インポートされた固定バージョンも含め、デフォルトではなく指定されたバージョンが使われれば完了です。

索引モデルが issue の本文から書いたものです。

説明

ai-inspected

Summary

When a workflow pins runtimes.node.version, the agent job still gets a second Setup Node.js step that uses the compiler default node-version: '24'. That step comes right before Install AWF binary / the engine CLI install, so it runs after the pinned runtime setup step and overrides it on PATH. The agent and the engine CLI therefore run on whatever 24.x the runner resolves, not on the pinned version.

This is the same class of bug as #65939 (threat-detection job), which ADR 66040 fixed only for the detection / evals jobs.

Repro

Frontmatter:

engine:
  id: claude
runtimes:
  node:
    version: "24.22.1"

Compiled with gh-aw v0.93.2, the agent job contains:

      - name: Setup Node.js            # runtime setup step, honors the pin
        uses: actions/setup-node@... # v7.1.0
        with:
          node-version: '24.22.1'
      ...
      - name: Setup Node.js            # engine install step, ignores the pin
        uses: actions/setup-node@... # v7.1.0
        with:
          node-version: '24'
          package-manager-cache: false
      - name: Install AWF binary
      - name: Install Claude Code CLI

The detection job correctly emits '24.22.1'.

Cause

pkg/workflow/nodejs.go, generateNodeJsSetupStep hardcodes constants.DefaultNodeVersion:

fmt.Sprintf("          node-version: '%s'", constants.DefaultNodeVersion),

It already honors runtimes.node.action-repo / action-version through resolveNodeSetupActionOverride(data), but not version. This is still the case on main as of 2026-11-10 (also present in v1.2.2).

Expected

When runtimes.node.version is set (including through imports), generateNodeJsSetupStep(data) should emit that version. Alternatively, it should skip the redundant setup-node step when the runtime setup step has already installed Node in the same job.

Impact

Anyone who pins Node for a security fix ends up with the engine and agent running on an unpinned Node. The only workaround is to hand-patch the .lock.yml after every gh aw compile.

主要言語
Go
スター
5.6k
フォーク
615
平均マージ
5時間 21分
マージ済み PR(30日)
792

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-aw のほかの issue

github/gh-aw の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。