test(installer): harden readiness ID output coverage - #8776
Conversation
Signed-off-by: Julie Yaunches <jyaunches@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:
📝 WalkthroughWalkthroughThe installer host preflight now reuses normalized admission and capability IDs for diagnostics and readiness details. Tests cover ID filtering and update expected base-image workflow paths. ChangesInstaller preflight diagnostics and validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 47df4d0 in the TypeScript / code-coverage/cliThe overall coverage in commit 47df4d0 in the Show a code coverage summary of the most impacted files.
Updated |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 1 semantic terminology decisionTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite for the commit under review. Recommended E2E: None This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/package-contract/installer-host-preflight.test.ts (1)
161-188: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover duplicate IDs.
This test verifies filtering, but it does not verify deduplication. A regression that removes the
Set-based deduplication would still pass because every input ID is unique. Add duplicate valid finding and capability IDs, then assert that each summary and fallback diagnostic appears exactly once.As per path instructions, test the observable installer output. The PR objective includes ID deduplication.
Suggested coverage
findingIds: [ "host.test.unknown", + "host.test.unknown", "unsafe\ninjected-finding", @@ capabilityIds: [ "host.test.required-capability", + "host.test.required-capability", "unsafe\ninjected-capability", @@ - expect(output).toMatch(/Admission finding IDs: host\.test\.unknown/); + expect(output.match(/Admission finding IDs: host\.test\.unknown/g) ?? []).toHaveLength(1);🤖 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/package-contract/installer-host-preflight.test.ts` around lines 161 - 188, Update the preflight test around the existing findingIds and capabilityIds fixtures to include duplicate valid IDs. Assert the observable installer output contains each duplicated ID’s admission summary, readiness summary, and fallback diagnostic exactly once, while preserving the existing filtering assertions for unsafe, oversized, and invalid IDs.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.
Nitpick comments:
In `@test/package-contract/installer-host-preflight.test.ts`:
- Around line 161-188: Update the preflight test around the existing findingIds
and capabilityIds fixtures to include duplicate valid IDs. Assert the observable
installer output contains each duplicated ID’s admission summary, readiness
summary, and fallback diagnostic exactly once, while preserving the existing
filtering assertions for unsafe, oversized, and invalid IDs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d823ede6-17ef-441b-bd5f-464f0497cb1c
📒 Files selected for processing (1)
test/package-contract/installer-host-preflight.test.ts
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> (cherry picked from commit f00bc5b)
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Summary
PR #8634 merged the production readiness-ID sanitization, the required gateway-management fixture, and the current base-image publisher paths. This PR is therefore narrowed to the remaining independent value: package-contract evidence that installer diagnostics reject unstable IDs and deduplicate valid IDs across both output routes.
Changes
Type of Change
Quality Gates
47df4d057; no production security surface changes, and all nine security categories have no findings. The new negative evidence specifically covers input sanitization, output-injection resistance, deduplication, and fallback-path composition.Documentation Writer Review
no-docs-neededmain.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubnpm exec -- vitest run --project package-contract test/package-contract/installer-host-preflight.test.ts— 3/3 passed, including malformed and duplicate-ID paths.npm exec -- vitest run --project e2e-support test/e2e/support/base-image-publication.test.ts— 39/39 passed after merging currentmain.npm exec -- vitest run --project cli src/lib/onboard/setup-nim-ollama.test.ts src/lib/onboard/setup-nim-flow.test.ts— 49/49 passed for the merged base behavior.npm run validate:pr— passed all pre-commit, commit-message, and pre-push checks for the byte-identical final tree; the latest signed merge also passed commit and pre-push hooks.Signed-off-by: Julie Yaunches jyaunches@nvidia.com