feat(compile): add target: job and target: stage for ADO template output#519
feat(compile): add target: job and target: stage for ADO template output#519jamesadevine wants to merge 2 commits into
Conversation
Add two new compile targets that produce reusable ADO YAML templates for embedding agentic stages into existing pipelines: - target: job — generates a job-level template (jobs: at root) that can be included in a flat pipeline or inside a user-defined stage - target: stage — generates a stage-level template (stages: wrapping jobs) for direct inclusion in multi-stage pipelines Key design decisions: - Pool is baked in from front matter (not a template parameter) - dependsOn and condition are set natively at the ADO call site - Job names are prefixed with PascalCase agent name for uniqueness (e.g., DailyReview_Agent, DailyReview_Detection, DailyReview_Execution) - Triggers (on:) are ignored with a warning in template targets - Template parameters only include clearMemory and user-defined params New files: - src/compile/job.rs — JobCompiler implementing the Compiler trait - src/compile/stage.rs — StageCompiler implementing the Compiler trait - src/data/job-base.yml — job-level template derived from base.yml - src/data/stage-base.yml — stage-level template wrapping jobs in stage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Good feature addition overall — clean architecture, proper trait implementation, and solid test coverage. Three issues worth addressing before merge. Findings🐛 Bugs / Logic Issues
|
- Fix path corruption: use Path::with_extension instead of string replace to derive .lock.yml paths in header comments (avoids corrupting directory names containing '.md') - Fix repos header docs: only check front_matter.repositories (populated by resolve_repos() before compile) instead of also checking front_matter.repos (raw input, may be empty) - Fix Unicode in stage prefix: use is_ascii_alphanumeric() to split on non-ASCII characters, ensuring ADO-valid identifiers (ADO requires [A-Za-z0-9_] for job/stage names) - Add test for Unicode stripping in generate_stage_prefix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Solid implementation with good marker coverage and test infrastructure — two things worth addressing before merge. Findings
|
Summary
Add two new compile targets (
target: jobandtarget: stage) that produce reusable ADO YAML templates for embedding agentic stages into existing pipelines.target: job— generates a job-level template (jobs:at root) for inclusion in a flat pipeline or inside a user-defined stage:target: stage— generates a stage-level template (stages:wrapping jobs) for direct inclusion in multi-stage pipelines, with native ADOdependsOnandconditionat the call site:Design decisions
dependsOn/conditionare set natively at the ADO call site (not template params)DailyReview_Agent,DailyReview_Detection,DailyReview_Execution)on:) are ignored with a warning in template targetsclearMemoryand user-defined params (if any)New files
src/compile/job.rs—JobCompilerimplementing theCompilertraitsrc/compile/stage.rs—StageCompilerimplementing theCompilertraitsrc/data/job-base.yml— job-level template derived frombase.ymlsrc/data/stage-base.yml— stage-level template wrapping jobs in a stage blocktests/fixtures/job-agent.mdandstage-agent.md— test fixturesTest plan
cargo build— clean compilationcargo test --bin ado-aw— 1350 tests pass, 0 failurescargo clippy --all-targets --all-features— no new warningscargo run -- compile tests/fixtures/job-agent.mdandstage-agent.md)REQUIRED_TARGETSintests/bash_lint_tests.rs