test(e2e): migrate test-issue-4434-tui-unreachable-inference.sh to vitest#5233
Conversation
|
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)
📝 WalkthroughWalkthroughAdds an opt-in live Vitest E2E scenario reproducing issue ChangesIssue
Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant WorkflowJob as issue-4434-tui-unreachable-inference-vitest
participant Runner
participant OpenShell
participant Sandbox
participant ExpectRunner
GitHubActions->>WorkflowJob: select via inputs.jobs / free_standing_scenarios
WorkflowJob->>Runner: checkout, setup, optional docker login (retries/anonymous)
Runner->>OpenShell: install openshell, verify openshell --version
Runner->>Sandbox: provision sandbox, run openshell sandbox exec --tty
Sandbox->>ExpectRunner: run expect script (openclaw tui) and capture logs
ExpectRunner->>Runner: upload artifacts (expect.log, scenario.json, captures)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Temporarily closing to make room for the maintainer PR-limit exemption fix; will reopen after that lands. |
d4740b0 to
21c5e2c
Compare
Vitest E2E Scenario Results — ❌ Some jobs failedRun: 27357868104
|
…e-4434-tui-unreachable-inference # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/e2e-vitest-scenarios.yaml (1)
398-407: ⚡ Quick winMove or drop the duplicated recovery-scenario header.
This banner describes
gateway-guard-recovery, but it now sits aboveopenclaw-tui-chat-correlation-vitestand then repeats again at Line 482 where it actually applies. Keeping it here makes the section boundaries misleading.♻️ Proposed cleanup
- # ── Free-standing recovery scenarios (`#2701`) ───────────────────────── - # Recovery / disruption scenarios don't fit the steady-state expected-state - # registry that drives `live-scenarios` above. They run as free-standing - # Vitest test files using the same `e2e-scenarios-live` project, framework - # fixtures, and live-project gate — just outside the matrix. - # - # First failing-test-first guard for `#2701` (gateway recovery does not - # restore the /tmp guard chain after pod recreate). Will fail on `main` - # until the `#2701` fix lands; flips green afterwards. - # Focused coverage slice for the `#2603/`#3145 OpenClaw websocket # protocol/history contract. The retained legacy bash lane remains the # source for full closeout until a later PR proves replacement and deletes it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/e2e-vitest-scenarios.yaml around lines 398 - 407, Remove the duplicated "Free-standing recovery scenarios" / gateway recovery banner that is currently sitting above the openclaw-tui-chat-correlation-vitest entry and either move it so it immediately precedes the actual gateway-guard-recovery scenario block (the banner that currently appears again later) or drop the earlier copy entirely; locate the duplicate by searching for the banner text and the scenario names "openclaw-tui-chat-correlation-vitest" and "gateway-guard-recovery" and ensure only the single correct header remains immediately before the gateway-guard-recovery scenario.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts`:
- Around line 30-33: TUI_TIMEOUT_SEC may be NaN or non-positive; validate and
clamp it right after parsing by converting to an integer, falling back to the
default (180) if parseInt returns NaN or value <= 0, and optionally enforce an
upper bound (e.g., max 3600); update uses of TUI_TIMEOUT_SEC (e.g., where
timeoutMs or the expect that checks env timeout) to rely on this sanitized value
so timeoutMs = TUI_TIMEOUT_SEC * 1000 is always a valid positive number.
---
Nitpick comments:
In @.github/workflows/e2e-vitest-scenarios.yaml:
- Around line 398-407: Remove the duplicated "Free-standing recovery scenarios"
/ gateway recovery banner that is currently sitting above the
openclaw-tui-chat-correlation-vitest entry and either move it so it immediately
precedes the actual gateway-guard-recovery scenario block (the banner that
currently appears again later) or drop the earlier copy entirely; locate the
duplicate by searching for the banner text and the scenario names
"openclaw-tui-chat-correlation-vitest" and "gateway-guard-recovery" and ensure
only the single correct header remains immediately before the
gateway-guard-recovery scenario.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: bf4d18a6-44a1-4c81-93e6-767ba23cc0be
📒 Files selected for processing (2)
.github/workflows/e2e-vitest-scenarios.yamltest/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts
Selective E2E Results — ❌ Some jobs failedRun: 27377278793
|
…e-4434-tui-unreachable-inference # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
Vitest E2E Scenario Results — ✅ All jobs passedRun: 27381862992
|
…e-4434-tui-unreachable-inference # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
Summary
Migrate
test/e2e/test-issue-4434-tui-unreachable-inference.shwith focused equivalent Vitest live coverage.Related Issues
Refs #5098
Refs #4434
Contract mapping
openclaw tuimust show a visible inference error and stop the activeconnectedspinner.test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.tssudo iptablesDOCKER-USER DROP rules,openshell sandbox exec --tty,openclaw tui, terminal capture parsing.curlprobes in the Vitest test.https://integrate.api.nvidia.com/v1/models.Simplicity check
nightly-e2e.yamlissue-4434-tui-unreachable-inference-e2eonubuntu-latestwith Docker/OpenShell,expect,iptables, passwordless sudo, andNVIDIA_API_KEY.github/workflows/e2e-vitest-scenarios.yamlissue-4434-tui-unreachable-inference-vitestonubuntu-latestgh workflow run e2e-vitest-scenarios.yaml --repo NVIDIA/NemoClaw --ref e2e-migrate/test-issue-4434-tui-unreachable-inference -f jobs=issue-4434-tui-unreachable-inference-vitest -f pr_number=5233Verification
npm run build:clinpx biome check test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.tsnpx tsc --noEmit --pretty false --allowImportingTsExtensions --moduleResolution bundler --module ESNext --target ES2022 --types vitest,node test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.tsNEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts --silent=false --reporter=default(local gated import/skip)npm run typecheck:cli -- --pretty falsegit diff --checkLive proof note
Full live execution requires Linux Docker,
iptables, passwordlesssudo,expect, andNVIDIA_API_KEY; this macOS host lacks Docker/iptables/passwordless sudo, so CI or a suitable Linux runner must run the privileged proof.Summary by CodeRabbit
Tests
Chores
Latest selective run
issue-4434-tui-unreachable-inference-vitest)