Skip to content

feat(oab-mcp): fleet-aware tool surface — target by fleet name, scope to members (Part B slice 1) - #37

Merged
brettchien merged 1 commit into
mainfrom
feat/fleet-aware-oab-mcp
Aug 14, 2026
Merged

brettchien merged 1 commit into
mainfrom
feat/fleet-aware-oab-mcp

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

Drafted by Orca (ecs-claude) — flagging authorship (shared GitHub identity).

Slice 1 of the reverse-MCP client ADR (#36), and the completion of Part A on the MCP side. Tools took only cluster, so they could not name a fleet when two fleets share a cluster (orca + mira on oab) — deploy_list({cluster:"oab"}) returned both. This makes the MCP surface fleet-aware, the precondition for the single-oab-server design (D1).

What

  • fleet arg on all 8 cluster-bearing tools (list/get/states/events/apply/scale/delete/runtime_context). A new target() resolver maps fleet (name) → the fleet's cluster (→ managing credential) + its member scope.
    • Unknown fleet → error, never a silent fall-through to the default cluster (that silent fallback is the AccessDenied class of bug the fleet work exists to kill).
    • No fleet → unchanged (cluster arg / server default). Back-compat.
  • Listing (deploy_list, get_agent_states) filters results to the fleet's members.
  • Writes (deploy_scale, deploy_delete) refuse a service outside the named fleet's members — a fleet handle only operates its own members (no-op for unscoped / whole-cluster calls).
  • runtime_context reports the named fleet's binding, so two fleets on one cluster resolve distinctly.
  • Membership match centralized in studio-cp FleetBinding::includes (full ECS name or short name; empty members ⇒ whole cluster), with unit tests.

Scope note

Credential stays cluster/account-granular (Part A): a fleet changes which members are seen/acted on and which binding is reported — not the auth identity. Two fleets sharing a cluster share one credential; cross-account per-fleet credentials are fleet ADR §5 Q4 (future).

Verification

  • cargo check --all-targets clean for oab-mcp + studio-cp (full aws-sdk compiled).
  • New studio-cp unit tests for includes (full name / short name / non-member / empty=whole-cluster).
  • ⚠️ Test execution left to CI (cargo test --workspace): the test-profile codegen of aws-sdk-ec2 OOMs the authoring box — the exact constraint ci.yml documents. The build-test + smoke gate exercises it.

🤖 Generated with Claude Code

… to members (ADR Part B slice 1)

Tools took only `cluster`, so they could not name a fleet when two fleets share
a cluster (orca + mira on `oab`) — deploy_list returned both. This makes the MCP
surface fleet-aware, the precondition for the Part B single-`oab`-server design.

- All 8 cluster-bearing tools gain a `fleet` arg. A new `target()` resolver maps
  `fleet` (name) → the fleet's cluster (→ managing credential) + its member scope.
  An unknown fleet is an error, never a silent fall-through to the default cluster
  (that silent fallback is the AccessDenied class of bug the fleet work kills).
  Absent `fleet`, behaviour is unchanged (cluster arg / default) — back-compat.
- Listing tools (deploy_list, get_agent_states) filter to the fleet's members.
- Writes (deploy_scale, deploy_delete) refuse a service outside the named fleet's
  members — a fleet handle only operates its own members.
- runtime_context reports the *named* fleet's binding, so two fleets on one
  cluster resolve distinctly (not first-on-cluster).
- Membership match centralized in studio-cp `FleetBinding::includes` (full ECS
  name or short name; empty members ⇒ whole cluster), with unit tests.

Credential stays cluster/account-granular (Part A): a `fleet` changes which
members are seen/acted on and which binding is reported, not the auth identity;
cross-account per-fleet credentials are fleet ADR §5 Q4 (future).

Verification: `cargo check --all-targets` clean (oab-mcp + studio-cp, full
aws-sdk). Test execution left to CI's `cargo test --workspace` — the test-profile
codegen of aws-sdk-ec2 OOMs this box (the constraint ci.yml documents).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@brettchien
brettchien merged commit 463b3a8 into main Aug 14, 2026
2 checks passed
@brettchien
brettchien deleted the feat/fleet-aware-oab-mcp branch August 14, 2026 03:19
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