Repository navigation
Honor Node runtime pins in agent engine-install steps - #76803
Conversation
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Matt Pocock Skills ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed PR head d61116c80a6f6f224ee247a9e254258af4da9c7e against the runtime contract in docs/src/content/docs/reference/frontmatter.md (Runtimes) and imported-runtime merge semantics in docs/src/content/docs/reference/imports.md.
Blocking finding: all five regenerated locks change the source-configured Node 22 pin to Node 24, so the generated workflows do not implement their own runtimes.node.version: "22" contract. An inline comment is anchored at .github/workflows/daily-fact.lock.yml:868; the same issue occurs in the other four affected locks. Regenerate the locks from the workflow sources and retain Node 22.
No specification synchronization is proposed: the intended runtime-pin behavior is already documented, and this is a generated-artifact conformance regression. Static review only; tests were not run per review instructions.
Generated by PR Specification Reviewer for #76803 · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review-specs to run again
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| node-version: '24' | ||
| node-version: '22' |
There was a problem hiding this comment.
The generated lock now selects Node 24, but this workflow source declares runtimes.node.version: "22". The runtime contract in docs/src/content/docs/reference/frontmatter.md (Runtimes) requires the configured version to be installed, and the same 22→24 mismatch appears in all five regenerated locks. Please regenerate these locks from their sources so the engine-install setup step emits Node 22, or otherwise preserve each source pin.
There was a problem hiding this comment.
Updated in d9f0a98: the daily-fact lock now uses Node 22, matching the workflow source.
|
Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
|
|
||
| if len(npmSteps) > 0 { | ||
| steps = append(steps, npmSteps[0]) // Node.js setup step | ||
| nodeSetupStep := rewriteNodeSetupStep(npmSteps[0], "", resolveNodeSetupVersion(workflowData)) |
There was a problem hiding this comment.
The engine-install path now rewrites only the version (actionRef is explicitly empty), so runtimes.node.action-repo / action-version overrides remain ignored here while the workflow-specific setup path uses resolveNodeSetupActionRef. This can make the engine setup use a different action than the configured runtime. Please pass the resolved action ref here as well (and add coverage for an engine-install action override).
There was a problem hiding this comment.
Fixed in 621a6411: engine Node setup now uses the resolved action ref, with coverage for runtime action overrides.
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Found one actionable issue: the npm engine-install setup rewrites the Node version but leaves configured Node action overrides unapplied, creating inconsistent setup behavior across paths. See the inline comment.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to honor configured Node versions during engine installation.
No open issues 🎉
What changed in this PR
Fixes #76559 by making gh-aw’s agent engine-install steps honor runtimes.node.version, preventing a later Node setup step from overriding the configured runtime.
Changes:
- Apply resolved Node versions to shared setup and npm engine-install steps while preserving defaults and YAML-safe serialization.
- Extend regression coverage for runtime pins and safe quoting.
- Update five generated workflows to retain their configured Node 22 version.
| File | Description |
|---|---|
pkg/workflow/threat_detection_engine_env_test.go |
Tests runtime versions in agent setup and Claude installation, plus safe serialization. |
pkg/workflow/runtime_setup_test.go |
Expects npm engine installation to honor Node 22. |
pkg/workflow/nodejs.go |
Applies resolved runtime versions to Node setup steps. |
.github/workflows/unbloat-docs.lock.yml |
Retains Node 22 during engine installation. |
.github/workflows/hippo-embed.lock.yml |
Retains Node 22 during engine installation. |
.github/workflows/daily-news.lock.yml |
Retains Node 22 during engine installation. |
.github/workflows/daily-hippo-learn.lock.yml |
Retains Node 22 during engine installation. |
.github/workflows/daily-fact.lock.yml |
Retains Node 22 during Codex installation. |
Review effort: Balanced (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design, /diagnosing-bugs, and /tdd. The fix is correct for the cases tested, and the five regenerated locks match compiler output. Posting observations only, with no blocking issues.
📋 Key Themes & Highlights
Key Themes
- Implicit step-identity assumption:
buildNpmEngineInstallStepsWithAWFrewritesnpmSteps[0]unconditionally. On the Copilot path that element is a run step, so this is safe only by accident. - Scope gap:
runtimes.node.action-repoandaction-versionare not honored on the engine-install path. This is pre-existing, and I confirmed it with a probe compile. - Test coverage: the new engine-install assertion covers Claude only. Pi and Copilot also reach this path.
Positive Highlights
- ✅
generateNodeJsSetupStepnow routes through the sharedrewriteNodeSetupStep, so version quoting is consistent across call sites. - ✅ Regression tests assert the actual
node-versionvalue, not just that the step exists. - ✅ Lock files for
daily-fact,daily-hippo-learn,daily-news,hippo-embed, andunbloat-docsnow emit'22', matching the sourceruntimes.node.version.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
|
|
||
| if len(npmSteps) > 0 { | ||
| steps = append(steps, npmSteps[0]) // Node.js setup step | ||
| nodeSetupStep := rewriteNodeSetupStep(npmSteps[0], "", resolveNodeSetupVersion(workflowData)) |
There was a problem hiding this comment.
[/codebase-design] buildNpmEngineInstallStepsWithAWF rewrites npmSteps[0] as the Node.js step, but on the Copilot path that element is the Install GitHub Copilot CLI run step (copilot_installer.go). The rewrite is a no-op only because that step has no node-version: line today.
💡 Suggested guard
Match by step name, as applyNodeSetupOverrides does, so an unrelated step is never rewritten:
step := npmSteps[0]
if extractStepName(strings.Join(step, "\n")) == "Setup Node.js" {
step = rewriteNodeSetupStep(step, "", resolveNodeSetupVersion(workflowData))
}
steps = append(steps, step)@copilot please address this.
There was a problem hiding this comment.
Fixed in 621a6411: the shared installer rewrites only the step named Setup Node.js; Copilot’s installer step remains unchanged.
| return GitHubActionStep{ | ||
| step := GitHubActionStep{ | ||
| " - name: Setup Node.js", | ||
| " uses: " + getActionPinForData("actions/setup-node", data), |
There was a problem hiding this comment.
[/diagnosing-bugs] The version is honored, but runtimes.node.action-version and action-repo are not applied on the engine-install path, because getActionPinForData ignores overrides. I compiled a Claude workflow with action-version: v6.0.0, and both Setup Node steps still pinned v7.1.0. The runtime setup step behaves the same way, so this looks pre-existing rather than a regression from this PR. Consider a follow-up issue or a note in the PR description so the scope is explicit.
@copilot please address this.
There was a problem hiding this comment.
Fixed in 621a6411: explicit action-version is honored by both runtime setup and engine installation instead of silently selecting the latest pin.
| if data == nil { | ||
| data = &WorkflowData{} | ||
| } | ||
| installSteps := NewClaudeEngine().GetInstallationSteps(data) |
There was a problem hiding this comment.
[/tdd] This engine-install check only covers Claude. Pi (pi_engine.go:232) also reaches the nil-data GenerateNodeJsSetupStep() through IncludeNodeSetup, and Copilot takes a separate path via copilot_engine_installation.go:154. Table-drive the check across every engine that installs Node, each with a non-default runtimes.node.version, so a regression in any one caller fails a test.
@copilot please address this.
There was a problem hiding this comment.
Fixed in 621a6411: regression coverage now spans Claude, Codex, Gemini, Pi, and Copilot, checking the configured Node version where setup is used and preserving Copilot’s separate installer step.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "d61116c80a6f6f224ee247a9e254258af4da9c7e",
"kind": "requested",
"schema_version": "1",
"state": "6d5137384eb3b83a654588c19158fbe7f4182cab9ac0c3f7fe3abd45b294949f",
"work": [
"08f0a844a44554b28864f1aca5d5132b898f2844f1c257a6aaefa7601c1d0d59",
"3099e9c18250e081fead667fff9c001d35072f33b47c7cd9a5f563e77076b6b5",
"4e0ced2da229db585d1cbb3698603616de7de0cfe6403ef078974c5250dbea40",
"87649bfcd6d388b3f28a9cce8412a43adb6042af7cb8444305ef9b874adf63bc",
"dab9c4206ec4c31518e61a59621f05f368b7ebf7b083b008dd30770421d372f3"
],
"workflow": "pr-sous-chef"
}
|
…e-js-override Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
|
Category: bug | Risk: medium | Score: 73/100 (impact 39 + urgency 19 + quality 15). Recommended action: batch_review. Batch: pr-batch:copilot-runtime. Reason: runtime pinning fix is important but best reviewed alongside neighboring environment hardening.
|
|
🎉 This pull request is included in a new release. Release: |
Agent engine-install steps hardcoded Node 24, overriding an earlier
runtimes.node.versionsetup onPATH. This left the engine and agent running on an unpinned version.With
runtimes.node.version: "24.22.1", the engine-install step now emits:runtimes.node.version#76559