refactor: complete Engine abstraction — move install, invocation, and paths behind Engine enum#296
Closed
refactor: complete Engine abstraction — move install, invocation, and paths behind Engine enum#296
Conversation
… paths behind Engine enum
- Move COPILOT_CLI_VERSION constant from compile/common.rs to engine.rs
(re-export preserved for backward compatibility)
- Add Engine::install_steps() — generates NuGet install YAML steps
- Add Engine::invocation() — generates AWF agent command line
- Add Engine::detection_invocation() — generates AWF detection command line
- Add Engine::version() — returns engine CLI version string
- Add Engine::home_config_dir() — returns engine home config path
- Add Engine::log_dir() — returns engine log directory
- Add Engine::mcp_config_path() — returns engine MCP config path
- Replace hardcoded install steps in base.yml and 1es-base.yml with
{{ engine_install }} marker
- Replace hardcoded AWF commands with {{ engine_run }} and
{{ engine_run_detection }} markers
- Replace {{ copilot_version }} with {{ engine_version }}
- Replace {{ copilot_params }} with engine_args (now baked into
{{ engine_run }})
- Replace hardcoded ~/.copilot paths with {{ engine_home_config_dir }},
{{ engine_log_dir }}, {{ engine_mcp_config_path }}
- Rename copilot_params variable to engine_args in compile_shared()
and run.rs
- Rename test_copilot_params_* test functions to test_engine_args_*
- Update version updater workflow docs for new constant location
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/f7532250-9a9d-45aa-9043-2ea43eb2c870
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
…aths Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/f7532250-9a9d-45aa-9043-2ea43eb2c870 Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor installation steps to use Engine abstraction
refactor: complete Engine abstraction — move install, invocation, and paths behind Engine enum
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pipeline templates hardcode Copilot CLI install steps, binary paths, invocation commands, config directories, and log paths. Adding a new engine requires touching templates directly.
Engine methods added (
src/engine.rs)install_steps()— generates NuGet install YAML (ownsCOPILOT_CLI_VERSION, moved fromcommon.rs)invocation(engine_args)/detection_invocation(engine_args)— AWF--command for Agent/Detection jobsversion(),home_config_dir(),log_dir(),mcp_config_path()— engine-specific paths, all using$HOMEconsistentlyTemplate markers replacing hardcoded Copilot references
{{ engine_install }}'/tmp/awf-tools/copilot --prompt ... {{ copilot_params }}'{{ engine_run }}/{{ engine_run_detection }}{{ copilot_version }}{{ engine_version }}$HOME/.copilot{{ engine_home_config_dir }}~/.copilot/logs{{ engine_log_dir }}$HOME/.copilot/mcp-config.json{{ engine_mcp_config_path }}{{ copilot_params }}is eliminated — engine args are now baked into{{ engine_run }}byEngine::invocation().Renames
copilot_params→engine_argsincompile_shared()andrun.rstest_copilot_params_*→test_engine_args_*(20 tests)COPILOT_CLI_VERSIONcanonical location →src/engine.rs(re-export incommon.rspreserved)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dev.azure.com/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a820d47d98270560.09fjwx/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/init_tests-3bcc4ddce1e312d9.2ukf37jb0777k2y8ri9exqh0h.03qjqv5.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a820d47d98270560.0adin8/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/init_tests-3bcc4ddce1e312d9.2ynn8gvql2fyvn7igwbexxwwe.03qjqv5.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a820d47d98270560.0atqo9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/init_tests-3bcc4ddce1e312d9.32e9rgsalv16jx9z0iqp0mleg.03qjqv5.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a820d47d98270560.0cvrpt/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/init_tests-3bcc4ddce1e312d9.374c5aulltrl0bl9xey67nr26.03qjqv5.rcgu.o /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-a820d47d98270560.0d2ci9/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/init_tests-3bcc4ddce1e312d9.3adno12ab0g5nlfulsvspfcq8.03qjqv5.rcgu.o 5.00l282qg8pqjpribuxk00ly57.0xvnnev.rcgu.o 5.04pvr3v3jq5s9cz4rxzmhqadv.0xvnnev.rcgu.o 5.08c7t5zps20p022563l9klb3b.0xvnnev.rcgu.o 5.0bjk4g2thkx4snzt4hcjhzjoa.0xvnnev.rcgu.o 5.0p1v9lnmnjhz6ksvg4k1grpru.0xvnnev.rcgu.o 5.0w6e3rq8q9fkdgxnclb4z636a.0xvnnev.rcgu.o 5.10gxe18j03s801iuvh69tvv0i.0xvnnev.rcgu.o 5.14fax48xdffz185im416a7elz.0xvnnev.rcgu.o 5.16gjxij8jx3sxiz8lpycmrnkd.0xvnnev.rcgu.o 5.17unxb5laoekqixkf4qnr6sbw.0xvnnev.rcgu.o 5.18g4t9rqadmplukldxxwfdghh.0xvnnev.rcgu.o 5.1if8uc8ofutahxkln01oe5axr.0xvnnev.rcgu.o 5.1qlvx6rnt00u2kwrwh6tk8tw3.0xvnnev.rcgu.o 5.21b9o5zsud4g3k1pq9q72uu2y.0xvnnev.rcgu.o(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 s/ado_aw-27c82a3remote s/ado_aw-27c82a3get-url s/ado_aw-27c82a3origin s/ad��(dns block)/home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-c05a54f0ee13c0b7 s/ado_aw-a820d47remote s/ado_aw-a820d47get-url s/ado_aw-a820d47origin s/ad�� s/ado_aw-a820d47d98270560.09fjwx-pie s/ado_aw-a820d47d98270560.09z2t7-z s/ado_aw-a820d47d98270560.0cvrptnow s/ado_aw-a820d47git s/ado_aw-a820d47remote s/ado_aw-a820d47get-url s/ado_aw-a820d47origin s/ad�� s/ado_aw-a820d47d98270560.0xup3mnk95t0ow1j93oufmjyt.11yg6at.rcgu.o s/ado_aw-a820d47d98270560.0y5cyk7p4isxbw2hyvnoooob8.11yg6at.rcgu.o -aw /home/REDACTED/wor/home/REDACTED/work/ado-aw/ado-aw/target/debug/ado-aw kwkek02lbt7cng2acompile aeeuyv7zx3wtkxqd/tmp/agentic-pipeline-uwi-pass-12416/uwi-agent.md -aw(dns block)If you need me to access, download, or install something from one of these locations, you can either: