Skip to content

fix(e2e): retry serialized portable lock loser - #11505

Merged
prekshivyas merged 1 commit into
mainfrom
fix/mcp-concurrent-portable-lock-retry
Sep 11, 2026
Merged

fix(e2e): retry serialized portable lock loser#11505
prekshivyas merged 1 commit into
mainfrom
fix/mcp-concurrent-portable-lock-retry

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Outcome

Concurrent OpenClaw MCP discovery now accepts the serialized portable-host lock loser only after the competing command has committed one coherent bridge, then retries that rejected command once and requires the duplicate to be rejected as already present. This removes the deterministic Images workflow failure introduced with portable-host fencing while preserving fail-closed behavior for unknown errors.

Reason

Both OpenClaw MCP discovery jobs in Images runs 34544156685 and 34545930022 failed after one concurrent mcp add succeeded and the other exhausted the .nemoclaw-portable-host.lock retry budget. The test helper recognized only the existing Hermes restart transport signature, so it misclassified this expected serialized loser even though status proved the winner committed successfully.

Changes

  • Recognize only the exact portable-host lock timeout, alongside the already-reviewed Hermes restart transport signature.
  • Require post-race status verification of the committed bridge before permitting one retry of the rejected command.
  • Keep already-present duplicates unchanged and reject every unknown lock or transport diagnostic.
  • Add focused regression tests and document the concurrent-add retry contract.

Verification

  • npx vitest run --project e2e-support test/e2e/support/mcp-bridge-reliability.test.ts — passed, 48/48 tests.
  • npm run e2e:assertions:check — passed, 1,796 direct assertions across 86 files.
  • npm run test:e2e-phases:check — passed, 135 tests across 88 files.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli — passed.
  • npm run checks:repository — passed.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr — passed, including the repository-wide CLI typecheck. An initial run exhausted Node's default 4 GB local heap during that typecheck; no code or test assertion failed.
  • git diff --check origin/main...HEAD and the pre-commit secret scan — passed; the diff contains no secrets, API keys, or credentials.

Review notes

This is intentionally limited to E2E reconciliation and classification. It does not change production locking behavior. Real-run evidence is the identical two-job failure in merged-main Images run 34544156685 and OpenShell PR Images run 34545930022.


Signed-off-by: Prekshi Vyas prekshiv@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability when concurrent operations encounter temporary lock contention or service restarts.
    • Preserved validation that successful operations create only one coherent result and reject duplicates.
  • Tests

    • Expanded coverage for retry behavior, bridge verification, unknown failures, and unverified results.
    • Added isolated probing for concurrent-operation scenarios.
  • Documentation

    • Documented the concurrent-operation reliability probe and its accepted transient failure conditions.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@prekshivyas prekshivyas self-assigned this Sep 11, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e7789c3e-1210-447f-b9f7-e6c44b4fec95

📥 Commits

Reviewing files that changed from the base of the PR and between 74c628e and 37b642a.

📒 Files selected for processing (4)
  • test/e2e/README.md
  • test/e2e/live/mcp-bridge-reliability.ts
  • test/e2e/live/mcp-bridge.test.ts
  • test/e2e/support/mcp-bridge-reliability.test.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The concurrent-add retry flow now recognizes portable-host lock contention and Hermes restart transport failures after committed-bridge verification. E2E and support tests use the renamed helper and cover accepted, rejected, and unverified failure cases.

Changes

Concurrent add retry

Layer / File(s) Summary
Retry classification and helper flow
test/e2e/live/mcp-bridge-reliability.ts
The helper accepts recognized portable-host lock contention and Hermes restart transport failures after verifying the committed bridge.
Integration and reliability validation
test/e2e/live/mcp-bridge.test.ts, test/e2e/support/mcp-bridge-reliability.test.ts, test/e2e/README.md
Tests use the renamed helper and cover duplicate results, transient retries, unknown failures, unrelated lock failures, and pre-verification failures. The README documents the retry behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: senthilr-nv, cv

Sequence Diagram(s)

sequenceDiagram
  participant ConcurrentAddTest
  participant RetryHelper as retryAfterConcurrentAddTransientFailure
  participant BridgeVerification as committed bridge verification
  ConcurrentAddTest->>RetryHelper: submit concurrent add result
  RetryHelper->>BridgeVerification: verify committed bridge
  BridgeVerification-->>RetryHelper: committed bridge status
  RetryHelper-->>ConcurrentAddTest: retry recognized transient failure or return duplicate result
Loading

Merge Risk: ⚪ Minimal · up to 37b64

The concurrent-add test flow now handles the expected lock-contention failure without expanding retry behavior beyond the verified scenario.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: retrying the serialized portable lock loser in E2E tests.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-concurrent-portable-lock-retry

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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 37b642a in the fix/mcp-concurrent-p... branch remains at 96%, unchanged from commit 74c628e in the main branch.

@prekshivyas
prekshivyas marked this pull request as ready for review September 11, 2026 01:28
@prekshivyas
prekshivyas requested review from cjagwani and removed request for cjagwani September 11, 2026 01:35
@prekshivyas
prekshivyas marked this pull request as draft September 11, 2026 01:41
@prekshivyas
prekshivyas marked this pull request as ready for review September 11, 2026 01:44
@prekshivyas

prekshivyas commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

validation for 37b642a42365354765e280a5d589fd6d7592e31a is complete.

  • Images run 34550439884 passed end to end.
  • OpenClaw MCP discovery pass 1 and pass 2 both passed. These are the two jobs that failed with the exact portable-host lock-loser signature in merged-main run 34544156685 and OpenShell PR run 34545930022.
  • All-agent managed runtime activation passed, as did every image build, publication, contract, and direct-start prerequisite.
  • CodeRabbit reviewed the exact head with no actionable comments and minimal merge risk.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr passed locally, including the full CLI typecheck.

CI run 34550439932 remains red only for current-main failures outside this four-file diff:

The exact candidate behavior owned by this PR is green; no remaining failure is caused by the retry-classification change.

@prekshivyas
prekshivyas merged commit 1279b2f into main Sep 11, 2026
125 of 134 checks passed
@prekshivyas
prekshivyas deleted the fix/mcp-concurrent-portable-lock-retry branch September 11, 2026 02:03
ericksoa added a commit that referenced this pull request Sep 11, 2026
## Outcome

Station Express recognizes `GB300 DGX Station` as the same GB300
firmware family as `NVIDIA DGX Station GB300`. The existing PCI,
software, runtime, and identity-conflict requirements remain enforced.

## Reason

The post-#10914 retest exposed an order-dependent firmware pattern. The
updated base also exposed test-fixture assumptions that prevented CI
from validating this fix.

### Related issues

Fixes #11476
Refs #10914, #11133, #11490, and #11505

## Changes

- Extend the existing Bash and TypeScript patterns to accept either word
order, with optional `DGX` between `Station` and `GB300`.
- Execute the real installer/helper process boundary using temporary
firmware and PCI files. Extend the shared hardware corpus through
readiness admission and retain the rejection cases.
- Align two inherited provider tests with the HOME fence required by
#11490. They acquire the existing production fence before synchronous
stop operations; assertions and the production guard remain unchanged.
- Move Discord port readiness into its fixture helper and wait for a
complete canonical port record. A regression reproduces the former
empty-file-to-port-zero race.
- Wait for the legacy watcher fixture to announce readiness before
recording its PID, preserving the production ownership and exact-command
checks.

The production change remains one net added line in the two existing
Station classifiers. All other changes are regression tests or CI
fixtures. No supported platform, release profile, dependency, production
policy, workflow, or CI selector changed.

## Verification

Candidate: `52f04240b4d362b9aeb859f1ae4903554ff0f044`.

- Before the Station fix, eight regression cases failed across hardware
classification, installer routing, and readiness.
- Full installer prompt suite: 95 passed, one existing skip. Eight
real-helper positive/conflict/unsupported-profile cases passed again
after refreshing the base.
- Adversarial probes passed: 885 firmware variants, 16 cross-source
conflicts, 10 byte checks, 75 PCI combinations, 432 readiness
combinations, six direct-GPU policy checks, and no execution of shell
text in firmware values.
- Before the CI fixture repairs, six provider cases reproduced the
missing-HOME-fence error. The Discord port regression reproduced port
zero from an incomplete file.
- Six Station/CI fixture/lock/reliability suites: 216 tests passed with
the existing local `NEMOCLAW_TEST_TIMEOUT=15000` setting.
- Legacy watcher recovery suite: all five tests passed, including
rejection of a mismatched process identity.
- `npm run e2e:assertions:check` passed: 1,796 live assertions remain.
No assertion or CI gate was removed or waived.
- `NODE_OPTIONS=--max-old-space-size=8192 npm run build:cli` passed
before the final watcher-fixture edit;
`NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr` passed for
this commit against trusted main
`e05c08844bfb305c2d116f0cf0ea47ff0bae1587`. Secret scanning passed; the
diff contains no secrets, API keys, or credentials.

## Review notes

The maintainer-requested adversarial pass found no production defect.
The [nine-specialist
review](https://github.com/NVIDIA/NemoClaw/actions/runs/34543555082)
found one verification gap, addressed by the [real installer/helper
fixture](#11480 (comment)).
The other eight specialist reviews were clear. New CI and review results
apply to the current commit.

The inherited CI failure records are [CLI shard
2](https://github.com/NVIDIA/NemoClaw/actions/runs/34545632868/job/103097845847),
[CLI shard
5](https://github.com/NVIDIA/NemoClaw/actions/runs/34545632868/job/103097845811),
and [MCP
discovery](https://github.com/NVIDIA/NemoClaw/actions/runs/34545632959/job/103103473889).
The MCP artifacts showed a coherent bridge and a competing command
rejected at the outer HOME lock. Upstream #11505 now owns that case.
This PR uses its implementation and tests unchanged; the overlapping
PR-specific MCP matcher and tests were removed.

Physical Station retesting remains outstanding. [Aaron Erickson's
recorded direction](#11476)
authorizes admin merge after CI passes following disclosure of that
limitation. GitHub confirms `ericksoa` has admin permission.

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


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

- **Bug Fixes**
- Improved hardware detection to recognize NVIDIA DGX Station GB300
systems across supported product-name formats and separators.
- DGX Station capability qualification now works consistently for GB300
variants.

- **Tests**
- Expanded platform coverage for GB300 naming, separators, token
boundaries, and unusual characters.
- Improved reliability of runtime stop, Discord gateway, and service
readiness checks by waiting for valid startup signals and reporting
clearer failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants