perf(test): avoid cold gateway dependency load - #11316
Conversation
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe gateway runtime now accepts an optional network environment resolver. It uses the injected resolver with the lazily resolved gateway port and retains the dynamic module fallback. The test verifies the resolver call and resulting environment. ChangesGateway runtime environment resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The gateway runtime can now receive an injected network-environment resolver for testing while existing callers retain lazy production resolution. No current merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
|
CI status for latest PR commit 3d701c1: all completed non-CLI checks pass. CLI attempts 1 through 3 failed before dependency installation or tests because apt-get received a Google Chrome repository Hash Sum mismatch. Attempt 3 ran after a 10-minute cooldown and reproduced the same external failure. No code or workflow change was made to mask it; the PR is waiting for repository metadata to settle before another retry. |
|
CI follow-up on latest commit 3d701c1: after the hosted APT metadata settled, retry attempt 4 ran the full CLI suite. Eleven of twelve shards passed. Shard 6 failed only on the current-main plugin cache-seed digest regression, with the same expected/received hashes reproduced on unrelated PR #11319. The focused one-line fix is PR #11315, so I am not duplicating that unrelated generated-metadata change here. The previously failed managed-image MCP discovery retry passed. Once #11315 lands, I will merge current main and rerun the required checks. |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
|
PR Review Advisor finished for commit |
|
Automated-review disposition for latest commit
No automated finding requires a code change. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Outcome
Remove the cold source dependency load from the gateway-port laziness unit test while preserving the production lazy resolver. A cold run on baseline commit
f72e8ff359timed out after 15 seconds and took 24.69 seconds wall time; the focused change passed five cold runs with a 2.04-second median and passed a cold coverage run in 2.56 seconds.Reason
#6237 tracks source-loader contention and hook timeouts in CLI coverage shards. This test needs to verify that the latest gateway port reaches the network environment resolver, but it does not need the resolver's production dependency graph.
Related issues
Part of #6237.
Changes
GatewayHostRuntimeDepsto provide the existing gateway network environment resolver.requireas the default for callers that do not provide the resolver; a direct import would break the environment-reload contract documented at the call site.Verification
f72e8ff359:npx vitest run --project cli src/lib/onboard/gateway-host-runtime.test.ts --coverage=false— reproduced the 15-second test timeout; 24.69 seconds wall time.main— 38/38 passed; 839 ms Vitest duration.npx vitest run --project integration test/agents/openclaw/openclaw-integrity-pin-contract.test.ts --coverage=false— 8/8 passed against the current cache-seed manifest.npx vitest run --project cli src/lib/onboard/gateway-host-runtime-https.test.ts --coverage=false— 3/3 passed.npx vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts— 45/45 passed.npm --prefix nemoclaw run build— passed.npm run typecheck:cli— passed.npm run check:diff— passed, including the secret scan and diff-scoped pre-commit, commit-message, and pre-push checks.CI / Pull Request— all 12 CLI shards, merged coverage, static checks, compilation, plugin tests, installer integration, and final aggregate gate passed on the latest PR commit.5e31b610f3867cbc2fc9f1aac181a05eb7011f06appears as Verified in GitHub.Review notes
This recreates only the two-file runtime-loader seam authored by @prekshivyas in #11098. It does not restore that PR's workflow, shard-count, timing-table, cache, or test-splitting changes. Production callers continue to use the existing lazy resolver.
Signed-off-by: Charan Jagwani cjagwani@nvidia.com
Summary by CodeRabbit
Refactor
Tests