Skip to content

feat(runtime): add dormant Podman CPU lifecycle proof - #8276

Merged
cv merged 15 commits into
feat/buildless-managed-activation-b3dfrom
feat/podman-native-cpu-proof-v2
Aug 5, 2026
Merged

feat(runtime): add dormant Podman CPU lifecycle proof#8276
cv merged 15 commits into
feat/buildless-managed-activation-b3dfrom
feat/podman-native-cpu-proof-v2

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the dormant, provider-scoped Podman command/preflight/start-stop boundary and proves it against a real rootless Podman 5 service with Docker disabled. The provider remains absent from the production registry: this PR does not activate or advertise Podman support.

Stacked on #8261. Part of #7744.

Related Issue

Part of #7744.

Changes

  • Adds an immutable operation-scoped container-engine command contract and a Podman adapter pinned to one qualified Unix-socket authority.
  • Adds Linux amd64/arm64 rootless Podman 5 preflight, subordinate UID/GID and cgroups v2 validation, and exact labeled-container start/stop semantics.
  • Adds an inert Podman runtime bundle with only host doctor and direct CPU lifecycle capabilities; managed bootstrap, snapshots, recovery, cleanup, GPU, local inference, and production selection remain explicitly unsupported for later slices.
  • Adds unit coverage across OpenClaw, Hermes, and Deep Agents Code while keeping the production registry limited to qualified providers.
  • Adds a credential-free Ubuntu 26.04 PR proof that disables and masks Docker, guards every Docker CLI resolution, starts one exact rootless Podman API socket, and proves all three agents preserve immutable container identity across stop/start/restart.
  • The abstraction is required so Podman and future MXC-style providers can inject engine-specific operations without central Podman switches. Directly changing existing Docker helpers would violate the runtime-provider capability boundary; the registry/source-shape and rootless workflow tests protect that seam.

Type of Change

  • 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

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: the Podman bundle is deliberately absent from production selection and this PR exposes no user-facing runtime option.
  • 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: endpoint authority is pinned before and after every command; Docker is disabled and guarded in the live proof; the provider remains dormant pending later qualification slices.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: .github/workflows/podman-cpu-proof.yaml; src/lib/onboard/runtime-provider/podman.ts; the bundle remains non-selectable and no user-visible behavior is documented in this slice.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 60/60 focused Podman adapter/provider/workflow/parity tests passed on the restacked head; the advisor follow-up adds 10/10 focused tests and passes source-shape, repository, and CLI pre-push gates on exact head a254cf1cc306.
  • Applicable broad gate passed — prek run --files <complete slice> passed repository checks, semantic E2E phases, source-shape, test-size, formatting, YAML, secret scan, and all other applicable hooks.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Aaron Erickson aerickson@nvidia.com

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit 6db21c3)
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit a2e5e80)
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit 3b53005)
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit cbcf8ef)
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
(cherry picked from commit 2a0ff40)
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 49b2433a-7a15-4ec0-b15e-ab3e65c1383c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit ee60626 in the feat/podman-native-c... branch remains at 96%, unchanged from commit fdd6828 in the feat/buildless-manag... branch.

TypeScript / code-coverage/cli

The overall coverage in commit ee60626 in the feat/podman-native-c... branch remains at 81%, unchanged from commit fdd6828 in the feat/buildless-manag... branch.

Show a code coverage summary of the most impacted files.
File feat/buildless-manag... fdd6828 feat/podman-native-c... ee60626 +/-
src/lib/onboard...-transaction.ts 81% 66% -15%
src/lib/onboard...cker-journal.ts 84% 69% -15%
src/lib/onboard...strap/docker.ts 69% 60% -9%
src/lib/onboard...atcher-lease.ts 0% 75% +75%
src/lib/onboard...an-lifecycle.ts 0% 84% +84%
src/lib/onboard...trap-journal.ts 0% 86% +86%
src/lib/onboard...-replacement.ts 0% 88% +88%
src/lib/onboard...-transaction.ts 0% 88% +88%
src/lib/onboard...eld-workload.ts 0% 88% +88%
src/lib/onboard...an-preflight.ts 0% 95% +95%

Updated August 05, 2026 06:21 UTC

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized terminology decisions differ; normalized E2E selections match; severity counts match.
7 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • held-workload at src/lib/onboard/managed-bootstrap/podman-held-workload.ts:224: selected only by the second-opinion lane as established.
  • operation-scoped at src/lib/adapters/container-engine.test.ts:8: selected only by the second-opinion lane as established.
  • image-owned at src/lib/onboard/lifecycle-contracts.md:199: selected only by the second-opinion lane as established.
  • managed-bootstrap at src/lib/adapters/container-engine.ts:10: selected only by the second-opinion lane as established.
  • dormant at src/lib/onboard/lifecycle-contracts.md:179: selected only by the second-opinion lane as established.
  • authority-bound at src/lib/adapters/container-engine.ts:36: selected only by the second-opinion lane as established.
  • watcher lease at src/lib/onboard/managed-bootstrap/podman-watcher-lease.ts:186: selected only by the second-opinion lane as define.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — dormant Podman candidate at src/lib/onboard/managed-bootstrap/README.md:104: Keep the term. The surrounding text states the registry exclusion that distinguishes this candidate.
  • define — held OpenShell workload at src/lib/onboard/lifecycle-contracts.md:183: Define “held” at first use as the exact original workload retained during replacement preparation.
  • justified — engine authority at src/lib/onboard/lifecycle-contracts.md:182: Keep the term. The exact endpoint and rotation contrast establishes its meaning.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-inference, cloud-onboard, security-posture, onboard-repair, onboard-resume

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

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>
@ericksoa ericksoa added area: architecture Architecture, design debt, major refactors, or maintainability area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure platform: container Affects Docker, containerd, Podman, or images integration: openclaw OpenClaw integration behavior integration: hermes Hermes integration behavior integration: dcode LangChain Deep Code integration behavior feature PR adds or expands user-visible functionality v0.0.103 Release target labels Aug 5, 2026
## Summary

Adds the dormant, provider-owned Podman managed-bootstrap transaction as
one additive batch: exact held-workload and watcher ownership, durable
journaled replacement and rollback, and image-owned startup application
for OpenClaw, Hermes, and Deep Agents Code. The provider remains absent
from production selection, so this PR does not activate or advertise
Podman support.

Stacked on #8276. Consolidates the source material preserved from #8052,
#8055, and #8056. Part of #7744.

## Related Issue

Part of #7744.

## Changes

- Adds the `managed-bootstrap` operation scope to the driver-neutral
container-engine boundary.
- Discovers and stably re-inspects one exact held Podman workload, then
durably leases the exact watcher process with PID-reuse and
competing-owner protection.
- Journals engine authority, immutable original and replacement
identities, image/specification fingerprints, state volume, watcher
lease, and every monotonic mutation boundary.
- Prepares a stopped final-labelled replacement while retaining the
original; pre-commit rollback removes only the proven replacement and
owned state volume and restores the exact original.
- Stages one protected root-apply request into the exact replacement,
starts it, and authenticates image-owned completion for OpenClaw,
Hermes, and LangChain Deep Agents Code.
- Derives the provider's agent type from the neutral root-apply request
and uses an exhaustive provider-owned all-agent map, avoiding a Podman
switch or new dependency in central orchestration.
- Adds internal lifecycle documentation and source-boundary coverage.
Production registry selection, persisted post-commit recovery, GPU/local
inference, installer qualification, and supported activation remain
later #7744 gates.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] 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: documentation changes
describe an internal dormant lifecycle contract; no command, option,
default, or supported runtime is exposed.
- [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: the implementation
binds every mutation to exact engine, process, runtime, volume, image,
and journal authority; ambiguity and drift fail closed.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer reviewed the completed changes
- Result: `no-public-docs-needed`
- Evidence: `src/lib/onboard/managed-bootstrap/README.md` and
`src/lib/onboard/lifecycle-contracts.md` record the internal dormant
contract; public documentation would incorrectly imply supported Podman
activation.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 085adae -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable to this dormant CPU/bootstrap
transaction slice.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Native rootless Podman qualification remains
workflow-owned and the parent #8276 exact-head CPU proof is green.

## 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 validate:pr` passed after refreshing the target branch when
hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `79/79` focused managed-bootstrap
tests, `8/8` source-boundary tests, and `3/3` Podman workflow-contract
tests pass on exact head `085adaee04b7`; all four exact-head CodeRabbit
threads are fixed and resolved.
- [x] Applicable broad local gate passed — repository architecture, CLI
and plugin typecheck, source-shape, test-size, conditional scan,
formatting, and exact-delta secret scanning pass.
- [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) — not
applicable; no user-facing docs changed.
- [ ] Doc pages follow the style guide (doc changes only) — not
applicable.
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— not applicable.

---
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 managed-image onboarding and runtime orchestration for faster
sandbox creation without legacy image builds.
  * Added Docker managed-bootstrap persistence and recovery support.
* Added sandbox lifecycle support for qualified rootless Podman
environments.

* **Bug Fixes**
* Rebuilds now stop safely when workload configuration or runtime
authority changes.
  * Improved preservation of managed images during sandbox recreation.

* **Tests**
* Expanded end-to-end coverage for managed-image onboarding, rebuild
safety, Docker, and Podman lifecycle behavior.

<!-- 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>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
@cv
cv merged commit 310c988 into feat/buildless-managed-activation-b3d Aug 5, 2026
50 checks passed
@cv
cv deleted the feat/podman-native-cpu-proof-v2 branch August 5, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: architecture Architecture, design debt, major refactors, or maintainability area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery feature PR adds or expands user-visible functionality integration: dcode LangChain Deep Code integration behavior integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images v0.0.103 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants