Skip to content

Preserve setup-ruby PATH precedence inside AWF - #58311

Merged
pelikhan merged 10 commits into
mainfrom
copilot/fix-getnpm-bin-path-setup
Sep 4, 2026
Merged

Preserve setup-ruby PATH precedence inside AWF#58311
pelikhan merged 10 commits into
mainfrom
copilot/fix-getnpm-bin-path-setup

Conversation

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

GetNpmBinPathSetup prepended every cached runtime bin directory, allowing an older cached Ruby to override the version selected by ruby/setup-ruby.

  • PATH ordering

    • Append discovered tool-cache directories after the existing host PATH.
    • Retain explicit GOROOT/bin and ERLANG_HOME/bin precedence.
    • Avoid introducing an empty PATH entry when no cached bins exist.
  • Regression coverage

    • Verify the selected Ruby remains authoritative when another version is cached.
    • Verify cache-only npm binaries remain discoverable.
    • Update generated command snapshots.

Copilot AI and others added 3 commits September 3, 2026 21:40
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GetNpmBinPathSetup overriding Ruby version Preserve setup-ruby PATH precedence inside AWF Sep 3, 2026
Copilot AI requested a review from pelikhan September 3, 2026 21:45
@pelikhan
pelikhan marked this pull request as ready for review September 3, 2026 21:48
Copilot AI balanced review requested due to automatic review settings September 3, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Ruby regression test must place the selected Ruby outside the tool-cache directory to verify PATH precedence correctly.

Pull request overview

Preserves setup-selected runtime PATH precedence while keeping cached npm binaries discoverable.

Changes:

  • Appends cached tool binaries after the existing PATH.
  • Retains Go/Erlang precedence.
  • Updates regression coverage, snapshots, and AWF workflow locks.
File summaries
File Description
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Updates generated command snapshot.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden Updates generated command snapshot.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden Updates generated command snapshot.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Updates generated command snapshot.
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden Updates Pi command snapshot.
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden Updates Gemini command snapshot.
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden Updates Copilot command snapshot.
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden Updates Codex command snapshot.
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden Updates Claude command snapshot.
pkg/workflow/nodejs.go Changes cached-bin PATH ordering.
pkg/workflow/engine_helpers_test.go Adds Ruby/npm coverage, but the Ruby test’s selected binary is inside the tool cache, so it does not catch the prior regression.
.github/workflows/smoke-ci.lock.yml Refreshes generated AWF pins.
.github/workflows/notion-issue-summary.lock.yml Refreshes generated AWF pins.
.github/workflows/hippo-embed.lock.yml Refreshes generated AWF pins.
.github/workflows/firewall.lock.yml Refreshes generated AWF pins.
.github/workflows/example-permissions-warning.lock.yml Refreshes generated AWF pins.
.github/workflows/daily-arxiv-researcher.lock.yml Refreshes AWF pins and generated configuration.
.github/workflows/codex-github-remote-mcp-test.lock.yml Refreshes generated AWF pins.
Review details
  • Files reviewed: 19/308 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@pelikhan pelikhan added the awf label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • github.com
  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"
    - "proxy.golang.org"

See Network Configuration for more information.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch PR file list

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer failed. Please review the logs for details.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #58311

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd to this focused bug fix. The change correctly diagnoses the root cause (prepending cached toolcache bins was shadowing the version ruby/setup-ruby already put earlier on PATH) and switches to appending discovered bins after the existing PATH, which generically preserves precedence for any tool already resolved via actions/setup-*. GOROOT/ERLANG_HOME are explicitly re-prepended since those tools aren't already on PATH before this runs.

📋 Key Themes & Highlights

Key Themes

  • Root cause vs. symptom: The fix addresses the underlying ordering bug (append instead of prepend) rather than special-casing Ruby, so it should also protect any other setup-* action relying on PATH precedence — nice generalization.
  • Regression coverage: TestGetNpmBinPathSetup_PreservesSelectedRuby reproduces the exact shadowing scenario (a newer selected Ruby vs. an older cached one) and asserts both the correct ruby --version and that cache-only npm-agent binaries remain discoverable — solid, specific regression test per /tdd.
  • Existing GOROOT/ERLANG_HOME tests still pass conceptually: the re-prepend order (after find, still forced regardless of append/prepend change) is preserved and covered.
  • Bulk of the diff is auto-generated .lock.yml snapshot regeneration from make recompile, which is expected and out of scope for manual review.

