Repository navigation
fix(cli): redact list inventory rows like status rows - #11821
Conversation
Signed-off-by: Julie Yaunches <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughInventory and status projections now sanitize shared sandbox fields, URL credentials, inference values, and onboarding names. Non-JSON ChangesInventory listing and output consistency
Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant ListCommand
participant listSandboxesCommand
participant LiveInference
participant InventoryRenderer
ListCommand->>listSandboxesCommand: delegate non-JSON listing
listSandboxesCommand->>LiveInference: resolve live inference
LiveInference-->>listSandboxesCommand: return live model and provider
listSandboxesCommand->>InventoryRenderer: render sanitized values and route drift
InventoryRenderer-->>ListCommand: return list output
Merge Risk: ⚪ Minimal · up to No merge-blocking issue was identified in the inventory redaction change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit f169d09 in the TypeScript / code-coverage/cliThe overall line coverage in commit f169d09 in the Show a line coverage summary of the most impacted files.
Updated |
Signed-off-by: Julie Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
Signed-off-by: Julie Yaunches <[email protected]>
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
<!-- markdownlint-disable MD041 --> ## Outcome OpenShell inference route reads now flow through one typed observer for the accepted first slice of #9809. Existing gateway targeting, native lifecycle behavior, list/status redaction, and external command behavior remain unchanged. ## Reason Inference consumers independently constructed `openshell inference get` commands and interpreted raw CLI results. Centralizing the read boundary gives each consumer the same scoped, typed, and redacted observation without changing mutation or recovery behavior. ### Related issues Refs #9809 ## Changes - Add typed configured and unconfigured observations plus distinct validation, authentication, timeout, schema, transport, and command failures. - Keep named-gateway scoping, bounded capture, control-sequence cleanup, endpoint-override refusal, and the base gateway's legacy output compatibility inside the OpenShell adapter. - Migrate the accepted CLI, onboarding, connect, readiness, doctor, inventory, status, and config-export readers to typed results. - Remove the superseded production reader and protect the boundary with adapter and consumer tests. Route mutation and rollback (#11738), plugin transport (#9813), generated gRPC transport (#9828), credentials, provider or gateway lifecycle changes, new routing semantics, status lifecycle suppression, and live E2E remain excluded. ## Verification - `NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli` — passed. - `npm run checks:repository` — all 19 repository checks passed with no architecture cycles. - Focused CLI unit selection — 16 files and 377 tests passed, covering the adapter and migrated source consumers. - Focused integration selection — 8 files and 157 tests passed; the status JSON integration suite passed 21/21. - `npm run test:changed` — 3,182 tests passed. The route-observation acceptance set is complete with no candidate-owned failure. Two process-heavy suites were classified environmental after focused replay; `snapshot-auto-create-failure` passed 4/4 unchanged and `runtime-provider-contract` passed 75/75 with a 15-second local diagnostic timeout. - The remaining launch group was classified inherited: 18 cases fail with the same sandbox-replacement journaling error on this candidate and on exact base `3c6591ddba4a321ab8e6b766203e44d6e3b8002e`; this PR changes none of the three owning launch/probe files. - Commit hooks passed, including repository structure, formatting, lint, tests selected by the commit, DCO, and secret checks. - The diff contains no secrets, API keys, or credentials. No live E2E is required because the accepted behavior is fully observable at deterministic adapter and consumer boundaries and does not mutate external state. ## Review notes Sensitive inference and onboarding paths are changed. Pre-publication review covered exact gateway targeting, refusal of endpoint overrides, bounded capture, typed failure separation, redaction, current lifecycle ownership, and the criterion-to-evidence ledger. The refreshed head still requires exact-head CodeRabbit, PR Review Advisor, CI, and human approval before merge. The current-main refresh incorporates related lifecycle and test-contract changes from #11741, #11776, #11792, #11821, #11829, #11865, #11889, #11891, #11908, and #11913 without expanding this PR's behavior. Accepted scope: #9809 (comment) --- Signed-off-by: Rebecca Sliter <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added structured inference-route checks for configured and unconfigured gateways. - Improved support for named gateways and provider/model verification. - Added clearer handling for timeouts, authentication, connectivity, validation, and schema errors. - Improved sandbox connection, launch readiness, status, onboarding, and recovery flows with verified route information. - **Bug Fixes** - Prevented untrusted or unavailable inference routes from being treated as healthy. - Added recovery guidance and preserved relevant failure details when restoration cannot be confirmed. - **Documentation** - Documented inference-route behavior, gateway scoping, sanitization, timeouts, and error reporting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Rebecca Sliter <[email protected]> Signed-off-by: San Dang <[email protected]> Co-authored-by: Rebecca Sliter <[email protected]> Co-authored-by: San Dang <[email protected]>
Outcome
nemoclaw list --jsonnow redacts sandbox inventory strings thatstatus --jsonalready redacts. Inventory recovery metadata and text output also no longer publish secret-bearing sandbox or inference values.Reason
The list and status surfaces exposed the same registry data with different redaction guarantees. This replacement preserves the fix proposed by @udsy19 in #10200 and adapts it to the current asynchronous policy lookup and shared inventory rendering paths.
Related issues
Fixes #10199.
Supersedes #10200.
Changes
listthrough the recovery-backed redacting command path while preserving JSON stdout behavior.Verification
npm run test:changed— passed.npx vitest run --project integration test/cli/list-share-live-inference.test.ts— 14 tests passed.npx vitest run --project cli src/commands/global-oclif-command-adapters.test.ts— 12 tests passed.npx vitest run --project cli src/lib/inventory/index.test.ts src/lib/inventory/index-concurrency.test.ts— 63 tests passed.npm run typecheck— passed.f169d097bcdb99cbaf9fd4efe48b6dc08552d1cb— passed, including all 12 CLI shards and merged coverage.Require no Advisor blockerspassed for the exact head.Review notes
The local PR Review Advisor could not start its first specialist. Three attempts created the OpenShell sandbox, then failed at
sandbox-create-readinesswithsandbox is not ready; each attempt deleted its sandbox. The alternative local review inspected the complete diff and affected sibling paths. The hosted exact-head Advisor review is authoritative and clear.Signed-off-by: Julie Yaunches [email protected]
Summary by CodeRabbit