test(openshell): cover IPv6 loopback gRPC endpoint - #6828
Conversation
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron is a non-blocking second opinion. Its prose, findings, and E2E guidance do not change the primary assessment above and remain in workflow artifacts only. E2E guidanceAdvisory only: coverage and selector recommendations are non-authoritative. E2E / PR Gate independently computes and dispatches trusted jobs without consuming this output. Recommended coverage: None 1 optional coverage item · 1 optional selector · 0 new-test recommendations
This is an automated, non-authoritative review. Findings are inputs to maintainer adjudication. Warnings and optional suggestions do not require a response or follow-up. A human maintainer makes the final merge decision. |
|
Closing as absorbed by the current base branch. The base advanced from |
## Summary Routes OpenClaw session-list reads through an authenticated direct gRPC client for the sandbox's named OpenShell gateway. The compatibility path retries through supported OpenShell CLI execution only when configuration or sandbox lookup fails before dispatch, so completed commands are never replayed. This is PR 4 of 26 in the OpenShell gRPC migration stack. ## Changes - Resolve a named gateway's endpoint and auth mode from OpenShell user or system metadata, while loading mTLS and OIDC credentials only from the user's gateway directory. - Construct authenticated direct-gRPC clients for plaintext loopback, mTLS, and OIDC gateways, and fail closed for edge-tunneled or unknown auth modes. - Route OpenClaw session listing through direct gRPC with a bounded deadline; retry through the CLI only for read-only configuration or sandbox-lookup failures that occur before command dispatch. - Distinguish pre-dispatch lookup failures from completed nonzero commands and post-dispatch stream failures so the fallback cannot replay a command with an unknown outcome. - Cover credential resolution and routing in `grpc-gateway-config.test.ts`, `grpc-sandbox-control.test.ts`, `sandbox-control-routing.test.ts`, and `passthrough.test.ts`; a direct unconditional switch is insufficient because named gateways can require different auth material and staged compatibility is safe only before dispatch. ## Stack - Stack index: #6790 - Depends on: #6828 - Follow-up docs: #6794 - Review this PR against base branch `feat/openshell-grpc-client/ae` to see only this slice. ## 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: the command-reference update is isolated in the immediate stacked docs-only follow-up #6794; this implementation slice updates its inline CLI help together with the behavior. - [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: transport-boundary review completed; only configuration and lookup failures before a read-only dispatch are eligible for CLI retry, while completed commands and post-dispatch failures are never replayed. - [ ] 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] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — the four focused gateway-config, gRPC-control, routing, and session-passthrough test files passed (60 tests); `npm run typecheck:cli` passed - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — targeted and changed-graph validation were used; required CI supplies the broad repository gates - [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) --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
Adds the positive regression coverage requested during review of the plaintext gRPC loopback hardening, proving that both IPv4 and IPv6 literal loopback endpoints remain accepted.
This is PR 3 of 26 in the OpenShell gRPC migration stack.
Changes
http://127.0.0.1:8080.http://[::1]:8080.Stack
chore/openshell-grpc-protocol/aeto see only this test slice.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpm run typecheck:clipassednpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — targeted and changed-graph validation were used; required CI supplies the broad repository gatesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Aaron Erickson aerickson@nvidia.com