Skip to content

fix(mcp): converge managed adapter credential revisions - #10307

Merged
cjagwani merged 62 commits into
mainfrom
codex/fix-mcp-revision-regressions-10300
Aug 26, 2026
Merged

fix(mcp): converge managed adapter credential revisions#10307
cjagwani merged 62 commits into
mainfrom
codex/fix-mcp-revision-regressions-10300

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the post-#10173 MCP revision regressions in this PR. Managed adapters now register against a stable opaque credential revision observed through fresh OpenShell execs. A delayed provider projection can no longer leave committed adapter configuration stale, and teardown never derives credential authority from an unrelated provider resource version.

Related Issue

Fixes #10300
Related: #10298

Changes

  • Require the same revision from two consecutive fresh OpenShell execs before treating a credential as ready.
  • For credential-bearing add, prove the installed revision after policy activation, republish once, require a different stable revision, and register the adapter at that final revision.
  • Re-register OpenClaw, Hermes, and Deep Agents Code adapters when fresh observation finds revision drift, then require three stable post-registration observations before success.
  • Apply convergence to add, restart, runtime restore, and teardown rollback.
  • Fail closed when teardown cannot prove a fresh opaque revision; never substitute provider resourceVersion.
  • Require bounded revision-scoped placeholders in Deep Agents Code live evidence and the provider-rewrite probe.
  • Cover concurrent add, delayed projection, crash recovery, restart, destroy, rebuild, stale or unstable authority, and raw-secret exclusion.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Sensitive paths changed (credentials and sandbox policy lifecycle)
  • Exact-head sensitive-path advisor review is pending
  • Non-success, skipped, or missing CI check accepted by maintainer: none accepted

Verification

Exact local head: 44088b59c

  • 286/286 focused MCP, Hermes lifecycle, crash consistency, restart, teardown, destroy, and inherited watch-trigger tests passed
  • npm run build:cli passed
  • npm run checks:repository passed: 1,821 files, 5,760 edges, 0 cycles
  • npx prek run --all-files passed
  • No secrets, API keys, or raw credentials committed
  • Exact-head CI and focused OpenClaw/Hermes/Deep Agents E2E are pending

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

rsliter and others added 30 commits August 25, 2026 06:54
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>

# Conflicts:
#	agents/hermes/mcp-config-transaction.py
#	src/lib/actions/sandbox/mcp-bridge-adapter-hermes.test.ts
#	src/lib/actions/sandbox/mcp-bridge-adapter-registration.test.ts
#	src/lib/actions/sandbox/mcp-bridge-adapter-status.ts
#	test/agents/hermes/hermes-mcp-credential-revision.test.ts
#	test/e2e/support/mcp-bridge-hermes-lifecycle.test.ts
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>

# Conflicts:
#	agents/hermes/mcp-config-transaction.py
#	src/lib/actions/sandbox/mcp-bridge-adapter-hermes.test.ts
#	src/lib/actions/sandbox/mcp-bridge-adapter-hermes.ts
#	test/agents/hermes/hermes-mcp-credential-revision.test.ts
#	test/e2e/support/mcp-bridge-hermes-lifecycle.test.ts
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
ericksoa and others added 7 commits August 25, 2026 20:04
Merge the latest exact #10270 head while retaining the stronger final-generation barriers.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Merge exact #10270 head 1613083 and preserve the final opaque revision barriers.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Merge exact #10270 head 286818d and keep fresh-revision rollback convergence.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Merge exact #10270 head cbf312d after validating generated variants and docs routes.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Remove unrelated branch drift and keep only MCP runtime, tests, and corresponding docs.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa
ericksoa changed the base branch from codex/fix-hermes-mcp-runtime-contract-10155 to main August 26, 2026 04:03
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown
Contributor

Keep the PR diff limited to the MCP regression fix and its direct coverage.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Exclude unrelated E2E changes that landed on main from the MCP regression diff.

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

