You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(marker): emit ado-aw marker via prepare_steps, not setup_steps
The always-on `ado-aw-marker` extension was emitting its metadata
step via `setup_steps`, which forced `generate_setup_job` to spin
up a dedicated `- job: Setup` block in every compiled pipeline.
Minimal agentic pipelines with no user `setup:` declarations, no
PR/pipeline filters, and no other Setup-contributing extensions were
paying for a whole extra pool agent + agent boot just to emit a
single-line metadata comment.
Move the marker emission to `prepare_steps` so the step lands
inside the always-present Agent job's `{{ prepare_steps }}` block.
No extra job, no extra pool time — the marker is still parsed by
`parse_marker_step` the same way (scans for the
`# ado-aw-metadata:` line anywhere in the YAML).
The change requires extending the `CompilerExtension::prepare_steps`
signature to accept `&CompileContext` — the marker needs
`input_path`, `ado_context`, and `front_matter.target` to
build its JSON. All five existing `prepare_steps` implementors
(cache_memory, lean, python, node, dotnet) gain an unused
`_ctx: &CompileContext` parameter. The macro dispatcher and
`generate_prepare_steps` propagate ctx through.
Tests:
* All five existing `prepare_steps` unit tests in `extensions/tests.rs`
updated to construct a `CompileContext` via the existing `ctx_from`
helper.
* All seven `generate_prepare_steps` tests in `common.rs` updated to
pass a `CompileContext::for_test(&fm)`.
* All seven marker-emit unit tests in `ado_aw_marker.rs` updated to
call `prepare_steps(&ctx)` (now returns `Vec<String>` directly,
no `Result` wrapper).
* New regression test `test_marker_does_not_create_setup_job_for_minimal_pipeline`
asserts a minimal compiled pipeline contains the marker line but
no `- job: Setup` block — guards against future re-introduction
of the unnecessary Setup job.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments