test(openclaw): protect post-idle TUI interactions - #7523
Conversation
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe TUI Expect script adds paired matching for chat and status output followed by connected-idle states. Support tests validate the generated helper, control flow, exit codes, signal ordering, and redraw timeout behavior. ChangesTUI Expect Flow
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 01d38fd in the TypeScript / code-coverage/cliThe overall coverage in commit 01d38fd in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/live/issue-6194-tui-expect.ts`:
- Around line 58-82: Update expect_pair_or_exit in
test/e2e/live/issue-6194-tui-expect.ts:58-82 to enforce one overall deadline
across both signal orders, while preserving the distinct timeout and EOF exits
for whichever pattern remains unseen. In
test/e2e/support/issue-6194-tui-post-idle-contract.test.ts:66-79, replace exact
source-shape assertions with behavioral checks covering both arrival orders and
both timeout/EOF exit paths.
In `@test/e2e/support/issue-6194-tui-post-idle-contract.test.ts`:
- Around line 66-79: Replace the source-text assertions in the TUI contract test
with behavioral coverage of the expect script: verify both reply-then-idle and
idle-then-reply arrival orders, and verify distinct exit behavior when either
signal is missing, including timeout and EOF paths. Keep assertions focused on
observable outcomes rather than the internal while-loop or variable
implementation.
🪄 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: 9f84b6c9-7c26-4935-bbed-a8cc54e40f56
📒 Files selected for processing (2)
test/e2e/live/issue-6194-tui-expect.tstest/e2e/support/issue-6194-tui-post-idle-contract.test.ts
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/support/issue-6194-tui-post-idle-contract.test.ts`:
- Around line 101-116: Add killSignal: "SIGKILL" to both spawnSync calls in the
paired Expect test, including the version probe and the expect -c execution.
Give the version probe a positive timeout, while preserving the existing timeout
on the expect script and ensuring both calls use the hard-kill behavior.
🪄 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: 268278ca-1458-4fee-833a-5899880e2d64
📒 Files selected for processing (2)
test/e2e/live/issue-6194-tui-expect.tstest/e2e/support/issue-6194-tui-post-idle-contract.test.ts
|
Superseded by #7526. The replacement is based on current main and contains the same reviewed change as one GitHub-verified commit. |
Summary
The OpenClaw TUI can render its idle status before it paints the correlated reply or slash-command output. The #6194 live regression guard now accepts either order while requiring both signals inside one bounded wait.
Related Issue
Refs #6194
Changes
/nemoclaw status.exp_continue -continue_timer.The
expect_pair_or_exitprocedure serves the accepted #6194 chat and status journey because terminal redraws do not guarantee text order. Sequential waits discard a signal that renders before the preceding match. A direct ordered wait cannot distinguish a working interaction from a missing signal.This PR does not change OpenClaw product code or close #6194. It protects the accepted user-facing journey through the existing live E2E boundary.
Type of Change
Quality Gates
Documentation Writer Review
no-docs-neededDGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailable/opt/homebrew/bin/node node_modules/vitest/vitest.mjs run --project e2e-support test/e2e/support/issue-6194-tui-post-idle-contract.test.tspassed 18 tests with real Expect.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Senthil Ravichandran senthilr@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests