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

Abierto Apto para principiantes
#76,559 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, go
Área
ci-cd, devtools

Línea de trabajo

Lee pkg/workflow/nodejs.go y sigue generateNodeJsSetupStep(data) junto con resolveNodeSetupActionOverride(data) para ver cómo llegan los ajustes del runtime al paso de configuración generado. Comprueba cómo se representan los valores importados de runtimes.node.version y, después, ejecuta las pruebas pertinentes del workflow o añade un caso específico. El trabajo estará terminado cuando la configuración de instalación del motor del trabajo del agente use la versión fijada, también si la versión se ha importado, en lugar de la predeterminada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
5.6k
Forks
615
Merge medio
5 h 21 min
PR fusionados (30 d)
792

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-aw

Todos los issues de github/gh-aw

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.