feat(cp): [fleet.<name>] schema with members — fleet grouping (ADR slice 1) - #34
Merged
Merged
Conversation
…ce 1) Backend for fleet-as-usage-grouping: a fleet is a named group with explicit members, decoupled from the physical cluster — two fleets may share a cluster (and one credential) while listing different members. Lets orca and mira be distinct fleets on cluster `oab`. - studio-cp: FleetBinding gains `members`; FleetBindings deserializes from the new `[fleet.<name>]` map form (name = key) OR the legacy `[[fleet]]` array form (back-compat — existing configs keep parsing unchanged), via an untagged intermediate. `members` empty ⇒ whole cluster (legacy semantics). Adds `fleet_for_service` and `get(name)`; `for_cluster` unchanged (credential resolution stays cluster/account-granular). - oab-mcp: `fleet_config` now reports `members` per fleet. Tests: legacy parse still matches by cluster (members empty); named fleets parse with members + share a cluster; empty/comment-only parse to empty. Verified in isolation that the untagged+toml deserialize round-trips both forms. Slice 2 (config panel: list by fleet, roster filtered to members, switch by fleet) follows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brettchien
added a commit
that referenced
this pull request
Aug 14, 2026
…red to members (ADR Part A slice 2) (#35) Backend slice 1 (#34) taught oab-mcp's fleet_config to report each fleet's members. This wires the console (Part A slice 2 of the fleet-grouping ADR): - **Switch by fleet identity, not cluster.** A fleet is a usage-based group, so two fleets can share a cluster (orca + mira on `oab`). The config panel's switch key moves from `data-cluster` to `data-fleet` (name); `FleetConfigEntry` gains `members`. Selecting a fleet derives the cluster it reads from and the member set it filters by. - **Roster filtered to the fleet's members.** New pure `filterByMembers` keeps only deployments whose ECS service name (`oab-{ns}-{name}`) or short name is a member — mirroring studio-cp's `resolve_service`, which accepts both forms. An empty member list means whole cluster (legacy semantics), roster unfiltered. - **List by fleet.** Each fleet button shows its member services as chips (or "whole cluster"); empty-config help now points at the new [fleet.<name>] form. - Fixtures model the canonical shape: orca + mira sharing cluster `oab` with distinct members, and the new [fleet.<name>] TOML the editor loads. Verification: tsc --noEmit + vite build clean; vitest 31/31 (9 new — member filtering incl. short-name/full-name/empty cases, switch-by-name with a shared cluster, member rendering). Console unit tests don't run in CI (only Rust does), so this was run locally. 🤖 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).Backend slice 1 of fleet-as-usage-grouping (#33): a fleet is a named group with explicit
members, decoupled from the physical cluster — two fleets may share a cluster (and one credential) while listing different members. This is what lets orca and mira be distinct fleets on clusteroab.What:
FleetBindinggainsmembers.FleetBindingsdeserializes from either the new[fleet.<name>]map form (name = key) or the legacy[[fleet]]array form — back-compat, so an existingfleets.tomlkeeps parsing unchanged — via an untagged intermediate.membersempty ⇒ whole cluster (legacy semantics). Addsfleet_for_service+get(name);for_clusterunchanged (credential resolution stays cluster/account-granular for now).fleet_configreportsmembersper fleet.Back-compat matters: the operator's live laptop
fleets.tomlis the legacy[[fleet]]form — it must keep working, or Studio silently falls back to the ambient default and re-triggers the AccessDenied class of bug. Verified.Verification:
cargo check --tests -p studio-cp -p oab-mcpclean; theuntagged+toml+fromdeserialize round-trip (legacy array, named map, empty) was verified in an isolated crate (the studio-cp test binary links the full aws-sdk, so its execution is left to CI'sbuild-test).Slice 2 (config panel: list by fleet, roster filtered to a fleet's members, switch by fleet identity) follows. Relates to #33.
🤖 Generated with Claude Code