Stage behavior-defined engine CLIs into the docker-sbx visible path#52576
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR TriageCategory: bug · Risk: medium · Priority: medium · Score: 53/100
Recommended action: Fixes
|
|
@lpcox review |
There was a problem hiding this comment.
Pull request overview
Stages behavior-defined npm engine CLIs in the microVM-visible path to prevent sandbox ENOENT failures.
Changes:
- Adds microVM CLI staging and PATH wiring.
- Adds Crush executable preflight diagnostics.
- Adds tests, generated workflows, and a changeset.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/behavior_defined_engine.go |
Adds CLI staging and PATH setup. |
pkg/workflow/docker_sbx_test.go |
Tests behavior-defined engine wiring. |
.github/workflows/shared/crush.md |
Adds executable resolution preflight. |
.github/workflows/smoke-crush.lock.yml |
Regenerates Crush smoke workflow. |
.github/workflows/daily-code-metrics.lock.yml |
Stages Crush for docker-sbx. |
.github/workflows/daily-arxiv-researcher.lock.yml |
Stages Crush for docker-sbx. |
.github/workflows/daily-code-debt-aider.lock.yml |
Regenerates sandbox PATH wiring. |
.changeset/fix-behavior-engine-docker-sbx-cli-path.md |
Documents the patch. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Balanced
| // so a global npm install is invisible inside the sandbox. Stage a second copy of the | ||
| // CLI under ${RUNNER_TEMP}/gh-aw/engine-cli, which is mounted into the sandbox, exactly | ||
| // as the Claude and Codex engines do. | ||
| if install.BinaryName != "" && (isDockerSbxRuntime(workflowData) || isCloudHypervisorRuntime(workflowData)) { |
| sbxWorkflow := &WorkflowData{ | ||
| Name: "test-workflow", | ||
| EngineConfig: &EngineConfig{ID: "sbxcrush"}, | ||
| SandboxConfig: &SandboxConfig{Agent: &AgentSandboxConfig{ID: "awf", Runtime: AgentRuntimeDockerSbx, SudoExplicitlyEnabled: true}}, |
|
@copilot Please resolve the blocking review feedback on this PR, refresh the branch if needed, and run the Outstanding review items (newest first):
Branch update was requested automatically for this run.
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Resolved both blocking review items in 7f56f02: staging now falls back to |
Triage: bug / risk: mediumScore: 64/100 (impact+urgency+quality) · Priority: medium · Action: Fixes daily Code Metrics failure: Crush CLI ENOENT in docker-sbx microVM by staging engine CLIs into visible path. Automated PR triage — see full report issue for details.
|
Execute Crush CLIhas failed on every Daily Code Metrics run since 2026-08-12 withspawnSync crush ENOENT, despiteInstall CrushandVerify Crush CLI installationpassing on the host.Root cause: the
docker-sbxmicroVM mounts only the workspace,/tmp,${RUNNER_TEMP}/gh-aw,/usr/local/binand a few home dirs — not the runner tool cache. Behavior-defined engines install their CLI vianpm install -g, which lands in the hostedtoolcache, so the binary is invisible inside the sandbox. Claude and Codex already stage a second copy into${RUNNER_TEMP}/gh-aw/engine-cli; behavior-defined engines never got that treatment.Changes
pkg/workflow/behavior_defined_engine.goGetInstallationSteps: ondocker-sbx/cloud-hypervisor, appendsGenerateDockerSbxNpmCLIInstallStep, preserving the engine'spost-install-scriptsandcooldownsettings (Crush requires postinstall to fetch its Go binary).buildFirewallCommand: prepends the staged bin dir to the sandboxPATH, keeping the Claude/Codex ordering (after the MCP CLI export, so the engine CLI wins)..github/workflows/shared/crush.md— the harness resolves the command onPATHbefore spawning, so a missing mount reportscrush not found in sandbox PATH: <path>instead of a bareENOENT, and logs the resolved path on success.TestDockerSbxBehaviorDefinedEngineCLIWiringcovers both the microVM wiring and that other runtimes are unaffected; changeset added and the four affected.lock.ymlfiles recompiled.Generated diff for
daily-code-metrics.lock.yml:smoke-crush(default runtime, tool cache mounted) only picks up the harness preflight change — its install path is unchanged.Run: https://github.com/github/gh-aw/actions/runs/31767348894> Generated by 👨🍳 PR Sous Chef · gpt54 · 23.3 AIC · ⌖ 5.78 AIC · ⊞ 8.5K · ◷