test(e2e): hotfix nightly stabilizers - #5802
Conversation
|
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:
📝 WalkthroughWalkthroughThe PR updates sandbox gateway execution, stdout/stderr capture and redaction, shared E2E token matching, Telegram channel cleanup, and Kimi compatibility validation for mock versus live runs. ChangesSandbox and E2E validation updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 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 |
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 |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
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 Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
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: 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 `@src/lib/actions/sandbox/sessions/gateway-rpc.ts`:
- Around line 24-25: The retry matcher in gateway-rpc.ts is too broad because
RETRYABLE_PAIRING_FAILURE currently matches every GatewayClientRequestError, not
just pairing-pending cases. Narrow the regex to only the actual pairing-specific
messages handled by the auto-pair flow, and remove the generic
GatewayClientRequestError fallback. Update the retry check used by the gateway
RPC/session logic so only pairing-related failures trigger the second pass, and
keep the behavior aligned with the surrounding pairing retry handling in the
same module.
In `@test/e2e/test-kimi-inference-compat.sh`:
- Around line 707-708: The verifier logic in the toolMeta checks can crash when
`meta` contains `None` or other non-string values because `sorted(...)` is
called directly on `meta_commands`. Update the checks around `toolMetas[*].meta`
to validate/filter values before sorting (or sort with a safe key) so the code
reports a structured error instead of raising `TypeError`. Apply the same fix in
both places that compare the command set, using the existing `meta_commands`
validation path.
🪄 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: c0e166ec-d0a9-41b4-be88-23c09f9f473d
📒 Files selected for processing (7)
src/lib/actions/sandbox/sessions/gateway-rpc-call.test.tssrc/lib/actions/sandbox/sessions/gateway-rpc.tssrc/lib/adapters/openshell/runtime.tstest/e2e/lib/openclaw-json.shtest/e2e/test-channels-add-remove.shtest/e2e/test-common-egress-agent-e2e.shtest/e2e/test-kimi-inference-compat.sh
Selective E2E Results — ❌ Some jobs failedRun: 28180735807
|
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/test-openclaw-inference-switch.sh`:
- Line 331: The assertion in the shell test lost the previous case-insensitive
behavior because `openclaw_agent_text_has_token` only does a case-sensitive
match. Update the check in the `if [ "$rc" -eq 0 ] && ...` block to preserve
case tolerance for the `PONG` token, either by normalizing `reply` before
calling `openclaw_agent_text_has_token` or by otherwise making the comparison
case-insensitive in this test path.
🪄 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: c2afc2b6-7180-4745-b18b-96eb7dca6af2
📒 Files selected for processing (1)
test/e2e/test-openclaw-inference-switch.sh
Selective E2E Results — ✅ All requested jobs passedRun: 28181664999
|
…2e-nightly-stabilizers
Vitest E2E Scenario Results — ❌ Some jobs failedRun: 28188745957
|
Selective E2E Results —
|
| Job | Result |
|---|---|
| credential-sanitization-e2e | |
| issue-4462-scope-upgrade-approval-e2e | |
| sessions-agents-cli-e2e |
## Summary Restore issue #5849 parity package `Package B` for PR #5802 hotfix stabilizer bash-suite deltas. ## Related Issues Refs #5849 Refs #5802 ## Scope gate - Package: `Package B` / `test(e2e): audit hotfix stabilizer parity` - Included PRs all merged and touched `test/e2e`: yes — #5802 is merged and touched `test/e2e/lib/openclaw-json.sh`, `test/e2e/test-channels-add-remove.sh`, `test/e2e/test-common-egress-agent-e2e.sh`, `test/e2e/test-kimi-inference-compat.sh`, and `test/e2e/test-openclaw-inference-switch.sh` - Out of scope: unmerged/non-bash PRs; shell lane retirement / PR #5756 cleanup; Package C Hermes v2026.6.19 audit rows ## Parity map | ID | Source PR | Contract | Inference classification | Vitest assertion / waiver | Status | | --- | --- | --- | --- | --- | --- | | B1 | #5802 | Kimi mock trajectories stay strict for split `hostname`/`date`/`uptime`, while public NVIDIA mode may choose fewer safe exec calls but must not record a combined shell command | `public-nvidia required` with `mock` fallback | `test/e2e-scenario/live/kimi-inference-compat-helpers.ts`; `test/e2e-scenario/support-tests/kimi-inference-compat-helpers.test.ts` | covered | | B2 | #5802 | OpenClaw inference-switch agent reply accepts deterministic `PONG` even when wrapped by model/stream whitespace | `hosted-compatible capable` | `test/e2e-scenario/live/openclaw-inference-switch.test.ts` | covered | | B3 | #5802 | Channels add/remove post-remove rebuild must not use stale host Telegram env inputs to stage a fresh channel add | `hosted-compatible capable` | `test/e2e-scenario/live/channels-add-remove.test.ts` now rebuilds after remove with base env only | covered | | B4 | #5802 | Common-egress OpenClaw/Hermes reference-agent token checks tolerate wrapped `REFERENCE_AGENT_OK` / `HERMES_REFERENCE_AGENT_OK` tokens | `hosted-compatible capable` | Existing `test/e2e-scenario/live/common-egress-agent.test.ts` parser/token tests | already covered | | B5 | #5802 | Sessions admin RPC uses local/backend OpenClaw gateway path, avoids multiline OpenShell args, preserves stdout/stderr diagnostics, redacts token-shaped failures | `none` | Existing `src/lib/actions/sandbox/sessions/gateway-rpc-call.test.ts`, `src/lib/adapters/openshell/client.test.ts`, and `src/lib/security/redact` coverage | already covered | | B6 | #5802 | `openclaw-json` helper accepts wrapped deterministic reply tokens | `none` | Existing `test/openclaw-agent-json.test.ts` and `test/helpers/e2e-answer-assertions.test.ts`; live migrated tests use equivalent token compaction | already covered | ## Inference mode support - Default mode for touched live targets: `mock/hermetic` for Kimi fallback; hosted-compatible/public routes remain opt-in/live-runner validated - Real inference support preserved: yes — Kimi public NVIDIA mode remains explicit; OpenClaw inference switch/common-egress/channels live scenarios still use hosted-compatible/public credentials as before - Modes validated in this PR: focused local support/unit coverage and non-destructive live-project filtered assertions; full live E2E requires selective workflow/runner secrets - If not validated with real inference: full live scenarios install/onboard real sandboxes and require CI runner secrets; this PR preserves those paths but does not execute them locally ## Validation - [x] `git diff --check` - [x] `npm run typecheck:cli` - [x] `npx vitest run --project e2e-vitest-support test/e2e-scenario/support-tests/kimi-inference-compat-helpers.test.ts` - [x] `npx vitest run src/lib/actions/sandbox/sessions/gateway-rpc-call.test.ts src/lib/adapters/openshell/client.test.ts test/openclaw-agent-json.test.ts test/helpers/e2e-answer-assertions.test.ts` - [x] `NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/common-egress-agent.test.ts test/e2e-scenario/live/openclaw-inference-switch.test.ts --testNamePattern 'common-egress agent|reply matching'` - [ ] selective live E2E workflow for Package B targets, if requested/available Notes: - `git commit` hooks ran repository-wide CLI tests and failed on unrelated local setup/timeouts (`nemoclaw/dist` missing, `nemoclaw/node_modules/json5` missing, several 5s local timeouts). Commit/push used `--no-verify` after targeted Package B validations passed. - First normal push pre-push hook was killed by signal 9; branch was pushed with `--no-verify`. ## Follow-ups / waivers - None for Package B rows. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved post-channel removal rebuild behavior to prevent reuse of Telegram-related environment inputs. * Enhanced OpenClaw “PONG” verification to reliably detect whitespace-split tokens while rejecting partial or surrounding-text variants. * Strengthened Kimi inference/trajectory validation with stricter handling of tool/meta and source-command sequencing, including detection of unsafe leftovers. * **Tests** * Updated Kimi live end-to-end checks to validate results using the selected inference mode. * Expanded compatibility-mode tests with structured trajectory summary assertions and new negative cases for malformed or unsafe source commands. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary Ports the focused E2E stabilizers from `dep/openshell-v0.0.67` / PR NVIDIA#5596 onto current `main` after PR NVIDIA#5760, without merging the full OpenShell 0.0.67 branch. This targets the full-main nightly failures from run 28172043426: - `kimi-inference-compat-e2e` — relax live Kimi trajectory shape expectations. - `common-egress-agent-e2e` — tolerate wrapped reply tokens like `REFER\nENCE_AGENT_OK`. - `sessions-agents-cli-e2e` — keep sessions admin RPCs local/SDK-backed and avoid multiline RPC args. Also includes the small channel/remove rebuild staging stabilizer carried by the shared matrix-stabilization commit. ## Validation - Local push hooks could not fully run because this worktree is missing local npm dependencies (`tsx`, `typescript`, Biome dependency `klaw`). - Shellcheck/gitleaks/basic pre-commit checks passed before the dependency-gated hooks failed. - Focused nightly E2E dispatch is being run separately on this branch. ## Notes - Does not port the full OpenShell 0.0.67 upgrade. - Does not claim to fix `diagnostics-e2e` HTTP 403; that failure looked infra/upstream/credential-like. Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved sandbox gateway RPC execution with pairing-aware retry, clear retry/no-retry gating, and stricter handling of unsupported admin methods. * Added safer parsing and richer failure diagnostics with token redaction in returned output and logged errors. * **New Features** * Enhanced gateway RPC results to include separate diagnostic output and tightened admin method support via allowlisting. * **Tests** * Expanded Vitest coverage for gateway orchestration/output handling and stream capture behavior. * Strengthened OpenClaw text assertions, updated e2e token/PONG checks, and relaxed Kimi validations for mock vs live. * Prevented Telegram env reuse after channel removal. * **Chores** * Added optional stdout/stderr stream capture controls for OpenShell helpers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Aaron Erickson <aerickson@nvidia.com>
## Summary Restore issue NVIDIA#5849 parity package `Package B` for PR NVIDIA#5802 hotfix stabilizer bash-suite deltas. ## Related Issues Refs NVIDIA#5849 Refs NVIDIA#5802 ## Scope gate - Package: `Package B` / `test(e2e): audit hotfix stabilizer parity` - Included PRs all merged and touched `test/e2e`: yes — NVIDIA#5802 is merged and touched `test/e2e/lib/openclaw-json.sh`, `test/e2e/test-channels-add-remove.sh`, `test/e2e/test-common-egress-agent-e2e.sh`, `test/e2e/test-kimi-inference-compat.sh`, and `test/e2e/test-openclaw-inference-switch.sh` - Out of scope: unmerged/non-bash PRs; shell lane retirement / PR NVIDIA#5756 cleanup; Package C Hermes v2026.6.19 audit rows ## Parity map | ID | Source PR | Contract | Inference classification | Vitest assertion / waiver | Status | | --- | --- | --- | --- | --- | --- | | B1 | NVIDIA#5802 | Kimi mock trajectories stay strict for split `hostname`/`date`/`uptime`, while public NVIDIA mode may choose fewer safe exec calls but must not record a combined shell command | `public-nvidia required` with `mock` fallback | `test/e2e-scenario/live/kimi-inference-compat-helpers.ts`; `test/e2e-scenario/support-tests/kimi-inference-compat-helpers.test.ts` | covered | | B2 | NVIDIA#5802 | OpenClaw inference-switch agent reply accepts deterministic `PONG` even when wrapped by model/stream whitespace | `hosted-compatible capable` | `test/e2e-scenario/live/openclaw-inference-switch.test.ts` | covered | | B3 | NVIDIA#5802 | Channels add/remove post-remove rebuild must not use stale host Telegram env inputs to stage a fresh channel add | `hosted-compatible capable` | `test/e2e-scenario/live/channels-add-remove.test.ts` now rebuilds after remove with base env only | covered | | B4 | NVIDIA#5802 | Common-egress OpenClaw/Hermes reference-agent token checks tolerate wrapped `REFERENCE_AGENT_OK` / `HERMES_REFERENCE_AGENT_OK` tokens | `hosted-compatible capable` | Existing `test/e2e-scenario/live/common-egress-agent.test.ts` parser/token tests | already covered | | B5 | NVIDIA#5802 | Sessions admin RPC uses local/backend OpenClaw gateway path, avoids multiline OpenShell args, preserves stdout/stderr diagnostics, redacts token-shaped failures | `none` | Existing `src/lib/actions/sandbox/sessions/gateway-rpc-call.test.ts`, `src/lib/adapters/openshell/client.test.ts`, and `src/lib/security/redact` coverage | already covered | | B6 | NVIDIA#5802 | `openclaw-json` helper accepts wrapped deterministic reply tokens | `none` | Existing `test/openclaw-agent-json.test.ts` and `test/helpers/e2e-answer-assertions.test.ts`; live migrated tests use equivalent token compaction | already covered | ## Inference mode support - Default mode for touched live targets: `mock/hermetic` for Kimi fallback; hosted-compatible/public routes remain opt-in/live-runner validated - Real inference support preserved: yes — Kimi public NVIDIA mode remains explicit; OpenClaw inference switch/common-egress/channels live scenarios still use hosted-compatible/public credentials as before - Modes validated in this PR: focused local support/unit coverage and non-destructive live-project filtered assertions; full live E2E requires selective workflow/runner secrets - If not validated with real inference: full live scenarios install/onboard real sandboxes and require CI runner secrets; this PR preserves those paths but does not execute them locally ## Validation - [x] `git diff --check` - [x] `npm run typecheck:cli` - [x] `npx vitest run --project e2e-vitest-support test/e2e-scenario/support-tests/kimi-inference-compat-helpers.test.ts` - [x] `npx vitest run src/lib/actions/sandbox/sessions/gateway-rpc-call.test.ts src/lib/adapters/openshell/client.test.ts test/openclaw-agent-json.test.ts test/helpers/e2e-answer-assertions.test.ts` - [x] `NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/common-egress-agent.test.ts test/e2e-scenario/live/openclaw-inference-switch.test.ts --testNamePattern 'common-egress agent|reply matching'` - [ ] selective live E2E workflow for Package B targets, if requested/available Notes: - `git commit` hooks ran repository-wide CLI tests and failed on unrelated local setup/timeouts (`nemoclaw/dist` missing, `nemoclaw/node_modules/json5` missing, several 5s local timeouts). Commit/push used `--no-verify` after targeted Package B validations passed. - First normal push pre-push hook was killed by signal 9; branch was pushed with `--no-verify`. ## Follow-ups / waivers - None for Package B rows. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved post-channel removal rebuild behavior to prevent reuse of Telegram-related environment inputs. * Enhanced OpenClaw “PONG” verification to reliably detect whitespace-split tokens while rejecting partial or surrounding-text variants. * Strengthened Kimi inference/trajectory validation with stricter handling of tool/meta and source-command sequencing, including detection of unsafe leftovers. * **Tests** * Updated Kimi live end-to-end checks to validate results using the selected inference mode. * Expanded compatibility-mode tests with structured trajectory summary assertions and new negative cases for malformed or unsafe source commands. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Ports the focused E2E stabilizers from
dep/openshell-v0.0.67/ PR #5596 onto currentmainafter PR #5760, without merging the full OpenShell 0.0.67 branch.This targets the full-main nightly failures from run 28172043426:
kimi-inference-compat-e2e— relax live Kimi trajectory shape expectations.common-egress-agent-e2e— tolerate wrapped reply tokens likeREFER\nENCE_AGENT_OK.sessions-agents-cli-e2e— keep sessions admin RPCs local/SDK-backed and avoid multiline RPC args.Also includes the small channel/remove rebuild staging stabilizer carried by the shared matrix-stabilization commit.
Validation
tsx,typescript, Biome dependencyklaw).Notes
diagnostics-e2eHTTP 403; that failure looked infra/upstream/credential-like.Signed-off-by: Julie Yaunches jyaunches@nvidia.com
Summary by CodeRabbit