engine.env can't be shared: rejected in engine definitions and imports; behaviors.execution.env silently drops the api-proxy target
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 541
- Avg merge
- 5h 48m
- Merged PRs (30d)
- 773
Description
**Context:** orgs running many workflows on one custom engine (a shared definition file imported via `imports:`) need engine-wide env (endpoint URL + install knobs) defined once. Today every consumer must copy-paste the same `engine.env` block.
**What I tried (gh-aw v0.89.10):**
1. `env:` under `engine:` in the **definition file** → schema rejects the whole file: `Unknown properties: behaviors, description, display-name, experimental, provider` (the moment `env` appears, the definition's own documented keys become "unknown").
2. A separate **import fragment** whose frontmatter carries only `engine.env` → rejected: `Unknown property: env. 'env' belongs under 'container', 'safe-outputs' or 'sandbox/agent'`.
3. `behaviors.manifest.execution.env` in the definition → **compiles green but silently loses the api-proxy target**: the compiled lock's `apiProxy.targets.openai.host` comes out EMPTY (the engine env points at the local gateway with no upstream). Target extraction apparently reads only the consumer's `engine.env` literal.
**Asks:**
- Allow `engine.env` in definition files and/or import fragments (deep-merged with the consumer's), including compile-time api-proxy target extraction from the merged value.
- Independently: when no target is extractable for an enabled proxy adapter, that should be a **compile error**, not a silent empty target — failure mode 3 above produced a green compile and a broken proxy.
Workaround for now: keep the literal in every consumer's `engine.env` (documented per-consumer contract).
Contributor guide
Research direction
Start by tracing schema validation for engine definitions and import fragments, then follow the compile-time handling of engine.env into the compiled lock's apiProxy.targets.openai.host. Reproduce the three configurations described in the issue; done means shared values merge correctly and an enabled proxy adapter without an extractable target fails compilation instead of producing an empty target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, go
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100