test(package): install packed CLI as a consumer - #10986
Conversation
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
|
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. |
|
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)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe package-contract test now installs the packed fixture tarball into a temporary consumer project. It verifies dependencies from that project, runs the probe from the installed package path, and removes temporary directories during cleanup. ChangesManaged image registry transport contract test
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The contract test now installs the packed CLI archive through a minimal consumer project and validates the installed package without development dependencies. No current merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ 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 16a7ced in the TypeScript / code-coverage/cliThe overall line coverage in commit 16a7ced in the Updated |
|
Ready for review. This PR unblocks the recurring main build-typecheck failure by installing the packed CLI into a minimal consumer project, matching the real package boundary. The focused package-contract test, npm run validate:pr, and the PR build-typecheck job passed. An unrelated CLI shard timeout passed on a single-job retry, and that focused test passed locally in 205 ms. PR Review Advisor is currently broken upstream for this commit: eight specialist jobs ended in model 429s and one failed while pulling the shared sandbox image, so the workflow produced no findings. I could not complete npm run review:local because the temporary OpenShell gateway refused connections. CodeRabbit completed against the exact commit with no actionable findings. |
|
This is the exact deterministic base failure currently blocking PR #10810 at head |
Picks up #10986, which fixes the build-typecheck packed-CLI install contract. Signed-off-by: Hai Nguyen <haingu@nvidia.com>
## Outcome Messaging onboarding now routes checked-in profile inspection and import, provider lookup and update, and post-update verification through typed `OpenShellProviderAdapter` results. Named gateway targets fail closed when an ambient `OPENSHELL_GATEWAY_ENDPOINT` could redirect the operation, while lookup, update, identity-mismatch, and operational failures retain distinct redacted diagnostics. ## Reason The accepted #9806 slice requires the adapter to own the OpenShell CLI boundary instead of leaving profile and provider lifecycle commands in onboarding. This is a fresh implementation from current `main`; it does not merge or cherry-pick the closed #10719 attempt. ### Related issues - Part of #9806 - Replaces the adapter foundation attempted in #10719 - Relates to #9813, which owns migration of the remaining raw CLI consumers - Provides a fresh base on which the separate #10724 and #10726 consumer slices can be restacked ## Changes - Add typed provider metadata, lookup, update, profile-import, and verification results to `OpenShellProviderAdapter`. - Move checked-in profile parsing, validation, import, export, and exact contract verification behind the CLI adapter. - Move provider metadata and diagnostic parsing to the adapter layer, retaining only the narrow exact-not-found classification needed at the CLI boundary. - Route messaging provider publication and managed-clone reconciliation through exact adapter calls. - Preserve safe redacted lookup and update failure details while keeping identity mismatch distinct from operational failure. - Preserve both provider and temporary-source cleanup failures when preparation aborts. - Reject named-target operations when ambient `OPENSHELL_GATEWAY_ENDPOINT` is present. - Bind both ordinary and Hermes portable sandbox creation to the same provider-effect boundary, including deferred post-identity effects and resume replay protection. - Add tests for exact `getProvider`, `updateProvider`, profile-import, and verification calls, including raw-command exclusion and repeatable desired-state recovery after partial publication. ## Verification - On exact candidate tree `7e3490e69`, the focused CLI suite passed 253 tests across seven files, covering adapter get/update/profile results, provider publication, ordinary creation, Hermes portable creation, and the real superseded portable transaction. The published signed candidate `364aa89d4` has that exact tree. - `npx vitest run --project integration test/onboarding/onboard-hermes-portable-provider-publication.test.ts`: four public-boundary cases passed on `364aa89d4`, covering pre-create publication, deferred post-verification publication, verified-resume suppression, superseded-path exclusion, exact named-gateway adapter calls, and isolation from ambient XDG paths. - `npm run typecheck:cli`: passed on `364aa89d4` after the final canonical `main` refresh. - Targeted Oxlint for the changed TypeScript files: passed. - `npm run validate:pr`: passed on exact signed candidate `364aa89d4` against canonical `main` `d836ccb44` in a clean isolated checkout, including repository checks, secret scanning, source-shape checks, growth guardrails, commit policy, and the CLI pre-push type check. - The full manual-stage coverage pass completed successfully. The broader all-files pre-commit sweep passed every check except existing Hadolint warnings in unchanged Dockerfiles; the identical Hadolint failure was reproduced on canonical `main` `3509b5a43` before the subsequent `main` refresh. - `git diff --check origin/main...HEAD`: passed. - `npm run review:local`: previously failed before analysis because its desktop bootstrap did not forward the active Colima `DOCKER_HOST`; no artifacts were produced. Per maintainer direction, repairing that unrelated local-review tooling is deferred. - PR Review Advisor: three full runs on `eb2be67fd` produced no specialist artifacts and were deferred as unavailable infrastructure evidence. On final head `c7217b54b`, run `33759103328` succeeded for all nine specialists. Every specialist summary and full JSONL session was read; no specialist reported a change-required finding. - Diff inspection: no secrets, API keys, or credentials are present. ## Review notes - CodeRabbit's final incremental review covered `eb2be67fd..c7217b5` and produced no actionable comments. Its generated summary retained an older Hermes portable risk sentence, but CodeRabbit rechecked commits `1abb93872` and `49bc39aef`, verified all four portable lifecycle cases, and explicitly classified that sentence as stale. All review threads are resolved. - CodeRabbit's docstring-coverage warning is a generic advisory, not a repository gate. Adding docstrings across 51 touched existing functions would broaden this migration without protecting the requested adapter behavior, so no change is required. - The remaining raw provider consumers are intentionally unchanged for #9813. - The diagnostic parser could not be removed entirely because the CLI adapter still needs exact absence classification. It is no longer an onboarding shim and now lives at the adapter boundary. - The branch includes canonical `main` through `d836ccb44`, including the remediation for the inherited `fast-uri` advisories, the package-contract npm fix from #10986, the stricter existing-profile validation protocol from #10884, and the Advisor on-demand diff-reading fix from #10952. - #10724 and #10726 are broader drafts stacked on the closed #10719 branch. This PR does not close or modify them. --- Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> --------- Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Outcome
The managed-image registry transport package contract now installs the packed CLI through a consumer project. The test still verifies the production
undicidependency and transport load without asking npm to resolve NemoClaw's development graph.Reason
Main's
build-typecheckjob fails in this contract because npm 10.9.8 crashes withCannot read properties of null (reading 'edgesOut'). The test caused the crash by unpacking the tarball and treating it as the root project, which makes npm resolve development-only optional peers despite--omit=dev. A consumer install models the published package boundary that the test intends to verify.Failure: https://github.com/NVIDIA/NemoClaw/actions/runs/33777143937/job/100722012206
Changes
--omit=devand--no-save.undicifrom the consumer's production dependency tree.nemoclawpackage.Verification
npx vitest run --project package-contract test/package-contract/managed-image-registry-transport.test.ts --reporter=verbose- passed on commit16a7cedd8a7103f914c14335a17688c0dae5daebafter refresh to main.npm run test:titles:check- passed.npm run validate:pr- passed.npm run review:local- unavailable because the temporary OpenShell gateway refused connections during Advisor configuration.Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com
Summary by CodeRabbit