feat(cp): FleetBinding config + per-fleet credential switch (ADR #19 slice 2) - #21
Merged
Merged
Conversation
…slice 2) Declarative Fleet→managing-credential bindings, and the switch that makes a bound cluster's calls run under its credential instead of the ambient [default]. - studio-cp: `FleetBinding` / `FleetBindings` (serde), `default_bindings_path` ($OAB_FLEETS_CONFIG, else ~/.config/oab-studio/fleets.toml), `load_bindings` (missing file => empty, opt-in), `resolve_binding_config` (profile-first + optional region, layered on the standard chain). - oab-mcp: loads bindings at startup; `aws_for(cluster)` resolves the bound config once (memoized) and every deploy_* tool now switches through it, falling back to the default chain when no binding governs the cluster. `runtime_context` takes an optional cluster and reports the binding in effect. Profile-first per the agreed slice-2 scope; assume-role and the IdentityMismatch reconcile flag are later slices. Binding config is operator-side selection, kept separate from the Fleet Store (#18) observed/lease state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brettchien
force-pushed
the
feat/fleet-binding-switch-slice2
branch
from
August 13, 2026 05:30
5ce48c8 to
8151cf1
Compare
brettchien
marked this pull request as ready for review
August 13, 2026 05:34
This was referenced Aug 13, 2026
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 across the fleet).Second slice of ADR #19 (Per-Fleet managing identity): the declare → switch half. Builds on slice-1 (#20,
runtime_context).What:
studio-cp—FleetBinding/FleetBindings(serde/TOML): map a cluster → its managing credential.default_bindings_path()=$OAB_FLEETS_CONFIGelse~/.config/oab-studio/fleets.toml.load_bindings()treats a missing file as empty (bindings are strictly opt-in — no behavior change unless you add the file).resolve_binding_config()builds theSdkConfiga binding selects (profile-first + optional region, layered on the standard chain).oab-mcp— loads bindings at startup;aws_for(cluster)resolves the bound config once (memoized) and everydeploy_*tool now switches through it, falling back to the default chain when no binding governs the cluster.runtime_contextgains an optionalclusterand reports the binding in effect.Why: this is the proactive fix for the
deploy_listincident — a bound cluster's calls run under its declared credential instead of whatever ambient[default]the chain resolves first.Example
fleets.toml:Scope / notes:
IdentityMismatchreconcile flag (compare resolved vsexpected_principal) are the next slices.oabctl.Verification: relying on CI (
build/test --workspaceon this PR) — local full builds OOM onaws-sdk-ec2per the ci.yml note. New unit test covers binding parse + cluster match.Relates to #19, follows #20.
🤖 Generated with Claude Code