Skip to content

Require RUNNER_TOOL_CACHE for tool-cache discovery#40157

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-runner-tool-cache-fallbacks
Jun 19, 2026
Merged

Require RUNNER_TOOL_CACHE for tool-cache discovery#40157
pelikhan merged 3 commits into
mainfrom
copilot/fix-runner-tool-cache-fallbacks

Conversation

Copilot AI commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

gh-aw was guessing tool-cache locations when RUNNER_TOOL_CACHE was absent, including a hard-coded self-hosted runner path that assumes /home/runner/work/_tool. GitHub Actions already provides RUNNER_TOOL_CACHE, so generated commands should use that value rather than infer runner layout.

  • Tool-cache path setup
    • Require RUNNER_TOOL_CACHE before searching for tool-cache bin directories.
    • Remove fallback searches for /opt/hostedtoolcache and /home/runner/work/_tool.
: "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"
  • AWF mount probing

    • Use only RUNNER_TOOL_CACHE to decide whether a non-/opt tool cache needs a read-only bind mount.
    • Stop probing the legacy _tool path.
  • Tests and generated expectations

    • Update assertions and wasm golden outputs to cover the new required-env behavior.
    • Refresh the changeset text to describe the removal of guessed fallback paths.


✨ PR Review Safe Output Test - Run 27798181236

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
  • safebrowsingohttpgateway.googleapis.com
  • www.google.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"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · 72.5 AIC · ⌖ 8.47 AIC · ⊞ 8.5K ·

Co-authored-by: zarenner <13670625+zarenner@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect assumptions in RUNNER_TOOL_CACHE fallbacks Require RUNNER_TOOL_CACHE for tool-cache discovery Jun 18, 2026
Copilot AI requested a review from zarenner June 18, 2026 21:54
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot recompile

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

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot recompile

Recompiled the workflow lockfiles in commit 4003335.

Copilot AI requested a review from pelikhan June 19, 2026 00:38
@pelikhan pelikhan marked this pull request as ready for review June 19, 2026 00:39
Copilot AI review requested due to automatic review settings June 19, 2026 00:39
@pelikhan pelikhan added the smoke label Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed to deliver outputs. The oracle requires further meditation...

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Gemini MISSION COMPLETE! Gemini has spoken. ✨

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Pi MISSION COMPLETE! Pi delivered. 🥧

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #40157 does not have the 'implementation' label (has_implementation_label=false) and has only 46 new lines of code in business logic directories, which is at or below the 100-line threshold (requires_adr_by_default_volume=false). No custom config present. Neither Condition A nor Condition B is met.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🚀 Smoke Antigravity MISSION COMPLETE! Antigravity has spoken. ✨

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot - AOAI (Entra) is now investigating this pull request. Sources say the story is developing...

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.

Pull request overview

This pull request removes gh-aw’s fallback guessing for runner tool-cache locations and instead requires RUNNER_TOOL_CACHE for (1) discovering tool-cache bin directories used for Node resolution inside AWF, and (2) deciding whether a read-only bind mount is needed for non-/opt tool caches.

Changes:

  • Require RUNNER_TOOL_CACHE in the generated PATH setup (GetNpmBinPathSetup) and stop searching hard-coded fallback roots (/opt/hostedtoolcache, /home/runner/work/_tool).
  • Require RUNNER_TOOL_CACHE in AWF tool-cache mount probing and stop probing the legacy _tool path.
  • Update unit tests plus wasm golden outputs / compiled .lock.yml workflows to match the new required-env behavior.