Positive Highlights

  • ✅ Clear code comments explaining why PATH is appended vs. prepended, and why GOROOT/ERLANG_HOME need explicit re-prepending.
  • ✅ Regression test directly encodes the reported bug (#57950) as an executable assertion instead of just describing it in the PR body.
  • ✅ No unrelated behavior changes bundled into the fix.

No blocking issues found — this is a clean, well-tested, narrowly-scoped fix.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • github.com
  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"
    - "proxy.golang.org"

See Network Configuration for more information.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 45.8 AIC · ⌖ 14.7 AIC · ⊞ 10.3K
Comment /matt to run again

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

reviewed_at: 2026-09-03T22:33:48Z
review_event: COMMENT
top_themes:
  - path-ordering fix is scoped and regression-covered
  - no additional blocking correctness issues found in reviewed changes
files_reviewed:
  - pkg/workflow/nodejs.go
  - pkg/workflow/engine_helpers_test.go
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 52 AIC · ⌖ 7.31 AIC · ⊞ 23.5K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking correctness, performance, or maintainability regressions stood up in the reviewed PATH-ordering change.

### Notes

I checked the runtime PATH mutation and the new regression coverage around Ruby precedence and cache-only npm binaries. The change appends tool-cache bins behind the existing PATH while still re-prepending GOROOT and ERLANG_HOME, which matches the intended fix without obviously breaking the existing engine command chaining behavior.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 52 AIC · ⌖ 7.31 AIC · ⊞ 23.5K
Comment /review to run again

@pelikhan

pelikhan commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot run pr-finisher skill

… tool cache

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please take the next forward-progress pass on this PR.

  • There is still unresolved review feedback from copilot-pull-request-reviewer saying the Ruby regression test does not prove PATH precedence because the selected Ruby is still inside the tool cache.
  • Please adjust the regression coverage so it reproduces the original precedence bug with the selected Ruby outside the tool-cache path, refresh the branch if needed, and then run the pr-finisher skill.
  • When you reply, summarize the concrete test setup change and whether any maintainer-facing blocker remains.

Review context:

Generated by 👨🍳 PR Sous Chef

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 32.7 AIC · ⌖ 9.85 AIC · ⊞ 9.2K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot run pr-finisher skill

Ran the PR-finisher pass. The Ruby regression setup is corrected in aaef03e, and the targeted regression tests pass. No maintainer-facing code blocker remains; CI needs a maintainer-triggered rerun after the agent push.

@copilot Please take the next forward-progress pass on this PR.

  • There is still unresolved review feedback from copilot-pull-request-reviewer saying the Ruby regression test does not prove PATH pr...

Updated in aaef03e: the selected Ruby now lives in a separate temporary directory outside RUNNER_TOOL_CACHE, while an older cached Ruby remains under the cache. The regression test passes and also verifies cache-only npm binaries remain discoverable. No maintainer-facing blocker remains in the code; CI will need a maintainer-triggered rerun after the push.

@pelikhan

pelikhan commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

/smoke-copilot

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this issue comment. Sources say the story is developing...

@pelikhan

pelikhan commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Summary

PR: Preserve setup-ruby PATH precedence inside AWF (#58311)

1-16: ✅ except #3 (Serena find_symbol ❌ - lang server init error)

Overall status: FAIL

Author: @copilot-swe-agent — Assignees: @pelikhan, @Copilot

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • www.google.com
  • www.gstatic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · copilot · auto · 37.5 AIC · ⌖ 2.61 AIC · ⊞ 10K ·
Comment /smoke-copilot to run again
Add label smoke to run again

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Code compiles at dawn
Sub-agents whisper their tests
Green checks light the sky

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • www.google.com
  • www.gstatic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · copilot · auto · 37.5 AIC · ⌖ 2.61 AIC · ⊞ 10K ·
Comment /smoke-copilot to run again
Add label smoke to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated smoke test review: inline comment added, no blocking issues found.

Warning

Firewall blocked 6 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • www.google.com
  • www.gstatic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · copilot · auto · 37.5 AIC · ⌖ 2.61 AIC · ⊞ 10K
Comment /smoke-copilot to run again
Add label smoke to run again

Comments that could not be inline-anchored

.github/workflows/ab-testing-advisor.lock.yml:1

Smoke test: inline review comment #1 (automated).

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@copilot fix https://github.com/github/gh-aw/actions/runs/33820307532/job/100861749959?pr=58311

Fixed in ea98ca2. The failing Dependabot manifest test now prepends a local npm stub that exits immediately, deterministically exercising the non-strict npm failure path instead of hanging on network access. The targeted test passes; no maintainer-facing code blocker remains.

@pelikhan
pelikhan merged commit 76182db into main Sep 4, 2026
32 checks passed
@pelikhan
pelikhan deleted the copilot/fix-getnpm-bin-path-setup branch September 4, 2026 02:17
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.88.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetNpmBinPathSetup overrides the Ruby version selected by ruby/setup-ruby

4 participants