Skip to content

refactor: unify ares binaries into single 'ares' binary with subcommands#216

Merged
l50 merged 11 commits intomainfrom
worktree-feat+single-binary
Apr 18, 2026
Merged

refactor: unify ares binaries into single 'ares' binary with subcommands#216
l50 merged 11 commits intomainfrom
worktree-feat+single-binary

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Apr 17, 2026

Key Changes:

  • Merged ares-cli, ares-orchestrator, and ares-worker into a single ares binary
  • Updated all documentation, scripts, Taskfiles, and Docker/Ansible templates to use ares instead of multiple binaries
  • Removed obsolete binaries and crate references from workspace and build/deployment logic
  • Refactored orchestrator and worker entrypoints as subcommands (ares orchestrator, ares worker)

Added:

  • Unified binary - All CLI, orchestrator, and worker logic now lives under the ares binary (with subcommands for orchestrator/worker)
  • Cross.toml - Added for custom Dockerfile support in cross-compilation
  • Orchestrator, worker, and blue-team orchestrator code moved into ares-cli/src/orchestrator/ and ares-cli/src/worker/
  • Build script in ares-cli/build.rs for tool inventory generation

Changed:

  • Build/deploy scripts - All references to ares-cli, ares-orchestrator, and ares-worker replaced with ares
  • Taskfiles, Dockerfiles, Ansible roles, and infra docs updated to reference ares binary and new subcommands
  • Cargo workspace - Removed ares-orchestrator and ares-worker crates; only ares-cli remains as the main binary crate (renamed output to ares)
  • CI/CD workflows and S3 upload logic simplified to build/deploy only the ares binary
  • Documentation, markdown guides, and usage examples updated to use ares everywhere
  • All code that previously matched on binaries now checks for subcommands or uses the unified interface
  • Role-specific build/test/dev scripts use the new ares interface for all operations

Removed:

  • Obsolete binaries - Deleted ares-orchestrator and ares-worker crates and all references
  • All build, deployment, and scripting logic related to separate binaries (ares-cli, ares-orchestrator, ares-worker)
  • Redundant documentation and references to old binary names
  • Stale inventory publication and per-role binary checks

@dreadnode-renovate-bot dreadnode-renovate-bot Bot added area/docs Changes made to project documentation area/templates Changes made to warpgate template configurations area/github Changes made to GitHub Actions workflows labels Apr 17, 2026
@l50 l50 force-pushed the worktree-feat+single-binary branch from 039e4bb to 78209f6 Compare April 17, 2026 15:39
l50 added 10 commits April 17, 2026 18:18
**Changed:**

- Removed separate binaries for `ares-cli`, `ares-orchestrator`, and `ares-worker`
  in favor of a single unified `ares` binary with subcommands for CLI, orchestrator,
  and worker roles.
- Updated all CI/CD workflows, Taskfiles, Ansible templates, and Docker/Warpgate
  build scripts to reference the new `ares` binary instead of the old split binaries.
- Simplified build and deployment steps to only build and copy `ares` (no longer
  builds or distributes `ares-cli`, `ares-orchestrator`, or `ares-worker`).
- Refactored Rust workspace and Cargo.toml to remove `ares-orchestrator` and
  `ares-worker` as separate workspace members; all orchestrator and worker logic
  now resides under the `ares` binary.
- Updated all task references, systemd unit files, shell scripts, and documentation
  to use `ares` (and subcommands like `ares orchestrator`, `ares worker`, etc.)
  in place of the previous binaries.
- Consolidated orchestrator, worker, and CLI logic into a single codebase with
  feature-flag-driven subcommand dispatch.
- Refactored orchestrator and worker source directories and main entrypoints to
  support the unified binary model.
- Updated all tool and inventory checks, agent registration, and heartbeat logic
  to use the new binary naming convention.
- Modified all automation, exploitation, and result processing modules to support
  the new structure.

**Removed:**

- Deleted the `ares-orchestrator` and `ares-worker` workspace members and their
  Cargo.toml entries.
- Removed all build, deploy, and packaging references to the split binaries from
  CI/CD, Warpgate, and container templates.
- Eliminated duplicated orchestrator and worker entrypoints and binaries.
- Removed `ares-orchestrator` and `ares-worker` installation and invocation logic
  from systemd unit files and EC2/k8s scripts.
- Deprecated any split-binary invocation patterns in favor of the unified approach.
…ice commands

Changed:

- Updated documentation, default values, and task output to use ares worker
  instead of ares-worker for consistency with the new binary naming in
  Ansible Redis role and related docs
- Modified ares-cli to skip global telemetry initialization when running the
  orchestrator or worker subcommands, ensuring correct telemetry setup
  for service commands and preventing duplicate initialization
**Changed:**

- Replaced all documentation and code references from `ares-cli` to `ares` to
  reflect migration to a single unified binary. Updated CLI usage examples,
  architecture diagrams, and deployment instructions in `.gemini/agents/ares-operator.md`,
  `AGENTS.md`, `README.md`, `docs/blue.md`, `docs/red.md`, and related docs.
- Updated project structure and crate descriptions in `.github/CONTRIBUTING.md`
  to describe the unified binary model (CLI, orchestrator, and worker).
- Adjusted Taskfiles and build output messages in `.taskfiles/blue/Taskfile.yaml`,
  `.taskfiles/red/Taskfile.yaml`, `.taskfiles/remote/Taskfile.yaml`, and
  `Taskfile.yaml` to use the `ares` binary instead of `ares-cli`.
- Revised all code comments, help output, and user-facing messages in
  `ares-cli/src/blue/submit.rs`, `ares-cli/src/ops/backfill.rs`,
  `ares-cli/src/orchestrator/blue/auto_submit.rs`,
  `ares-cli/src/orchestrator/blue/investigation.rs`,
  `ares-cli/src/orchestrator/mod.rs`, and `ares-core/src/lib.rs` to reference
  `ares` instead of `ares-cli`.
- Updated documentation paths and references to code locations in `docs/blue.md`
  and `docs/red.md` to match the new unified crate structure (e.g., orchestrator
  and worker code now under `ares-cli`).
- Modified infrastructure and deployment docs (`docs/infrastructure.md`) and
  Docker Compose templates to invoke the correct binary and entrypoints.
- Clarified crate layout and tool build script references in `tools.yaml` to
  reflect the unified build process.
… `ares` CLI

**Changed:**

- Standardized documentation references for Rust agent/orchestrator/worker
  binaries to use the unified `ares` CLI syntax (e.g., `ares worker` or
  `ares orchestrator`) instead of legacy binary names like `ares-worker` or
  `ares-orchestrator` across all relevant README files
- Updated example commands, directory structure listings, and descriptive
  sections to reflect the new CLI approach, improving clarity and consistency
  for users and aligning with current project naming conventions
- Enhanced agent/orchestrator documentation tables to clarify invocation
  patterns with the new CLI format
…rce files

**Removed:**

- Deleted the entire `ares-orchestrator` crate, including all Rust source files,
  configuration, automation logic, state management, result processing, LLM agent
  loops, blue team investigation orchestrator, and supporting modules
- Deleted the entire `ares-worker` crate, including all Rust source files,
  configuration, task execution loops, tool dispatcher implementations, heartbeat
  logic, and supporting code
- Removed `Cargo.toml` files for both crates, unregistering them from the
  workspace and eliminating their build configurations and dependencies
- Eliminated all code for red team and blue team orchestration, worker task
  processing, tool execution, Redis-backed state and queue management, and
  orchestration infrastructure in these components

**Changed:**

- Project structure no longer includes `ares-orchestrator` or `ares-worker`
  subdirectories or binaries
- All CI, build, and dependency workflows that referenced these crates must be
  updated to reflect their removal

**Why:**

- This refactor removes the orchestrator and worker binaries in preparation for
  a major architecture change, deprecation, or migration to a new orchestration
  model. All orchestration and agent execution responsibilities previously handled
  by these Rust components are now removed from the codebase.
**Changed:**

- Updated the default value of `redis_ares_worker_binary` to `/usr/local/bin/ares`
  in both documentation and defaults to remove the hardcoded `worker` argument
- Modified `ares-worker@.service.j2` template to append `worker` to the
  `ExecStart` command, ensuring the service runs the correct subcommand
…cture

**Changed:**

- Increased investigation run timeout from 15 minutes to 45 minutes and stale
  threshold from 15 to 50 minutes to accommodate longer-running blue team
  queries and reduce premature termination - `blue/runner.rs`, `completion.rs`
- Increased blue tool execution timeout from 120s to 600s to match worst-case
  query duration with retries and concurrency - `blue/sub_agent.rs`
- Changed investigation report directory structure to include "blue/investigations"
  subdirectories, improving organization, and simplified report filename to
  remove redundant "_report" suffix - `blue/investigation.rs`
- Updated blue team completion wait deadline from 20 to 45 minutes to align with
  increased investigation timeouts and avoid early shutdown - `completion.rs`
- Updated code comment in tool executor test to clarify correct dispatcher path
  reference, ensuring clarity for maintenance - `worker/tool_executor.rs`

**Removed:**

- Removed `ares-orchestrator/ares-worker` from EC2 build source tarball to
  streamline build packaging and avoid unnecessary files - `.taskfiles/ec2/Taskfile.yaml`
**Changed:**

- Updated CLI and configuration to accept `REDIS_URL` as a fallback if
  `ARES_REDIS_URL` is not set, improving compatibility with environments like
  Kubernetes where `REDIS_URL` is commonly used
- Clarified documentation comment to mention both `ARES_REDIS_URL` and
  `REDIS_URL` as sources for the Redis URL in the CLI options
- Changed error messages and default value logic in orchestrator and worker
  configs to reflect support for both environment variables
…formats

**Added:**

- Accept and ignore legacy positional role argument and Python-style
  `--worker-args.*` flags in the worker CLI command for compatibility

**Changed:**

- Update worker config to allow `ARES_ROLE` as a fallback for
  `ARES_WORKER_ROLE` environment variable, improving compatibility with legacy
  deployments
- Enhance operation ID JSON parsing to handle strings prefixed with telemetry
  or log output, ensuring robust extraction of JSON payloads in orchestrator
  config
- Update main CLI dispatch to support new worker command structure with legacy
  arguments

**Removed:**

- Legacy strictness requiring only `ARES_WORKER_ROLE` in worker config; now
  also accepts `ARES_ROLE` for better migration support
**Changed:**

- Enhance redis URL detection to build from REDIS_HOST, REDIS_PORT, REDIS_DB,
  and REDIS_PASSWORD if ARES_REDIS_URL and REDIS_URL are unset. Improves
  compatibility with Kubernetes and similar deployments - ares-cli/src/worker/config.rs
- Update error message to clarify all accepted redis configuration variables
@l50 l50 force-pushed the worktree-feat+single-binary branch from 4d57aa5 to 1d08ebb Compare April 18, 2026 00:19
@l50 l50 merged commit 4e2f567 into main Apr 18, 2026
30 checks passed
@l50 l50 deleted the worktree-feat+single-binary branch April 18, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes made to project documentation area/github Changes made to GitHub Actions workflows area/templates Changes made to warpgate template configurations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant