feat!: align engine front matter with gh-aw and hook up Engine enum#286
feat!: align engine front matter with gh-aw and hook up Engine enum#286jamesadevine wants to merge 5 commits intomainfrom
Conversation
BREAKING CHANGE: The engine front matter format changed from model names
(engine: claude-opus-4.5) to engine identifiers (engine: copilot). Model
is now a sub-field in the object form (engine: { id: copilot, model: ... }).
- Redefine EngineConfig to use engine identifiers aligned with gh-aw
- Add full gh-aw field set: id, version, model, agent, api-target, args,
env, command, timeout-minutes
- Replace Engine trait + dyn dispatch with Engine enum (Engine::Copilot)
- Add get_engine() factory that rejects non-copilot identifiers
- Supply resolved Engine in CompileContext
- Route generate_copilot_params through ctx.engine.args()
- Consolidate engine env vars (GITHUB_TOKEN, COPILOT_OTEL_*) into
Engine::env(), remove from pipeline templates
- Rename {{ copilot_ado_env }} to {{ engine_env }}
- Remove SYSTEM_ACCESSTOKEN injection from agent sandbox step
- Remove AZURE_DEVOPS_EXT_PAT from engine env (handled by MCPG)
- Remove cancel_previous_builds functionality (used System.AccessToken)
- Update examples to new engine format
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Default engine (copilot) and model (claude-opus-4.5) are applied automatically when engine: is omitted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Looks good overall — the engine enum refactor is clean and the breaking change is well-handled. A few items worth addressing. Findings
|
- Update AGENTS.md front matter example to use `engine: copilot` instead
of the old `engine: claude-opus-4.5` format (which now fails at compile)
- Update Engine Configuration section to document `id` field, object form
with `id: copilot`, and all new EngineOptions fields
- Add compile-time warnings for engine options that are parsed but not yet
wired into the pipeline (args, version, agent, api-target, command, env)
- Fix 8-space indent in copilot_args() body left over from impl extraction
- Add #[allow(dead_code)] and clarifying doc comment to Engine::command()
- Remove obsolete {{ cancel_previous_builds }} section from AGENTS.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Mostly solid architecture, but two stale prompt files will cause broken pipeline generation by the dispatcher agent. Findings🐛 Bugs / Logic Issues
|
…fy generate_copilot_params - Fix create-ado-agentic-workflow.md: Step 2 now teaches engine as an engine identifier (not a model name), object form includes id: copilot, complete example uses object form with model selection - Fix debug-ado-agentic-workflow.md: Model/Engine Failures section now shows correct format and explains the engine vs model distinction - Remove redundant front_matter parameter from generate_copilot_params — ctx.front_matter is the same value; updated all 25+ call sites Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…:args directly The wrapper was a trivial one-liner delegating to ctx.engine.args(). All call sites (production + 25 tests) now call Engine::args() directly via the CompileContext, removing an unnecessary layer of indirection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Solid architectural refactor, but has a functional regression in Findings🐛 Bugs / Logic Issues
|
Summary
Aligns the
engine:front matter with gh-aw's engine format and hooks up the Engine enum through the compile pipeline.Breaking Change
The
engine:field now takes an engine identifier (copilot), not a model name. Model moves to the object form:Non-copilot engine identifiers (
claude,codex,gemini) produce a compile error.Changes
Engine architecture
Engineis now an enum (Engine::Copilot) with enum dispatch — no trait objects or&dynget_engine()factory resolves from front matterengine_id(), rejects unsupported enginesCompileContext— downstream code usesctx.engineEngineConfig (types.rs)
{id, version, model, agent, api-target, args, env, command, timeout-minutes}model()returnsOption<&str>— engine impl provides default whenNoneEngine env consolidation
GITHUB_TOKEN,GITHUB_READ_ONLY,COPILOT_OTEL_*moved from pipeline templates intoEngine::env(){{ copilot_ado_env }}renamed to{{ engine_env }}AZURE_DEVOPS_EXT_PATremoved from engine env (handled by MCPG)SYSTEM_ACCESSTOKENremoved from agent sandbox stepRemoved
cancel_previous_builds— used$(System.AccessToken)directlygenerate_copilot_ado_envwrapper — callers usectx.engine.env()directlydefault_model()helper — default lives in engine impl (DEFAULT_COPILOT_MODEL)Updated
engine: { id: copilot, model: ... }format