Show a summary per file
File Description
pkg/workflow/nodejs.go Makes GetNpmBinPathSetup() require RUNNER_TOOL_CACHE and only search that root for bin dirs.
pkg/workflow/awf_helpers.go Updates AWF tool-cache mount probing to require RUNNER_TOOL_CACHE and drop legacy _tool probing.
pkg/workflow/copilot_engine_execution.go Updates comments/intent around PATH setup to reflect RUNNER_TOOL_CACHE-only behavior.
pkg/workflow/engine_helpers_test.go Updates assertions and a shell-based test to cover required RUNNER_TOOL_CACHE behavior and removal of fallback paths.
pkg/workflow/awf_config_test.go Updates expectations for the AWF command’s tool-cache mount probe and asserts fallback paths are not present.
pkg/workflow/copilot_home_expansion_test.go Adjusts commentary to remove now-stale mention of _tool fallback in unrelated HOME-resolution tests.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden Updates wasm golden output to require RUNNER_TOOL_CACHE and remove fallback tool-cache searches.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden Same as above for the “with-imports” fixture output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden Same as above for Playwright CLI mode fixture output.
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden Same as above for smoke Copilot fixture output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden Updates all-engines Copilot golden output to require RUNNER_TOOL_CACHE and stop probing fallback roots.
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden Same as above for Claude golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden Same as above for Codex golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden Same as above for Gemini golden output.
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden Same as above for Pi golden output.
.github/workflows/workflow-normalizer.lock.yml Regenerates compiled workflow to require RUNNER_TOOL_CACHE and remove fallback tool-cache probing/search paths.
.github/workflows/video-analyzer.lock.yml Same compiled-workflow update.
.github/workflows/update-astro.lock.yml Same compiled-workflow update.
.github/workflows/test-workflow.lock.yml Same compiled-workflow update.
.github/workflows/test-project-url-default.lock.yml Same compiled-workflow update.
.github/workflows/test-dispatcher.lock.yml Same compiled-workflow update.
.github/workflows/smoke-test-tools.lock.yml Same compiled-workflow update.
.github/workflows/smoke-temporary-id.lock.yml Same compiled-workflow update.
.github/workflows/smoke-pi.lock.yml Same compiled-workflow update.
.github/workflows/smoke-opencode.lock.yml Same compiled-workflow update.
.github/workflows/smoke-gemini.lock.yml Same compiled-workflow update.
.github/workflows/smoke-crush.lock.yml Same compiled-workflow update.
.github/workflows/smoke-ci.lock.yml Same compiled-workflow update.
.github/workflows/smoke-antigravity.lock.yml Same compiled-workflow update.
.github/workflows/security-review.lock.yml Same compiled-workflow update.
.github/workflows/research.lock.yml Same compiled-workflow update.
.github/workflows/repo-tree-map.lock.yml Same compiled-workflow update.
.github/workflows/release.lock.yml Same compiled-workflow update.
.github/workflows/pdf-summary.lock.yml Same compiled-workflow update.
.github/workflows/notion-issue-summary.lock.yml Same compiled-workflow update.
.github/workflows/issue-triage-agent.lock.yml Same compiled-workflow update.
.github/workflows/hippo-embed.lock.yml Same compiled-workflow update.
.github/workflows/functional-pragmatist.lock.yml Same compiled-workflow update.
.github/workflows/firewall.lock.yml Same compiled-workflow update.
.github/workflows/example-permissions-warning.lock.yml Same compiled-workflow update.
.github/workflows/example-failure-category-filter.lock.yml Same compiled-workflow update.
.github/workflows/dependabot-repair.lock.yml Same compiled-workflow update.
.github/workflows/dependabot-go-checker.lock.yml Same compiled-workflow update.
.github/workflows/dependabot-burner.lock.yml Same compiled-workflow update.
.github/workflows/daily-team-status.lock.yml Same compiled-workflow update.
.github/workflows/daily-malicious-code-scan.lock.yml Same compiled-workflow update.
.github/workflows/daily-credit-limit-test.lock.yml Same compiled-workflow update.
.github/workflows/codex-github-remote-mcp-test.lock.yml Same compiled-workflow update.
.github/workflows/changeset.lock.yml Same compiled-workflow update.
.github/workflows/brave.lock.yml Same compiled-workflow update.
.github/workflows/bot-detection.lock.yml Same compiled-workflow update.
.github/workflows/ai-moderator.lock.yml Same compiled-workflow update.
.github/workflows/agentic-token-optimizer.lock.yml Same compiled-workflow update.
.github/workflows/ace-editor.lock.yml Same compiled-workflow update.
.changeset/patch-mount-non-opt-tool-cache-in-awf.md Updates changeset text to reflect removal of guessed fallback paths and reliance on RUNNER_TOOL_CACHE.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 116/266 changed files
  • Comments generated: 0

