Skip to content

Install AWF binary for behavior-defined engines that declare no npm installation - #51276

Closed
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/awf-fix-installation-steps
Closed

pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/awf-fix-installation-steps

Conversation

Copilot AI commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

BehaviorDefinedEngine.GetInstallationSteps returned nil for any engine whose behavior declares no installation block (and no harness-script) or a non-npm one, while the compiler still emitted awf ... in the agent execution step whenever the firewall/sandbox is enabled. Every Smoke Pydantic AI run died with awf: command not found (exit 127) before the engine started; smoke-pydantic.lock.yml invoked awf twice with zero install_awf_binary.sh steps in the file.

Compiler fix

  • pkg/workflow/behavior_defined_engine.go — both nil-returning branches now route through BuildNpmEngineInstallStepsWithAWF(nil, workflowData). Passing no npm steps yields only the AWF install (plus gVisor / docker-sbx runtime setup where applicable), and yields nothing when the firewall is disabled, so non-sandboxed workflows are unchanged. The engine.command override early-return is preserved, matching the Codex/Claude/Copilot engines.
 if behavior.Installation == nil {
     if behavior.HarnessScript == "" {
-        return nil
+        return BuildNpmEngineInstallStepsWithAWF(nil, workflowData)
     }
     return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData)
 }
 
 install := behavior.Installation
 if install.PackageManager != "npm" {
-    return nil
+    return BuildNpmEngineInstallStepsWithAWF(nil, workflowData)
 }
  • pkg/workflow/nodejs.go — guard the ARC/DinD "copy Copilot CLI to daemon-visible path" step with len(npmSteps) > 0. The new nil callers install no CLI, so command -v copilot would have nothing to copy.

Ollama warm-up probe (cluster D)

  • .github/workflows/daily-byok-ollama-test.md — the warm-up hit Ollama's native /api/generate while the agent talks to /v1/chat/completions. A native-route 200 does not imply the OpenAI-compatible route is serving the model, which is how a passing warm-up was followed by four 503s. The probe now targets /v1/chat/completions with a chat-completions payload.

Tests

  • pkg/workflow/behavior_defined_engine_installation_test.go covers no-installation + sandbox, no-installation without firewall, non-npm installation + sandbox, and the engine.command skip path.

smoke-pydantic.lock.yml and daily-byok-ollama-test.lock.yml were regenerated; the former gains Install AWF binary in both the agent and detection jobs, with no duplicates.

Not addressed

Clusters B (dispatch_workflow missing its required message input) and C (fabricated PRRT_… node ID) are agent-runtime hallucinations rather than compiler defects — no localized code change fixes them, and adding speculative validation would exceed the scope here.

@pelikhan pelikhan closed this Aug 8, 2026
Copilot AI changed the title [WIP] Fix AWF-binary gap in BehaviorDefinedEngine Install AWF binary for behavior-defined engines that declare no npm installation Aug 8, 2026
Copilot AI requested a review from pelikhan August 8, 2026 03:07
Copilot stopped work on behalf of pelikhan due to an error August 8, 2026 03:07
@github-actions
github-actions Bot deleted the copilot/awf-fix-installation-steps branch August 16, 2026 02:27
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] 6h Failure Investigation — Pydantic AI engine breaks 100%, plus 3 correlated P1s (2026-08-08)

2 participants