Skip to content

fix(mcp): revert managed adapter credential revisions - #10361

Merged
ericksoa merged 1 commit into
mainfrom
revert/pr-10307
Aug 26, 2026
Merged

fix(mcp): revert managed adapter credential revisions#10361
ericksoa merged 1 commit into
mainfrom
revert/pr-10307

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Revert #10307 and restore main to the exact tree that existed immediately before merge commit 896760b7cd407606050ce609dbcce429b06cc3f1.

Requested as an immediate maintainer rollback.

Verification

  • git diff --quiet fded75f043fb310c04a1698daeba29e9474859c1 -- . passed after applying the revert.
  • Commit and push hooks passed after rebuilding CLI artifacts.

Signed-off-by: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • Improvements

    • Improved MCP adapter registration, restart, and teardown recovery to preserve credential state more reliably.
    • Enhanced credential synchronization for both credential-enabled and hostless provider flows.
    • Added support for MCP credential placeholders with or without revision prefixes.
    • Improved crash recovery and concurrent adapter updates to reduce unnecessary republishing and maintain consistent final state.
  • Tests

    • Updated coverage for credential absence, rollback, restart, and recovery scenarios.

Reverts #10307 at maintainer request.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa
ericksoa merged commit 3375280 into main Aug 26, 2026
56 of 59 checks passed
@ericksoa
ericksoa deleted the revert/pr-10307 branch August 26, 2026 06:46
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f0076abe-1df9-4c5b-af6f-e303f09b13b8

📥 Commits

Reviewing files that changed from the base of the PR and between 896760b and f79945b.

📒 Files selected for processing (17)
  • src/lib/actions/sandbox/mcp-bridge-adapter-registration.test.ts
  • src/lib/actions/sandbox/mcp-bridge-adapter-teardown.test.ts
  • src/lib/actions/sandbox/mcp-bridge-adapter-teardown.ts
  • src/lib/actions/sandbox/mcp-bridge-adapters.ts
  • src/lib/actions/sandbox/mcp-bridge-add-restart.ts
  • src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts
  • src/lib/actions/sandbox/mcp-bridge-provider-readiness.ts
  • src/lib/actions/sandbox/mcp-bridge-provider.test.ts
  • src/lib/actions/sandbox/mcp-bridge-restart.ts
  • test/e2e/live/mcp-bridge.test.ts
  • test/e2e/live/mcp-provider-rewrite-probe.ts
  • test/e2e/support/mcp-provider-rewrite-probe.test.ts
  • test/helpers/mcp-provider-revision.ts
  • test/mcp/mcp-adapter-teardown-rollback.test.ts
  • test/mcp/mcp-add-crash-consistency.test.ts
  • test/mcp/mcp-destroy-lifecycle.test.ts
  • test/mcp/mcp-restart-policy-order.test.ts

📝 Walkthrough

Walkthrough

The bridge removes revision-observing adapter registration. Add, restart, restore, and rollback flows now pass observed credential revisions through registerAgentAdapter options. Credential projection and authorization tests now cover the updated synchronization and placeholder behavior.

Changes

Credential registration lifecycle

Layer / File(s) Summary
Remove revision-observing registration
src/lib/actions/sandbox/mcp-bridge-adapters.ts, src/lib/actions/sandbox/mcp-bridge-provider-readiness.ts, src/lib/actions/sandbox/mcp-bridge-adapter-registration.test.ts
The revision-specific registration helper, credential observation, retry, timing, stability, and related error constructors were removed.
Synchronize credentials before registration
src/lib/actions/sandbox/mcp-bridge-add-restart.ts, src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts, test/mcp/mcp-add-crash-consistency.test.ts, test/helpers/mcp-provider-revision.ts, test/mcp/mcp-destroy-lifecycle.test.ts, test/mcp/mcp-restart-policy-order.test.ts
Add and recovery flows establish revision baselines, republish credentials after absence, and validate coalesced delayed projection.
Preserve revisions during rollback
src/lib/actions/sandbox/mcp-bridge-adapter-teardown.ts, src/lib/actions/sandbox/mcp-bridge-adapter-teardown.test.ts, src/lib/actions/sandbox/mcp-bridge-restart.ts
Rollback preserves stored revisions when current observation is absent, clears canonical state, and passes revisions through registration options.
Accept unversioned authorization placeholders
test/e2e/live/mcp-bridge.test.ts, test/e2e/live/mcp-provider-rewrite-probe.ts, test/e2e/support/mcp-provider-rewrite-probe.test.ts
Authorization matching accepts unversioned and revision-prefixed placeholders. End-to-end validation checks the unversioned placeholder.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: apurvvkumaria, aasthajh

Sequence Diagram(s)

sequenceDiagram
  participant AddRestart as mcp-bridge-add-restart
  participant Credentials as Host credentials
  participant Attachment as Attached credential revision
  participant Registration as registerAgentAdapter
  AddRestart->>Credentials: Republish host credentials
  Credentials-->>Attachment: Expose attached revision
  AddRestart->>Attachment: Wait for synchronized revision
  AddRestart->>Registration: Register adapter with credentialRevision
Loading
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert/pr-10307

Comment @coderabbitai help to get the list of available commands.

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