@rsliter rsliter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing exact commit 8068bd5. Two merge blockers remain. First, the effective MCP diff still includes unrelated PR Review Advisor workflow, tool, test, and documentation rewrites that are not described by this PR and must be removed from the candidate. Second, this branch carries material Charan Jagwani work from #10270, while #10270 does not contain Charan own PR-body Signed-off-by declaration. The superseded-PR attribution policy forbids selecting or merging the transferred replacement until Charan adds that declaration personally. Current CI and changes-requested gates remain separate blockers.

@cjagwani

Copy link
Copy Markdown
Collaborator

Fresh CI on 8068bd5f has Hermes managed startup green. CLI shard 10 is failing for an unrelated watch-trigger baseline mismatch: test/helpers/vitest-watch-triggers.ts and test/repository/vitest-watch-triggers.test.ts both replace the removed OpenShell advisor test with pr-review-advisor-workflow-boundary.test.ts a second time. runTests() dedupes the actual list to one entry, while the expectation still contains two. Dedupe that path in both lists and rerun shard 10.

@cjagwani

Copy link
Copy Markdown
Collaborator

Attribution blocker cleared: I added my personal Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> declaration to the #10270 PR body.

For the remaining scope blocker, please reset the unrelated PR Review Advisor changes in #10307 to current main, not just the duplicate expectation. The effective diff still includes .github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/**, test/automation/pull-requests/pr-review-advisor-*, and the related vitest-watch-triggers edits. After that, rerun CI; shard 10 should clear with the unrelated baseline removed.

Merge current main because GitHub reported the PR unmergeable; retain only the tested MCP delta.

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

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on green

@ericksoa
ericksoa marked this pull request as draft August 26, 2026 05:44
@github-actions

Copy link
Copy Markdown
Contributor

PR review advisory complete for commit 44088b5: read the full review. Read it before deciding whether to request changes, approve, or merge this PR.

All previous runs

@cjagwani
cjagwani dismissed rsliter’s stale review August 26, 2026 06:16

Resolved in subsequent commits. Rebecca confirmed the teardown blocker was fixed at b5f39e5; the unrelated diff and attribution blockers are cleared at 44088b5, which has independent exact-head approval from Carlos.

@cjagwani
cjagwani marked this pull request as ready for review August 26, 2026 06:22
@cjagwani
cjagwani merged commit 896760b into main Aug 26, 2026
112 of 126 checks passed
@cjagwani
cjagwani deleted the codex/fix-mcp-revision-regressions-10300 branch August 26, 2026 06:24
ericksoa added a commit that referenced this pull request Aug 26, 2026
## 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 fded75f -- .`
passed after applying the revert.
- Commit and push hooks passed after rebuilding CLI artifacts.

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

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
ericksoa added a commit that referenced this pull request Aug 27, 2026
## Summary

Restore the exact code state from merged PR #10307 after its requested
rollback.

The replacement branch tree is byte-for-byte identical to original merge
commit `896760b7cd407606050ce609dbcce429b06cc3f1`.

## Related Issue

Fixes #10300
Related: #10298

## Verification

- Exact replacement head: `b5286eb8e`
- Exact tree match: `fdb4b3cdbbaf5dba67c016d259cedac9da83977f`
- Commit and push hooks passed.
- Prior exact-head CI:
https://github.com/NVIDIA/NemoClaw/actions/runs/32934865387
- Prior managed-image qualification:
https://github.com/NVIDIA/NemoClaw/actions/runs/32934865411
- Prior focused E2E:
https://github.com/NVIDIA/NemoClaw/actions/runs/32937684548

This PR is intentionally opened as a draft.

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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Reliability**
* Improved MCP credential synchronization during registration, restart,
and recovery.
* Added safeguards for unavailable, unstable, or outdated credential
revisions.
* Improved recovery after lifecycle failures, timeouts, and interrupted
runtime operations.

* **Security**
* Strengthened credential authorization validation and prevented
unversioned credential placeholders.
* Restricted runtime state access to the required read-only and startup
paths.

* **Bug Fixes**
* Improved Hermes startup ordering and runtime configuration validation.
  * Added retry handling for qualifying OpenClaw onboarding failures.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior integration: openclaw OpenClaw integration behavior needs: cleanup-review Inactive item needs maintainer cleanup review security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix post-#10173 MCP revision regressions in PR E2E

7 participants