Skip to content

Fix Copilot AWF startup failures by staging Node binary into mounted runtime path - #27833

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-node-path
Closed

pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-node-path

Conversation

Copilot AI commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

Two scheduled Copilot workflows (Daily News, Daily Issues Report Generator) were failing before inference with /bin/bash: node: command not found. The failure occurred in AWF execution despite setup-node being present, indicating a runtime path visibility mismatch between host and sandbox.

  • Root cause confirmation

    • Confirmed both affected lock files already include actions/setup-node.
    • Confirmed failures happen in AWF/container execution path, not during workflow bootstrap step generation.
  • Copilot AWF runtime hardening

    • Updated Copilot engine AWF path setup to stage the resolved host node binary into ${RUNNER_TEMP}/gh-aw/node-bin/node and export that path via GH_AW_NODE_BIN.
    • This ensures the driver uses a Node executable guaranteed to exist under the AWF-mounted runner temp path.
  • Workflow lockfile regeneration (affected workflows)

    • Recompiled:
      • .github/workflows/daily-news.lock.yml
      • .github/workflows/daily-issues-report.lock.yml
    • Both now include staged-node bootstrap before Copilot driver execution.
  • Focused regression coverage

    • Added assertions in copilot_engine_test.go to verify:
      • node capture guard,
      • staging directory creation,
      • copy/chmod/update flow,
      • command ordering in generated AWF step.
GH_AW_NODE_BIN="$(command -v node 2>/dev/null || true)"
if [ -n "$GH_AW_NODE_BIN" ] && [ -x "$GH_AW_NODE_BIN" ]; then
  mkdir -p "${RUNNER_TEMP}/gh-aw/node-bin"
  if cp "$GH_AW_NODE_BIN" "${RUNNER_TEMP}/gh-aw/node-bin/node"; then
    chmod +x "${RUNNER_TEMP}/gh-aw/node-bin/node"
    GH_AW_NODE_BIN="${RUNNER_TEMP}/gh-aw/node-bin/node"
  fi
fi
export GH_AW_NODE_BIN

Copilot AI changed the title [WIP] Fix Copilot engine initialization by adding Node.js to PATH Fix Copilot AWF startup failures by staging Node binary into mounted runtime path Apr 22, 2026
Copilot AI requested a review from pelikhan April 22, 2026 14:00
@pelikhan pelikhan closed this Apr 22, 2026
@pelikhan

Copy link
Copy Markdown
Collaborator

@Mossaka

@pelikhan

Copy link
Copy Markdown
Collaborator

@lpcox this image runner does not have node...

@github-actions
github-actions Bot deleted the copilot/aw-failures-fix-node-path branch April 30, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] Copilot engine fails: node: command not found — Daily News + Daily Issues Report Generator

2 participants