Skip to content

Ensure behavior-defined engines always emit AWF install steps under firewall mode - #51274

Closed
pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-behavior-defined-engine
Closed

pelikhan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-behavior-defined-engine

Conversation

Copilot AI commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Behavior-defined engines could compile without any install_awf_binary.sh step unless they used npm (or a harness script), which makes firewall-mode execution fail deterministically (awf: command not found) for non-npm/custom engines like Pydantic AI. This change makes AWF installation independent of npm-specific install paths.

  • AWF install composition decoupled from npm path

    • Extracted shared AWF/runtime install assembly into buildAWFInstallationSteps(...).
    • BuildNpmEngineInstallStepsWithAWF(...) now reuses this helper, preserving npm step ordering while removing npm-only coupling.
  • Behavior-defined engine install logic fixed

    • BehaviorDefinedEngine.GetInstallationSteps(...) now returns AWF install steps (when firewall is enabled) for:
      • installation == nil && harness-script == ""
      • installation.package-manager != "npm"
    • Existing custom-command short-circuit behavior remains unchanged.
  • Regression coverage for non-npm and no-installation branches

    • Added compiler tests asserting AWF install step presence for:
      • a synthetic behavior-defined engine with package-manager: pip
      • a synthetic behavior-defined engine with no installation and no harness-script
    • Includes a guard case that custom command config still suppresses installation steps.
  • Compiled workflow output updated

    • Regenerated smoke-pydantic.lock.yml so firewall-mode jobs now include AWF binary installation before Pydantic execution.
if behavior.Installation == nil {
	if behavior.HarnessScript == "" {
		return buildAWFInstallationSteps(workflowData)
	}
	return BuildNpmEngineInstallStepsWithAWF([]GitHubActionStep{GenerateNodeJsSetupStep()}, workflowData)
}

if install.PackageManager != "npm" {
	return buildAWFInstallationSteps(workflowData)
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix BehaviorDefinedEngine to emit AWF install for custom engines Ensure behavior-defined engines always emit AWF install steps under firewall mode Aug 8, 2026
Copilot AI requested a review from pelikhan August 8, 2026 02:00
@pelikhan pelikhan closed this Aug 8, 2026
@github-actions
github-actions Bot deleted the copilot/fix-behavior-defined-engine branch August 20, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants