Skip to content

refactor(mcp): type cost and daemon config services - #365

Merged
Shooksie merged 1 commit into
mainfrom
audit/task-971-cost-services
Jul 29, 2026
Merged

refactor(mcp): type cost and daemon config services#365
Shooksie merged 1 commit into
mainfrom
audit/task-971-cost-services

Conversation

@Shooksie

Copy link
Copy Markdown
Contributor

Summary

  • route cost decisions and budget reads/writes through typed in-process application services
  • share one daemon-configuration service between CLI, daemon config MCP, and budget mutation
  • accept structured notification configuration while retaining mutually exclusive JSON/file compatibility inputs
  • document the management-only ownership boundary for global fleet state

Validation

  • cargo fmt --all
  • git diff --check
  • cargo check -p orchestrator-cli --tests --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo animus-lint
  • cargo test -p orchestrator-cli --locked -- --test-threads=1 (1,430 unit tests plus all integration suites)

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
animus-docs Ready Ready Preview Jul 29, 2026 10:03pm

Request Review

@animus-launchapp-gitprovider animus-launchapp-gitprovider Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: CHANGES REQUESTED

  1. crates/orchestrator-cli/src/services/operations/ops_mcp/daemon_inproc.rs:notification_config_from_inputstd::fs::read_to_string(path) now resolves notification_config_file against the MCP server process working directory. The previous subprocess path ran the daemon-config command with the selected project_root, so a documented project-relative input such as .animus/notification-config.json resolved inside that project; the in-process migration silently changes that behavior whenever the server cwd differs from project_root. REQUIRED CHANGE: pass the resolved project root into notification_config_from_input, and for a relative notification_config_file, join it to that root before reading (preserve absolute paths unchanged); resolve the root once in daemon_config_set_inproc and use the same resolved value for both file loading and daemon_config_application. Verification: add an MCP in-process test that creates <temp project>/.animus/notification-config.json, keeps the test process cwd elsewhere, calls daemon_config_set_inproc with notification_config_file: Some(".animus/notification-config.json"), and asserts the call succeeds and /result/notification_config equals the file content; then run cargo test -p orchestrator-cli daemon_config --locked -- --test-threads=1 with an expected pass.

The typed cost/budget service extraction, management-only authorization boundary, mutual-exclusion validation, and documentation updates are otherwise well-scoped and thoughtfully tested.

@Shooksie
Shooksie marked this pull request as ready for review July 29, 2026 22:06
@Shooksie
Shooksie merged commit 4c1d7d4 into main Jul 29, 2026
14 checks passed
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