fix(installer): validate Station package state - #7202
Conversation
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Station host preparation script now validates dpkg status, architecture, and version records, audits package-manager health, detects active locks, and guards repository/package mutations. New regression tests cover package states, preflight failures, transaction readiness, and installer-integration project registration. ChangesStation package safety
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant run_apply
participant common_preflight
participant dpkg
participant package_manager
participant install_packages
run_apply->>common_preflight: start Station apply flow
common_preflight->>dpkg: audit database and inspect package records
common_preflight->>package_manager: check processes and locks
common_preflight->>install_packages: proceed after preflight checks
install_packages->>package_manager: assert transaction readiness
install_packages->>dpkg: install and revalidate packages
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
scripts/prepare-dgx-station-host.sh (1)
1150-1161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate transaction-readiness sequence risks silent drift.
The
elsebranch (colossus-baseos) manually re-implementscheck_package_managers_idle+check_dpkg_database_health— exactly whatassert_package_transaction_readyalready composes. If that helper gains another check later, colossus-baseos won't get it unless someone remembers to update this inline copy too.♻️ Proposed consolidation
if station_checks_package_inventory; then require_command dpkg + assert_package_transaction_ready "initial Station package preflight" if [[ "$STATION_HOST_PROFILE" == "generic-ubuntu" ]]; then require_command lslocks - assert_package_transaction_ready "initial Station package preflight" - else - check_package_managers_idle "initial Station package preflight" - check_dpkg_database_health fi else check_package_managers_idle "initial Station package preflight" fi
check_package_managers_idlealready internally gates the lock-file inspection onSTATION_HOST_PROFILE == "generic-ubuntu", so this produces identical behavior for colossus-baseos.🤖 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 `@scripts/prepare-dgx-station-host.sh` around lines 1150 - 1161, In the station package preflight flow, replace the non-generic-ubuntu branch’s separate check_package_managers_idle and check_dpkg_database_health calls with assert_package_transaction_ready, preserving the existing generic-ubuntu handling and preflight context argument.vitest.config.ts (1)
115-133: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPart of the three-way duplicated test-categorization list.
These
exclude/includeentries are correct and consistent with the other two locations, but represent two more manually-synced copies of the same categorization fact (see consolidated comment).Also applies to: 144-156
🤖 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 `@vitest.config.ts` around lines 115 - 133, Consolidate the duplicated test-categorization entries currently maintained in the vitest configuration’s exclude/include sections. Define the categorization once and reuse it in the relevant configuration locations, preserving the existing patterns and exclusions without manually synchronized copies.test/test-boundary-guards.test.ts (1)
759-759: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPart of the three-way duplicated test-categorization list.
This entry is correct and consistent with
scripts/checks/vitest-project-overlap.mts'sINSTALLER_INTEGRATION_TESTSupdate, but it's one of three places that must be kept in sync for every installer-integration test addition (see consolidated comment).🤖 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/test-boundary-guards.test.ts` at line 759, Keep the installer-integration test entry synchronized across all three test-categorization lists, including this entry and the corresponding INSTALLER_INTEGRATION_TESTS definition in scripts/checks/vitest-project-overlap.mts. When adding or removing installer-integration tests, update every duplicated list consistently.scripts/checks/vitest-project-overlap.mts (1)
42-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winThree independently-maintained lists categorize the same test file; consider a single canonical source.
INSTALLER_INTEGRATION_TESTShere,expectedProjectsintest/test-boundary-guards.test.ts, and theexclude/includearrays invitest.config.tsall had to be updated in lock-step to registertest/install-station-package-state.test.ts. This PR keeps them consistent, but the pattern is drift-prone: nothing prevents a future test file addition from updating only one or two of the three lists.As per path instructions for
scripts/checks/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift."🤖 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 `@scripts/checks/vitest-project-overlap.mts` around lines 42 - 54, Consolidate the duplicated installer integration-test inventory into one canonical source, replacing the independently maintained INSTALLER_INTEGRATION_TESTS, expectedProjects, and related vitest.config.ts include/exclude entries. Update the consumers in the overlap check, boundary guard, and Vitest configuration to derive their classifications from that shared source, preserving the current project categorization and test behavior.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 `@scripts/checks/vitest-project-overlap.mts`:
- Around line 42-54: Consolidate the duplicated installer integration-test
inventory into one canonical source, replacing the independently maintained
INSTALLER_INTEGRATION_TESTS, expectedProjects, and related vitest.config.ts
include/exclude entries. Update the consumers in the overlap check, boundary
guard, and Vitest configuration to derive their classifications from that shared
source, preserving the current project categorization and test behavior.
In `@scripts/prepare-dgx-station-host.sh`:
- Around line 1150-1161: In the station package preflight flow, replace the
non-generic-ubuntu branch’s separate check_package_managers_idle and
check_dpkg_database_health calls with assert_package_transaction_ready,
preserving the existing generic-ubuntu handling and preflight context argument.
In `@test/test-boundary-guards.test.ts`:
- Line 759: Keep the installer-integration test entry synchronized across all
three test-categorization lists, including this entry and the corresponding
INSTALLER_INTEGRATION_TESTS definition in
scripts/checks/vitest-project-overlap.mts. When adding or removing
installer-integration tests, update every duplicated list consistently.
In `@vitest.config.ts`:
- Around line 115-133: Consolidate the duplicated test-categorization entries
currently maintained in the vitest configuration’s exclude/include sections.
Define the categorization once and reuse it in the relevant configuration
locations, preserving the existing patterns and exclusions without manually
synchronized copies.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 5a1ec444-6a58-4139-b454-2a4a9784cf2d
📒 Files selected for processing (9)
scripts/checks/vitest-project-overlap.mtsscripts/prepare-dgx-station-host.shtest/install-station-container-coexistence.test.tstest/install-station-dgx-os.test.tstest/install-station-host-preparation.test.tstest/install-station-package-state.test.tstest/install-station-package-transaction.test.tstest/test-boundary-guards.test.tsvitest.config.ts
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
Maintainer review is complete: the Station package-state change is fail-closed, manual security review found no blocker, 148 focused installer tests plus ShellCheck and project-membership validation passed, the canonical advisor has no findings, and all named CI checks including the approved fork E2E skip are green. Deferring approval only because GitHub returns an empty |
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry for NemoClaw `v0.0.89` before the release plan captures the tag commit. The entry summarizes the user-visible Station preparation, inference, recovery, policy-disclosure, and CLI-containment changes merged since `v0.0.88`. ## Changes - Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89` release heading, parser-safe SPDX comment, summary, and detailed bullets. - Link each shipped theme to the most specific published OpenClaw documentation routes. - Keep internal E2E, advisory-registry, and review-workflow refactors out of the user-facing release summary. Source summary: - #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 -> `docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station identity, package-state, PackageKit, DKMS, and reboot-handoff fixes. - #7242, #7221, #7186, #7164, and #6874 -> `docs/changelog/2026-07-20.mdx`: Summarize inference endpoint provenance, provider attachment, managed vLLM cleanup and progress, and Ollama selection guidance. - #7225, #7216, #7192, #7136, #7096, and #6910 -> `docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery guidance, rebuilt model routing, durable Hermes state, and gateway restart behavior. - #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective messaging-preset egress disclosure before policy mutation. - #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize structured output containment, terminal-safe route display, and Hermes forward cleanup. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This PR adds release-history prose only; the focused changelog contract test validates its required structure and routes. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification - [x] PR description includes a `Signed-off-by:` line 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 — `mise exec node@22.23.1 -- npx vitest run test/changelog-docs.test.ts` (6 passed). - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this doc-only release entry. - [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) — `mise exec node@22.23.1 -- npm run docs` completed with 0 errors and 2 existing site-wide warnings. - [x] 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) — the native changelog entry uses the required parser-safe MDX SPDX comment and does not use frontmatter. --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded DGX Station installation support for qualified GB300 and OTA-upgraded environments. * Preserved selected inference providers, endpoints, model pins, and tuning settings during sandbox creation and rebuilds. * Improved sandbox recovery by validating availability and stability before restarting services. * Added clearer policy output showing the complete effective messaging egress configuration. * **Bug Fixes** * Hardened status and inference route displays by sanitizing terminal control characters. * Improved Hermes uninstall behavior by stopping detached dashboard forwarding. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR documents the full YAML-derived `policy-add --dry-run` disclosure near the preset preview workflow. It also defines the generic Ubuntu package-state boundary for DGX Station preparation. This post-release documentation follow-up does not change a dated changelog entry. ## Changes - [#7187](#7187) -> `docs/network-policy/integration-policy-examples.mdx`: Explain that the preview uses the exact preset YAML and discloses endpoint, HTTP rule, and binary scope. - [#7241](#7241) -> `docs/get-started/dgx-station-preparation.mdx`: Document that NemoClaw accepts and quiesces an idle PackageKit daemon. - [#7202](#7202) -> `docs/get-started/dgx-station-preparation.mdx`: Document the fail-closed package transaction, lock, package-state, and query boundary before mutation. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This PR changes prose only. Existing source tests own the documented behavior, and focused documentation guards pass. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable. - Station profile/scenario: Documentation only. - Result: No host behavior changed. - Supporting evidence: Source behavior verified against merged PRs #7241 and #7202 and their focused tests. ## Verification - [x] PR description includes a `Signed-off-by:` line 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 — `npx vitest run test/changelog-docs.test.ts test/station-doc-ownership.test.ts test/policy-roundtrip-docs.test.ts`: 3 files and 12 tests passed. - [ ] Applicable broad gate passed — Not applicable to this doc-only change. - [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) — The build passed with 0 errors. Fern reported the existing light-mode accent contrast warning. - [x] 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: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Clarified Ubuntu preparation behavior when PackageKit, APT, or dpkg activity is detected, including conditions that stop preparation before changes are made. - Expanded network policy preview guidance to explain that output reflects the maintained preset configuration and includes hosts, ports, access rules, protocols, TLS and enforcement settings, HTTP methods and paths, and binary allowlists. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
DGX Station host preparation previously treated a matching package version as healthy even when dpkg reported an incomplete status or foreign architecture. This change validates the complete dpkg record and fails before package or repository mutation when dpkg is unhealthy or an APT/dpkg process or lock is active.
Related Issue
Fixes #7201
Changes
iirecords on ARM64 or architecture-independent packages, while preserving the reviewed factory DKMS transition.dpkg --auditand package-manager quiescence at initial preflight and each package or repository mutation boundary.run_applyandcommon_preflightorchestration. The new helpers are scoped to Station package preparation because version-only checks cannot distinguish missing, malformed, unhealthy, and foreign-architecture dpkg records.Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project installer-integration: 371 passed, 2 skipped; focused integration: 58 passednpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Physical evidence: a read-only probe on a qualified generic Ubuntu 24.04 ARM64 DGX Station GB300 confirmed the
ii |<architecture>|<version>dpkg record shape, a clean audit,/usr/bin/lslocks, and full apply-time lock-path visibility. No host mutation was needed for these pre-mutation rejection paths.Signed-off-by: Senthil Ravichandran senthilr@nvidia.com
Summary by CodeRabbit