feat(runtime): qualify Podman inference commands - #8059
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>
|
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:
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit e74e262 in the TypeScript / code-coverage/cliThe overall coverage in commit e74e262 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
2 additional E2E selections from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 warning · 0 suggestionsWarningsWarnings do not block.
|
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
apurvvkumaria
left a comment
There was a problem hiding this comment.
Approve — reviewed exact head e74e262. Podman inference command qualification binds execution to persisted engine authority and constrained argument construction, with focused GPU, inference-argument, preflight, and authority tests. I found no blocking defect, and exact-head core CI is green.
<!-- markdownlint-disable MD041 --> ## Summary Reconstructs B4-D of #7744 on current `main` and consolidates the former 4.5A–4.5D review slices into one dormant provider-owned Podman GPU and host-local inference batch. Ollama, NVIDIA NIM, and vLLM now share exact operation authority, durable secret-free lifecycle receipts, and provider-neutral `inference.local` startup integration for OpenClaw, Hermes, and LangChain Deep Agents Code. Podman remains absent from production registration and support claims. ## Related Issue Refs #7744. Consolidates the reviewed source intent from #8059, #8060, #8061, and #8066 into this existing PR. ## Changes - Bind each host-local inference operation to the exact Podman executable and safe parent chain, socket endpoint, server authority, provider-owned network, and physical NVIDIA CDI UUID inventory. Revalidation rejects executable, endpoint, CDI, launch-spec, or authority drift before mutation. - Translate only the bounded Podman inference command surface. The translator rejects Docker-named helper execution, raw mounts, host IPC, `--rm`, ambiguous GPU requests, mutable images, and secret-bearing argv. - Add canonical secret-free Ollama, NIM, and vLLM receipts bound to provider, engine, endpoint, immutable images, runtime identity, launch digest, CDI authority, provider-native HTTP/inference proof, and publication transaction. - Add fail-closed start, inspect, stop, preserve, resume, interrupted recovery, rollback, and destroy behavior through an injected runtime provider. Evidence is redacted before fallback or rollback; missing, reused, ambiguous, or indeterminate cleanup identity is rejected. - Route the three agents through the same `https://inference.local/v1` application contract while direct provider proof uses the inspected provider gateway. Startup and policy tests cover success, drift, rollback, stopped/running restoration, cleanup ambiguity, recovery, route allow/deny, and cross-engine exclusion. - Preserve only the two bounded OpenClaw continuity fields needed to prevent `missing-meta-vs-last-good` rollback; backup routes, providers, credentials, and arbitrary metadata never cross into the regenerated managed config. - Preserve Docker behavior and the socket-free MXC-style provider seam. `CURRENT_RUNTIME_PROVIDER_BUNDLES` remains Docker/Kubernetes only, the production host-local resolver remains null, and hidden `--temp-managed-runtime` behavior remains default-off and undocumented. The operation-scoped provider-owned selection is carried through the provider inference handler and all three startup flows, with current-provider null-path regressions. Per #7744's 4.5C/4.5D boundary, the production root intentionally injects no Podman selection in B4-D; durable ownership follows in B4-E and production Podman registration remains reserved for 4.6D. ## Reconstruction Safety - The original PR and donor heads were preserved before reconstruction under `backup/b4d-20260811/*` refs. - The public branch update is a fast-forward from the preserved #8061 head; no commit was rewritten and no force push was used. - Current `main` is included through signed merge commits, and the B4-D patch was reconstructed path-by-path instead of cherry-picking stale cross-cutting donors. ## 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: Podman remains dormant, unregistered, default-off, and intentionally undocumented; no supported product workflow changes. - [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: Independent exact-tree architecture and security audits found no P0/P1/P2 issue. They verified credential redaction, exact endpoint/CDI/executable authority, evidence-before-rollback ordering, cleanup fail-closed behavior, Docker/current-provider preservation, and dormant registration. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `no-docs-needed` - Evidence: Codex Desktop reviewed the complete 57-file exact diff for `a4fbaf82e` against `06ac446dd` after reconciling #8724 review recovery. The diff changes dormant injected Podman paths and internal OpenClaw continuity metadata only; production registration remains Docker/Kubernetes, and no documented command, flag, default, configuration, or supported workflow changes. - Agent: Codex Desktop <!-- docs-review-head-sha: a4fbaf8 --> <!-- docs-review-agents-blob-sha: c4923a3 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Protected exact-head E2E pending. - Station profile/scenario: Podman physical NVIDIA CDI and local-inference qualification. - Result: Pending protected workflow evidence; no local synthetic result is claimed. - Supporting evidence: Pending exact-head workflow URL. ## Verification - [x] PR description includes a `Signed-off-by:` line and every newly published reconstruction commit appears as `Verified` in GitHub (`valid`). - [x] Pre-commit and pre-push hooks passed. Local whole-range commitlint additionally reports one preserved historical donor `style(...)` commit; the PR title conforms and GitHub's commit-lint workflow validates the title. - [x] Targeted behavior tests pass for the current change set — the prior B4-D changed-file suite passed 444 tests; the exact continuity fix additionally passed its 8-test regression file, all 128 generator tests, and 57 managed-startup tests. Typechecks, repository checks, catalog checks, test-structure gates, Biome, pre-commit, and pre-push hooks pass. - [x] Exact-head post-#8724 reconciliation passes 250 focused CLI tests across 14 files. The affected integration set passed 132/133 in the host environment; the sole Homebrew trust leak reproduced on exact base, and the isolated test passed on both head and base with host Homebrew excluded from `PATH`. Both typechecks, repository architecture checks, test size/title gates, Biome, diff hygiene, and pre-commit/pre-push hooks pass. Exact-head CodeRabbit found an assertion typing weakness; the shared mocks now use the real dependency signatures and the negative checks inspect strongly typed call tuples without casts. The four affected handler files pass 78 tests, and CLI typecheck passes on `a4fbaf82e`. After integrating current main, canonical catalog generation plus the merged-tree CLI set pass 132 tests; adjacent Docker authority, Ollama cleanup, vLLM catalog, platform, runner, and dispatch integration passes 143 tests, with both typechecks green. - [ ] Applicable broad gate passed — exact-head canonical CI, Advisor, CodeRabbit, managed-image/startup lanes, and protected E2E are pending. The local all-project run was non-diagnostic under host oversubscription; relevant failures passed serially, including the current-provider integration with Homebrew excluded from the child `PATH`. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [x] `npm run docs:prepare && npm run docs:validate` passed with zero errors and two standard Fern warnings. - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Additional exact-head local gates: CLI build, standard and strict CLI typechecks, repository checks, config/catalog validation, source-shape budget, test-size budget, semantic E2E phase coverage (125 tests across 81 files), Biome, gitleaks, and docs validation. ## Exact Slice Identity - Head: `a4fbaf82e618c6f09afa30033560cb19c9be6b85` - Base: `06ac446ddaa8f4ebd790da463757f3ffd52a764b` - Delta: 57 files, +13,010/-344 --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added host-local inference support for Ollama, NIM, and vLLM through managed Podman runtimes. * Added startup recovery, resume, rollback, canonical routing, GPU support, and provider-neutral inference checks. * Added secure, operation-scoped environment forwarding. * Preserved valid OpenClaw version metadata during configuration regeneration. * **Bug Fixes** * Prevented stale local-inference policies and unauthorized direct host access. * Detects executable, endpoint, runtime, network, GPU, and configuration changes. * Improved rollback, cleanup verification, redaction, and fail-closed behavior. * OpenClaw health checks now accept authenticated responses. * Fixed recovery for containers caught in restart loops. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Julie Yaunches <jyaunches@nvidia.com>
Summary
This PR adds the dormant Podman GPU-qualification and inference-command translation boundary for the incremental runtime stack in #7744. It does not register Podman for production selection or advertise user-visible Podman support.
Changes
host-local-inferenceengine contract so runtime providers can request GPU-qualified execution without a Podman switch in central orchestration. Provider contract and source-shape tests protect this boundary.all, indexed GPUs, GPU UUIDs, MIG devices, container-name filters, and fail-closed rejection of unsupported NVIDIA runtime, duplicate, unqualified, or raw-device options.Advisor disposition
e74e262c2; the denial test supplies the same canonical CDI identity from both endpoint inventory and the separately qualified inventory and proves qualification rejects it.Type of Change
Quality Gates
Advisor Disposition
Documentation Writer Review
no-docs-neededDGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result: Exact-head CI and protected E2E are running.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Aaron Erickson aerickson@nvidia.com