Skip to content

feat!: remove run subcommand#306

Merged
jamesadevine merged 1 commit into
mainfrom
remove-run-subcommand
Apr 22, 2026
Merged

feat!: remove run subcommand#306
jamesadevine merged 1 commit into
mainfrom
remove-run-subcommand

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Summary

Remove the debug-only run subcommand (~1,200 lines) that orchestrated local agent execution. This reduces codebase complexity, eliminates agent confusion, and removes support burden for Docker/MCPG lifecycle management code that is orthogonal to the compiler's core mission.

Motivation

  • Agent confusion — agents operating on the codebase encounter run documentation and code, potentially attempting to use or reference it
  • Support burden — the run module pulls in Docker orchestration, MCPG lifecycle management, health checks, and process cleanup that are orthogonal to the compiler's core mission
  • Dead code surfaceAdoAuthMode::Pat, set_org(), collect_extensions_with_auth(), and several pub use re-exports existed solely for run

Changes

Deleted

  • src/run.rs — 1,204-line local dev orchestrator (SafeOutputs startup, Docker/MCPG lifecycle, Copilot CLI invocation, safe output execution, cleanup)

Simplified

  • AdoAuthMode enum removed — only bearer auth (pipeline default) remains; PAT mode was exclusively for run
  • collect_extensions_with_auth() merged into collect_extensions() — the auth mode parameter is no longer needed
  • set_org() removed from AzureDevOpsToolConfig — only called by run to inject --org overrides
  • 3 pub use re-exports removed from compile/mod.rs (generate_mcpg_config, MCPG_IMAGE, MCPG_VERSION) — still accessible internally, just no longer re-exported since no external consumer exists

Updated

  • src/main.rs — removed mod run, Commands::Run variant, and match arms
  • AGENTS.md — removed run CLI command documentation
  • tests/cli_tests.rs — replaced debug/release run presence tests with a single test confirming run is absent

Added

  • docs/local-development.md — manual orchestration guide with an AI-agent-discouraging preamble, documenting the step-by-step workflow that run previously automated

Verification

  • cargo build — clean, zero warnings
  • cargo test — all tests pass
  • cargo clippy --all-targets --all-features — no new warnings

Remove the debug-only `run` subcommand (1,204 lines) that orchestrated
local agent execution. This reduces codebase complexity, eliminates
agent confusion, and removes support burden for Docker/MCPG lifecycle
management code that is orthogonal to the compiler's core mission.

Changes:
- Delete src/run.rs
- Remove Commands::Run variant and match arms from main.rs
- Remove AdoAuthMode enum and PAT auth mode (only used by run)
- Remove set_org() method on AzureDevOpsToolConfig (only used by run)
- Remove pub use re-exports only needed by run (generate_mcpg_config,
  MCPG_IMAGE, MCPG_VERSION)
- Merge collect_extensions_with_auth() into collect_extensions()
- Update cli_tests.rs to reflect removal
- Strip run documentation from AGENTS.md
- Add docs/local-development.md with manual orchestration steps

BREAKING CHANGE: The `run` subcommand is removed. See
docs/local-development.md for manual local development instructions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Rust PR Review

Summary: Looks good — clean, well-scoped removal with no dangling references or regressions.

Findings

⚠️ Suggestions

  • docs/local-development.md:163 — The example Copilot invocation uses --prompt "@$WORK_DIR/agent-prompt.md" (@-prefix file reference), but the compiled pipeline generates --prompt "$(cat /tmp/awf-tools/agent-prompt.md)" (shell command substitution via engine.rs:578). Both may work with the Copilot CLI, but the discrepancy could confuse users trying to mirror the exact pipeline behaviour. Worth aligning with the compiled form, or adding a note that either syntax works.

✅ What Looks Good

  • No dangling referencesAdoAuthMode, collect_extensions_with_auth, set_org, generate_mcpg_config, MCPG_IMAGE, MCPG_VERSION are all cleanly removed; grep across the tree finds zero surviving call sites.
  • required_pipeline_vars simplification — removing the PAT branch and unconditionally returning the Bearer mapping is correct; PAT mode was the only consumer and it's gone.
  • Test cleanup — dropping the #[cfg(debug_assertions)] / #[cfg(not(debug_assertions))] split in favour of a single unconditional test is a nice improvement; the assertion is now correct for both build profiles.
  • collect_extensions merge — absorbing collect_extensions_with_auth with no functional change (the default was already Bearer) is the right call; the extra indirection was only there to serve run.
  • All tests pass (cargo test green on the PR branch).

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • dev.azure.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "dev.azure.com"

See Network Configuration for more information.

Generated by Rust PR Reviewer for issue #306 · ● 1.1M ·

@jamesadevine jamesadevine merged commit a71ed16 into main Apr 22, 2026
13 checks passed
@jamesadevine jamesadevine deleted the remove-run-subcommand branch April 22, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant