Skip to content

fix(cloud): enforce cloud-source degrade and carry the source alias#57

Merged
sourcehawk merged 3 commits into
feature/cloud-context-mcpfrom
feature/cloud-context-mcp--fix-launcher
May 30, 2026
Merged

fix(cloud): enforce cloud-source degrade and carry the source alias#57
sourcehawk merged 3 commits into
feature/cloud-context-mcpfrom
feature/cloud-context-mcp--fix-launcher

Conversation

@sourcehawk
Copy link
Copy Markdown
Owner

Description

Towards #44

Addresses three code-review findings in the cloud-context MCP launcher integration. A failed cloud-source probe now actually disables the source rather than merely reporting it, the connections API carries the source alias so same-provider sources are distinguishable, and a docs over-claim about account-scope enforcement is corrected. These tighten the launcher side of the cloud-context work to match the spec's visible-degrade contract and the keying the MCP already uses.

Changes

  • Preflight probes cloud sources before writing the session MCP config and wires only the sources whose probe is Valid. A degraded source is now absent from mcp.json (disabled, not just reported), while all sources, valid and degraded, remain in Result.CloudSources so the connections panel still shows the degraded ones with their hint. The probe still degrades, never blocks the session.
  • /api/connections cloud DTO and the frontend CloudConnection type carry the source alias. The connections panel surfaces it as the pill heading, so two sources sharing a provider and identity but differing in scope are now distinguishable (matching the triagent-cloud-<alias> MCP key).
  • docs/content/cloud-providers.md no longer implies run_cli enforces scope.accounts. Project and region/zone are argv-enforced; account reach is governed by the pinned assume-role profile, and scope.accounts is documented as informational and reserved.

Testing

make test-go race-clean and green (preflight and server packages included), make lint reports 0 issues, cd frontend && npm run typecheck is clean, the ConnectionsPanel vitest suite passes (4/4), and make build produces both binaries with a fresh embedded bundle. The preflight test now asserts a degraded source is absent from the written MCP config while the valid one is present; the server test asserts the alias is present in the cloud DTO; the vitest spec asserts the alias renders in the pill.

🤖 Generated with Claude Code

sourcehawk and others added 3 commits May 30, 2026 18:13
Probe cloud sources before writing the MCP config and wire only the
sources whose probe is Valid. A failed probe now disables the source
(absent from mcp.json) instead of merely reporting it, honoring the
visible-degrade contract. All sources, valid and degraded, remain in
Result.CloudSources so the status surface still shows the degraded ones
with their hint. The probe still degrades, never blocks the session.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The cloud DTO exposed provider, identity, valid, and hint but not the
alias, so two sources sharing a provider and identity but differing in
scope were indistinguishable even though the MCP is keyed
triagent-cloud-<alias>. Add alias to the DTO and the frontend
CloudConnection type, and surface it as the pill heading so each source
is identifiable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Scope allowlist section implied run_cli enforces scope.accounts as
an account allowlist. It does not: only --project and --region/--zone
are argv-validated. AWS account reach is bounded by the pinned
assume-role profile, not by scope.accounts. State that project and
region/zone are enforced on argv, while account reach is governed by the
pinned role, and mark scope.accounts as informational and reserved so
operators do not rely on an allowlist the harness does not enforce.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sourcehawk sourcehawk merged commit 25986bd into feature/cloud-context-mcp May 30, 2026
4 checks passed
@sourcehawk sourcehawk deleted the feature/cloud-context-mcp--fix-launcher branch May 30, 2026 16:25
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