MCP add can commit an adapter for a transient credential revision
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Investigation Summary
- Exact OpenClaw MCP pass 1 succeeded on PR #9726 commit `600cd2e6b85420e1fd1258f306401224e7f0d6fa`.
- Independent pass 2 failed after one concurrent add succeeded and the duplicate add was rejected as expected.
- The immediate status read reported an attached, credential-ready provider and present policy, but `adapter.registered` was `false` with a revision mismatch.
- The same PR branch passed both exact MCP passes on `4111965ded190e28a16b8c96c1882957a82a2903`, before merge commit `636f18ad1190823cffcc233e3d8c8e3bd04828b2` from PR #10173 changed credential-revision status validation.
- The exact OpenShell revision transition between add readiness and the immediate status read remains unknown.
## Description
A successful MCP add can persist an agent adapter for a credential revision that is no longer current when the command returns.
The winning concurrent add verified the credential on the wire with HTTP 200. The immediate status command then observed the provider and policy as present and ready, but rejected the persisted OpenClaw adapter because its placeholder did not match the current credential revision.
MCP add must not report success until the persisted adapter matches the current attached credential revision. If the revision cannot be proven stable, the command must fail closed and preserve recoverable state.
## Reproduction Steps
1. Build and publish an exact managed OpenClaw candidate that contains merge commit `636f18ad1190823cffcc233e3d8c8e3bd04828b2`.
2. Run the protected exact OpenClaw managed-image MCP discovery test twice.
3. Start two concurrent adds for the same authenticated MCP server.
4. Confirm that one add succeeds and one reports the expected duplicate.
5. Immediately run `nemoclaw mcp status concurrent --json`.
6. Observe that one run can report `adapter.registered: false` while provider and policy state remain present and ready.
## Environment
- NemoClaw candidate: `600cd2e6b85420e1fd1258f306401224e7f0d6fa`
- OpenShell: `0.0.106`
- Supervisor image: exact digest recorded by the protected workflow
- Workflow run: https://github.com/NVIDIA/NemoClaw/actions/runs/32892676965
- Failed job: https://github.com/NVIDIA/NemoClaw/actions/runs/32892676965/job/97956016873
- Passing sibling job: https://github.com/NVIDIA/NemoClaw/actions/runs/32892676965/job/97956017075
- Last pre-regression two-pass run: https://github.com/NVIDIA/NemoClaw/actions/runs/32888596476
## Debug Output
The failed job retained the redacted artifact `pr-exact-openclaw-mcp-32892676965-1-pass-2`.
Relevant bounded state:
```text
concurrent add winner: exit 0, credential verified on the wire (HTTP 200)
concurrent add loser: exit 1, expected duplicate
provider: registry present, gateway present, attached, credential ready
policy: registry present, gateway present
adapter: registered false, detail mismatch
credential probe: skipped because the managed adapter did not match the current credential revision
cleanup: passed
```
No command timed out. The test failed at `test/e2e/live/mcp-bridge.test.ts:310`.
## Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate
Contributor guide
Assessment
This issue has not been assessed yet.