fix(e2e): skip Deep Agents first-run TUI - #5914
Conversation
Signed-off-by: Carlos Villela <cvillela@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:
📝 WalkthroughWalkthroughAdds first-run onboarding modal handling to the Deep Agents Code TUI startup check script. A new onboarding regex is wired into the embedded expect flow, and tests now cover onboarding detection, readiness ordering, and sanitized marker output. ChangesTUI Onboarding Detection and Skip Flow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
Review findings by urgency: 0 required fixes, 4 items to resolve/justify, 1 in-scope improvement
|
E2E Advisor RecommendationRequired E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/langchain-deepagents-code-image.test.ts (1)
474-479: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftAvoid locking the image contract to exact source text.
These assertions pin private implementation details: Tcl variable names, exact marker calls, and control-sequence formatting. Prefer an observable Vitest-driven check that proves onboarding is skipped, readiness is reached, and idle quit exits.
As per path instructions, "
**/*.test.{ts,js,mts,mjs,cts,cjs}: Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions."🤖 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 `@test/langchain-deepagents-code-image.test.ts` around lines 474 - 479, The test in tuiStartupCheck is over-asserting private Tcl source text instead of observable behavior. Replace the exact string expectations around onboarding markers, escape sequences, and control flow with a Vitest-level assertion that verifies the public outcomes: onboarding is skipped, readiness is detected, and the idle-quit path terminates correctly. Use the existing tuiStartupCheck-related test setup to assert behavior through emitted results or state rather than implementation details.Source: Path instructions
🤖 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/deepagents-code-tui-startup-check.test.ts`:
- Around line 103-117: The startup readiness test is only asserting the first
onboarding prompt as not-ready, while the second onboarding phrase added in the
same `isOnboarding`/`runTuiStartupCheckHelper` coverage is not guarded. Update
the readiness assertions in `test/deepagents-code-tui-startup-check.test.ts` so
both onboarding variants, including “What should Deep Agents call you?”, are
verified as not-ready before the existing ready-state checks.
---
Nitpick comments:
In `@test/langchain-deepagents-code-image.test.ts`:
- Around line 474-479: The test in tuiStartupCheck is over-asserting private Tcl
source text instead of observable behavior. Replace the exact string
expectations around onboarding markers, escape sequences, and control flow with
a Vitest-level assertion that verifies the public outcomes: onboarding is
skipped, readiness is detected, and the idle-quit path terminates correctly. Use
the existing tuiStartupCheck-related test setup to assert behavior through
emitted results or state rather than implementation details.
🪄 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: 56162cf2-70f7-4e9d-be19-f88e72408b83
📒 Files selected for processing (3)
test/deepagents-code-tui-startup-check.test.tstest/e2e/e2e-cloud-experimental/checks/10-deepagents-code-tui-startup.shtest/langchain-deepagents-code-image.test.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed
Nemotron Ultra’s prior warning was an advisor JSON-parse failure rather than a code finding. The completed GPT-5.5 review, the manual source review above, and the new behavioral tests cover that gap; the refreshed advisors are running on the new head. |
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/deepagents-code-tui-startup-check.test.ts`:
- Around line 224-226: The startup-check test is only comparing marker order in
markerText and can pass even when the onboarding marker is absent because
indexOf returns -1. Update deepagents-code-tui-startup-check.test.ts to first
assert that NEMOCLAW_TUI_ONBOARDING_SKIPPED is actually present in the observed
output before checking it appears before NEMOCLAW_TUI_READY, keeping the
assertion at the public output boundary in this test case.
🪄 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: 93f01a96-370a-47fa-9437-8b28735b3e1a
📒 Files selected for processing (1)
test/deepagents-code-tui-startup-check.test.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed the two remaining CodeRabbit test-strengthening findings in 47d28c1: both pinned onboarding phrases are now explicitly rejected as readiness, and the success-path state-machine test asserts both lifecycle markers exist before comparing their order. Focused TUI/image tests pass (68/68), CLI typecheck passes, and the full commit/push hooks pass. Signed-off-by: Carlos Villela cvillela@nvidia.com |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed the final Nemotron review on current head f257f21:
Verification: shfmt, ShellCheck, bash syntax, focused TUI/image tests (68/68), CLI typecheck, conditional scan, full commit hooks, and pre-push hooks all pass. Signed-off-by: Carlos Villela cvillela@nvidia.com |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed the final GPT advisor warning in c1ea543. Only the second Ctrl-C send is now wrapped in Tcl |
|
Current-head Nemotron warnings are resolved/justified as follows:
No new code is warranted for these warnings. GPT review, CodeRabbit, required CI, focused tests, and manual review are clean on c1ea543. Signed-off-by: Carlos Villela cvillela@nvidia.com |
<!-- markdownlint-disable MD041 --> ## Summary Stabilizes the Deep Agents Code TUI release gate when a fresh sandbox opens upstream's first-run onboarding modal. The Expect harness takes the modal's documented Escape skip path once, then still requires the real coding prompt and the documented double-Ctrl-C idle exit. ## Changes - Match only the pinned upstream first-run name screen and record a dedicated onboarding-skip marker. - Send Escape once for that modal, then wait for the existing prompt-shaped readiness signature. - Send Ctrl-C twice after readiness to follow dcode's idle quit contract. - Extend behavioral and image-contract tests without broadening the ready-pattern assertion. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: release-gate harness behavior only; no user-facing NemoClaw behavior changed. - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: self-review confirms the harness matches only the pinned upstream onboarding copy, uses the modal's documented skip binding, preserves the strict coding-prompt assertion, and retains sanitized secret-screened capture handling. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Targeted verification: ```bash bash -n test/e2e/e2e-cloud-experimental/checks/10-deepagents-code-tui-startup.sh npm test -- --run test/deepagents-code-tui-startup-check.test.ts test/langchain-deepagents-code-image.test.ts npm run typecheck:cli ``` Live failure evidence identifying the first-run modal: https://github.com/NVIDIA/NemoClaw/actions/runs/28303850957 --- Signed-off-by: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated Deep Agents Code TUI startup readiness detection to properly handle the first-run onboarding modal. * Refined “Your name (optional)” handling so it’s not considered ready, while later prompt-like states still are. * Improved the post-readiness exit flow by sending additional interrupts when needed. * **Tests** * Strengthened the TUI startup automation to fail fast if the embedded expect logic is missing. * Added onboarding pattern validation, onboarding-skip markers, and tighter assertions against sanitized startup logs and captured artifacts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Stabilizes the Deep Agents Code TUI release gate when a fresh sandbox opens upstream's first-run onboarding modal. The Expect harness takes the modal's documented Escape skip path once, then still requires the real coding prompt and the documented double-Ctrl-C idle exit.
Changes
Type of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Targeted verification:
bash -n test/e2e/e2e-cloud-experimental/checks/10-deepagents-code-tui-startup.sh npm test -- --run test/deepagents-code-tui-startup-check.test.ts test/langchain-deepagents-code-image.test.ts npm run typecheck:cliLive failure evidence identifying the first-run modal:
https://github.com/NVIDIA/NemoClaw/actions/runs/28303850957
Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit