Repository navigation
Description
Agent Diagnostic
- Inspected the trusted-main GitHub Actions job and its uploaded
e2e-mcp-bridge-hermesartifact. - Compared the new failure with Hermes MCP rebuild loses persisted managed intent on OpenShell v0.0.101 #8671 and merged fix fix(hermes): preserve MCP rebuild restart evidence #8679.
- Reviewed the exact test sequence and post-restore verification code at the failing SHA.
- Searched open and closed issues for the same failure boundary; no exact tracker exists.
- Made no code/configuration changes and did not rerun any workflow.
Description
The trusted-main mcp-bridge (hermes) E2E lane reports a successful sandbox rebuild and MCP restoration, but the first real MCP-backed Hermes request after rebuild returns HTTP 500.
This occurred in E2E run 31357091338, job mcp-bridge (hermes) 93361110199, at candidate SHA 68129579827191770cfcf496715e4e272bc96129 with #8679 merged.
The provider-backed rebuild exits 0 after 883785 ms and reports:
MCP bridges restored
Hermes gateway restarted and verified after state restore
Sandbox 'e2e-mcp-hermes' rebuilt successfully
The test then passes every post-rebuild assertion before the live call:
- authenticated MCP initialize/list discovery using the rotated provider credential;
- restored Hermes
mcp_serversconfiguration with the OpenShell credential placeholder; - absence of both the original and rotated raw host secrets from
/sandbox/.hermes.
The immediately following request to Hermes /v1/chat/completions fails in approximately 100 ms:
curl: (22) The requested URL returned error: 500
The identical live-call helper succeeds before rebuild after rediscovery restart and after provider credential rotation, returning:
MCP_AUTH_REWRITE_OK::nemoclaw-authenticated-mcp-proof
The failure is Hermes-specific in this run: the OpenClaw and Deep Agents MCP bridge jobs passed, as did the ordinary Hermes, Hermes rebuild, stale-base rebuild, and Hermes MCP development lanes.
Reproduction Steps
- Use candidate SHA
68129579827191770cfcf496715e4e272bc96129with OpenShell0.0.101. - Run the trusted-main E2E workflow with the
mcp-bridge (hermes)target. - Onboard Hermes and register the authenticated fake MCP bridge.
- Complete the existing Shields, DNS-rebinding, rediscovery, and credential-rotation checks.
- Confirm a real Hermes MCP tool call succeeds with the rotated credential.
- Run the scenario's rebuild-without-MCP-host-secret phase (
nemoclaw e2e-mcp-hermes rebuild --yes). - Observe that rebuild exits
0and reports MCP restoration plus gateway verification. - Immediately send the same authenticated request to
http://localhost:8642/v1/chat/completions, asking Hermes to invoke the fake MCP tool once. - Observe HTTP 500 instead of the expected proof token.
Environment
- Workflow: manually dispatched trusted-main E2E
- Candidate SHA:
68129579827191770cfcf496715e4e272bc96129 - fix(hermes): preserve MCP rebuild restart evidence #8679 merge SHA:
d7ac19b519d06f13a65a8dd3a1f2d7424c5d7e60 - E2E target/shard:
mcp-bridge/hermes - Execution: Linux x86_64 GitHub Actions runner
- OpenShell CLI:
0.0.101 - Hermes Agent:
0.19.0 - Container runtime: Docker
Debug Output
The rebuild still records the transitional mismatch that #8679 was designed to supersede after proven process replacement and health:
Failure layer: MCP reconciliation refusal - gateway restart failed for 'e2e-mcp-hermes'.
Hermes MCP config does not match persisted managed intent
It then restores policy version 3, reports MCP and gateway verification, and exits 0.
The next live-call artifact records:
durationMs: 100
exitCode: 22
timedOut: false
stdout: ""
stderr: "curl: (22) The requested URL returned error: 500"
The exact failing GitHub Actions step is Run MCP OpenShell provider live test. The failing command comes from the post-rebuild assertRealAdapterToolCall in test/e2e/live/mcp-bridge.test.ts.
Artifact: e2e-mcp-bridge-hermes
Logs
The cleanup phase later fails to remove the MCP bridge and destroy the sandbox because Shields are up or unreadable. Those teardown errors occur after the HTTP 500 product assertion and are secondary.
Relationship to #8671 and #8679
#8671 tracked rebuild aborting when the gateway restart observed a transitional mismatch between Hermes MCP configuration and persisted managed intent. #8679 preserved explicit process-replacement and health evidence so restoration could continue, while retaining mandatory final reconciliation.
That narrow control-flow fix works here: rebuild no longer aborts and the restored config, authenticated discovery, and credential boundary all pass. However, the trusted-main live proof that #8679 could not run on its PR branch now shows the restored runtime cannot complete its first real MCP-backed request.
This is therefore a directly linked follow-up rather than the same observed failure:
- Hermes MCP rebuild loses persisted managed intent on OpenShell v0.0.101 #8671: rebuild fails before completion.
- This issue: rebuild reports success, but the restored live Hermes runtime returns HTTP 500.
It is also a regression of the post-rebuild usability contract previously covered by #7084/#7117, although that older failure had a stopped gateway and missing MCP configuration rather than the current healthy/discovered-but-unusable state.
Likely Boundary — Hypothesis, Not Confirmed
The evidence narrows the likely boundary to post-restore Hermes runtime activation or request processing after MCP discovery. The current final verification proves process health and managed-config reconciliation, but it does not prove a complete model-to-MCP tool turn.
Basic credential rewriting and static restoration are less likely as the primary failure because authenticated post-rebuild MCP discovery uses the rotated secret, the Hermes config projection passes, and raw host credentials remain absent.
The exact inner failure remains unknown: the probe uses curl -f, so the artifact drops the HTTP 500 response body, captures no matching bounded Hermes gateway traceback, and does not preserve whether the failing request reached the fake MCP fixture as tools/call.
Acceptance Criteria
- The trusted-main
mcp-bridge (hermes)lane passes the rebuild-without-MCP-host-secret flow on OpenShell0.0.101. - The first post-rebuild live request returns
MCP_AUTH_REWRITE_OK::nemoclaw-authenticated-mcp-proof. - The fake MCP fixture observes exactly one authenticated
tools/callusing the rotated provider credential. - Rebuild does not report success for an equivalent runtime state that immediately returns HTTP 500; final verification detects the unusable state and fails closed.
- The fix(hermes): preserve MCP rebuild restart evidence #8679 contract remains intact: only a proven transitional mismatch may be superseded, and persistent final drift still fails closed.
- Restored provider, policy, adapter, and managed-intent state remain coherent, with raw host secrets absent from sandbox state.
- Failure artifacts capture a bounded, redacted non-2xx response body, relevant Hermes gateway/reconciliation logs, and whether
tools/callreached the fake MCP server. - Cleanup lowers or otherwise handles Shields so teardown does not leave an orphan or obscure the primary failure.
- Targeted unit/integration coverage protects the corrected post-restore boundary.
Checklist
- Confirmed in a trusted exact-main E2E run; no isolated rerun was performed.
- Searched existing issues and did not find an exact duplicate of this post-rebuild HTTP 500 boundary.
Activity
fix(rebuild): keep Hermes MCP runtime active after rebuild (#8703)
fix(rebuild): settle expired Shields before success (#8713)