Repository navigation
feat(oab-mcp): fleet-aware tool surface — target by fleet name, scope to members (Part B slice 1) - #37
Merged
Conversation
… 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)
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.
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+miraonoab) —deploy_list({cluster:"oab"})returned both. This makes the MCP surface fleet-aware, the precondition for the single-oab-server design (D1).What
fleetarg on all 8 cluster-bearing tools (list/get/states/events/apply/scale/delete/runtime_context). A newtarget()resolver mapsfleet(name) → the fleet's cluster (→ managing credential) + its member scope.fleet→ unchanged (clusterarg / server default). Back-compat.deploy_list,get_agent_states) filters results to the fleet's members.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_contextreports the named fleet's binding, so two fleets on one cluster resolve distinctly.studio-cpFleetBinding::includes(full ECS name or short name; empty members ⇒ whole cluster), with unit tests.Scope note
Credential stays cluster/account-granular (Part A): a
fleetchanges 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-targetsclean foroab-mcp+studio-cp(full aws-sdk compiled).studio-cpunit tests forincludes(full name / short name / non-member / empty=whole-cluster).cargo test --workspace): the test-profile codegen ofaws-sdk-ec2OOMs the authoring box — the exact constraintci.ymldocuments. Thebuild-test+ smoke gate exercises it.🤖 Generated with Claude Code