@github-actions

Copy link
Copy Markdown
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.54.0
jq 1.7
yq v4.53.3
curl 8.5.0
gh 2.94.0
node v22.22.3
python3 3.11.15 (PyPy 7.3.23)
go 1.24.13
java openjdk 21.0.11
dotnet 10.0.301

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · 17.6 AIC · ⌖ 6.76 AIC · ⊞ 5.4K ·

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results\n- GitHub MCP Testing: ✅\n- Web Fetch Testing: ✅\n- File Writing Testing: ✅\n- Bash Tool Testing: ✅\n- Build gh-aw: ❌\n\nOverall status: FAIL

Warning

Firewall blocked 1 domain

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

  • localhost

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

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

Smoke Gemini — Powered by Gemini ·

@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 - all systems nominal!

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
  • safebrowsingohttpgateway.googleapis.com
  • www.google.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"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · 72.5 AIC · ⌖ 8.47 AIC · ⊞ 8.5K

fi
GH_AW_TOOL_CACHE_MOUNT=""
GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}"
GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"

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.

Good change — requiring RUNNER_TOOL_CACHE via :? makes the failure explicit instead of silently mounting a fallback path. 💥

fi
GH_AW_TOOL_CACHE_MOUNT=""
GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}"
GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"

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.

Consistent with the first hunk — nice that both agent and harness paths now use the same required-variable pattern.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Quiet builds awake
Symbols bloom in cached daylight
Tests keep their small vows

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
  • safebrowsingohttpgateway.googleapis.com
  • www.google.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"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex · 70.9 AIC · ⌖ 9.66 AIC · ⊞ 10.6K ·

@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 /diagnose and /tdd — approving; the core fix is correct with a couple of minor test hardening suggestions.

📋 Key Themes & Highlights

Positive Highlights

  • Fail-fast by design: Replacing :-/opt/hostedtoolcache with :?RUNNER_TOOL_CACHE must be set converts a silent misconfiguration into an actionable error — exactly the /diagnose pattern of fixing root cause, not symptom.
  • Single-source truth: The template change in pkg/workflow/nodejs.go and pkg/workflow/awf_helpers.go mechanically regenerates all 266 lock files — consistent and auditable.
  • Test update quality: TestGetNpmBinPathSetup_NoGorootDoesNotBreakChain now correctly supplies RUNNER_TOOL_CACHE via t.TempDir() so the shell execution test actually reflects the new contract.
  • findIdx guard: The new if findIdx < 0 check in TestGetNpmBinPathSetup prevents a false-pass if the find "$GH_AW_TOOL_CACHE" pattern is ever absent — good defensive testing.

Improvement Opportunities

/tdd — Missing behavioral test for unset RUNNER_TOOL_CACHE (pkg/workflow/engine_helpers_test.go)

TestGetNpmBinPathSetup checks string content only. The fail-fast contract is the heart of this change; a shell-execution regression test that verifies the command actually exits non-zero when RUNNER_TOOL_CACHE is unset would close the loop:

func TestGetNpmBinPathSetup_FailsWhenRunnerToolCacheUnset(t *testing.T) {
    if runtime.GOOS != "linux" {
        t.Skip("Skipping shell-based test on non-Linux platform")
    }
    cmd := exec.Command("bash", "-c",
        fmt.Sprintf("unset RUNNER_TOOL_CACHE; %s", GetNpmBinPathSetup()))
    output, err := cmd.CombinedOutput()
    if err == nil {
        t.Errorf("expected non-zero exit when RUNNER_TOOL_CACHE is unset, got: %s", output)
    }
    if !strings.Contains(string(output), "RUNNER_TOOL_CACHE must be set") {
        t.Errorf("expected error message in output, got: %s", output)
    }
}

/tdd — Tighten the :? assertion (pkg/workflow/engine_helpers_test.go, TestGetNpmBinPathSetup)

strings.Contains(pathSetup, "RUNNER_TOOL_CACHE must be set") passes as long as the message appears anywhere. Asserting RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set (the full operator form) would catch a regression where the enforcement operator is accidentally softened to :-.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 112.3 AIC · ⌖ 8.39 AIC · ⊞ 6.9K

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 100/100 — Excellent

Analyzed 3 test(s): 3 design, 0 implementation, 0 guideline violation(s). (copilot_home_expansion_test.go had a comment-only change and is excluded from scoring; its pre-existing missing build tag was not introduced by this PR.)

📊 Metrics & Test Classification (3 tests analyzed)
Metric Value
New/modified tests analyzed 3
✅ Design tests (behavioral contracts) 3 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 3 (100%)
Duplicate test clusters 0
Test inflation detected No (test +17 lines / prod +11 lines = 1.55:1)
🚨 Coding-guideline violations 0
Test File Classification Issues Detected
TestBuildAWFCommand_AddsToolCacheMountProbe pkg/workflow/awf_config_test.go:1287 ✅ Design
TestGetNpmBinPathSetup pkg/workflow/engine_helpers_test.go:274 ✅ Design
TestGetNpmBinPathSetup_NoGorootDoesNotBreakChain pkg/workflow/engine_helpers_test.go:357 ✅ Design

Go: 3 (*_test.go); JavaScript: 0. Other languages detected but not scored.

🔍 Analysis Notes

TestBuildAWFCommand_AddsToolCacheMountProbe — Updates assertions from the old :-/opt/hostedtoolcache fallback to the new :?RUNNER_TOOL_CACHE must be set mandatory pattern. Adds two assert.NotContains checks (negative assertions) to lock out removed fallback paths. All 5 assertions include descriptive messages. High value: deletion would let the :?:- regression go undetected.

TestGetNpmBinPathSetup — Updates assertions to verify: the mandatory RUNNER_TOOL_CACHE must be set error string is present, removed hardcoded paths (:-/opt/hostedtoolcache, /home/runner/work/_tool) are absent, and find "$GH_AW_TOOL_CACHE" appears before $GOROOT. The new findIdx < 0 guard prevents a silent false-pass. High value: covers the full behavioral contract of GetNpmBinPathSetup().

TestGetNpmBinPathSetup_NoGorootDoesNotBreakChain — Notable quality improvement: the old test hard-coded the entire shell command as a literal string (which could drift from the real implementation). The new test composes the live output of GetNpmBinPathSetup() via fmt.Sprintf, so it always tests the actual generated snippet. Sets RUNNER_TOOL_CACHE via t.TempDir(). Tests the GOROOT-empty edge case. High value.

i️ Pre-existing note (not a PR violation): pkg/workflow/copilot_home_expansion_test.go is missing a //go:build !integration build tag on line 1. This predates this PR; the PR only updated a comment. Consider fixing the build tag in a follow-up.

Verdict

Check passed. 0% implementation tests (threshold: 30%). All changed tests verify observable behavioral contracts. The upgrade of TestGetNpmBinPathSetup_NoGorootDoesNotBreakChain from a hardcoded shell string to dynamically using GetNpmBinPathSetup() is a meaningful quality improvement.

🧪 Test quality analysis by Test Quality Sentinel · 146.1 AIC · ⌖ 8.17 AIC · ⊞ 8.3K ·

@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.

✅ Test Quality Sentinel: 100/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 3 modified tests verify behavioral contracts with descriptive assertion messages and edge-case coverage.

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test results: ❌ Overall FAIL\nTests: ✅1, ✅2, ❌3, ✅4, ✅5, ✅6, ✅8

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
  • safebrowsingohttpgateway.googleapis.com
  • www.google.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"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot - AOAI (Entra) · 57.8 AIC · ⌖ 7.2 AIC · ⊞ 18.2K ·

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Circuits hum at dawn
Bots test rails of branching light
Smoke proves paths still sing

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 5 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · 244.9 AIC · ⌖ 26.9 AIC · ⊞ 19.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

Smoke tests passed. ✅ Overall PASS. @app/copilot-swe-agent

📰 BREAKING: Report filed by Smoke Copilot - AOAI (apikey) · 63.1 AIC · ⌖ 7.02 AIC · ⊞ 18.1K ·

@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.

Smoke review submitted with inline notes.

Warning

Firewall blocked 5 domains

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

  • accounts.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • safebrowsingohttpgateway.googleapis.com
  • www.google.com

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

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "safebrowsingohttpgateway.googleapis.com"
    - "www.google.com"

See Network Configuration for more information.

📰 BREAKING: Report filed by Smoke Copilot · 244.9 AIC · ⌖ 26.9 AIC · ⊞ 19.1K

@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.

🔎 Code quality review by PR Code Quality Reviewer · 317.7 AIC · ⌖ 7.55 AIC · ⊞ 5.1K

Comments that could not be inline-anchored

pkg/workflow/engine_helpers_test.go:337

TestGetNpmBinPathSetup_GorootOrdering tests a hardcoded shell command, not the actual GetNpmBinPathSetup() function — a GOROOT-ordering regression in the function itself will not be caught by this test.

<details>
<summary>💡 Suggested fix</summary>

TestGetNpmBinPathSetup_NoGorootDoesNotBreakChain (line 366) shows the correct pattern: it inlines GetNpmBinPathSetup() as %s so the actual function is exercised. The GOROOT ordering test should mirror that:

shellCmd := fmt.Spri</details>

<details><summary>pkg/workflow/awf_helpers.go:274</summary>

**The `/opt/*` exclusion has no comment explaining why those paths skip explicit bind-mounting**, making it look like an arbitrary condition that could be &quot;cleaned up&quot; away.

&lt;details&gt;
&lt;summary&gt;💡 Suggested fix&lt;/summary&gt;

The reason is that AWF is always invoked with `--enable-host-access` (line 615), and in chroot mode that makes the host filesystem — including `/opt/hostedtoolcache` — accessible inside the container without an explicit `--mount` bind. Paths outside `/opt/` (e.g. a self-hosted…

</details>

<details><summary>pkg/workflow/nodejs.go:193</summary>

**`find` now searches only `$RUNNER_TOOL_CACHE`, silently breaking self-hosted runners that have tools pre-cached at `/opt/hostedtoolcache` but set `RUNNER_TOOL_CACHE` to a different path.**

&lt;details&gt;
&lt;summary&gt;💡 Details&lt;/summary&gt;

Before this PR, `GetNpmBinPathSetup()` searched three paths inside AWF:
```bash
find &quot;$GH_AW_TOOL_CACHE&quot; /opt/hostedtoolcache /home/runner/work/_tool ...

After this PR, only one path is searched:

find &quot;$GH_AW_TOOL_CACHE&quot; ...

On GitHub-hosted runner…

pkg/workflow/awf_config_test.go:1307

The /opt/* guard is never exercised by this test — removing or inverting the condition would leave the test suite green while GitHub-hosted runners silently receive a redundant bind-mount.

<details>
<summary>💡 Suggested assertion</summary>

The test sets RUNNER_TOOL_CACHE to a custom non-/opt/ path to verify the mount is emitted. Add a complementary subtest (or a second NotContains assertion here) that exercises the /opt/* branch where GH_AW_TOOL_CACHE_MOUNT must remain empty:…

@pelikhan pelikhan merged commit 95989bd into main Jun 19, 2026
255 of 270 checks passed
@pelikhan pelikhan deleted the copilot/fix-runner-tool-cache-fallbacks branch June 19, 2026 01:29
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.

4 participants