Skip to content

fix(onboard): harden managed startup contracts - #7973

Merged
senthilr-nv merged 54 commits into
mainfrom
feat/buildless-managed-contract-hardening
Aug 1, 2026
Merged

fix(onboard): harden managed startup contracts#7973
senthilr-nv merged 54 commits into
mainfrom
feat/buildless-managed-contract-hardening

Conversation

@ericksoa

@ericksoa ericksoa commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces the dormant provider-neutral runtime bundle and cross-runtime E2E foundation required by #7744 while preserving the currently shipped Docker and Kubernetes behavior. Runtime mutation and cleanup now fail closed when durable provider or workload authority cannot be proved, and the managed-startup, messaging, registry, and evidence boundaries reject ambiguous state before mutation.

Related Issue

Part of #7744. The accepted issue plan independently defines this slice's ownership, lifecycle, compatibility, security, and validation scope; GitHub merge state was not used as product approval.

Changes

  • Compose the shipped Docker and Kubernetes behavior through one validated runtime-provider bundle consumed by compute planning, doctor, start, stop, inference mutation, rebuild, registration, and destructive cleanup. runtime-provider-contract.test.ts and runtime-provider-source-shape.test.ts protect the single-bundle contract and fail-closed authority boundary.
  • Persist validated managed-image and legacy-Dockerfile workload receipts. Invalid receipts now block load or save, shared images are retained, and per-sandbox image removal requires exact recorded ownership with a bounded Docker timeout.
  • Keep managed startup and messaging apply or clear intent explicit, reject malformed or cross-agent input before mutation, and retain secret-free profile and error contracts.
  • Add an inert cross-runtime E2E scenario, profile, matrix, provider-fixture, and parity-evidence foundation. No canonical target, workflow selector, live scenario, production provider registration, CLI, configuration, default, or support claim activates it.
  • Address all actionable CodeRabbit and PR Review Advisor findings with regression coverage for readiness, cleanup identity, parity evidence, stale provider identity, absent or retained registry rows, cleanup timeouts, immutable contracts, fixture authority, spy isolation, and invalid workload-receipt persistence.
  • Update test/e2e/docs/README.md to document the inert foundation and artifact-redaction boundary without claiming production support.

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: No user-facing product behavior changes. Contributor documentation was updated for the inert E2E foundation.
  • 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: Codex Desktop reviewed exact head 047c5dcf316093204ccbde0a1af25d6d2b11b1a5; all nine repository security-review categories passed with no actionable finding. The final production fix narrows destructive cleanup by revalidating authority under the destination lock, and the subsequent test-only rewrite preserves that proof without adding conditional-growth debt. This is an agent review, not a human review.
  • 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: docs-updated
  • Evidence: test/e2e/docs/README.md; the reviewer confirmed the scenario, profile, matrix, provider-fixture, parity-evidence, non-dispatch, and artifact-redaction claims against the exact source, and confirmed the lock-bound authority recheck preserves the documented force-restore workflow.
  • 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 — command/result or justification: The refreshed exact head passed all snapshot-focused tests (100/100), CLI and plugin builds, and CLI and plugin type-checks under Node.js 22.19. The prior affected-test matrix passed 5,037 tests; isolated reruns cleared its Python-dependent and oclif-adapter failures. The remaining unchanged Hermes forward-watcher fixture fails only on this macOS host's temporary-directory ownership model and is outside the PR diff.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Local broad validation was attempted under task-local Node.js 22.19.0 and pinned Python dependencies. The unchanged Hermes forward-watcher host fixture did not pass locally; exact-head required GitHub checks remain the merge gate.
  • 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) — command exited successfully; Fern reported two warnings, so this stricter checkbox is not claimed.
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Exact-State Evidence

  • Reviewed head: 047c5dcf316093204ccbde0a1af25d6d2b11b1a5
  • Canonical base: upstream/main at ffc1ae6f438a0a16f37a184b4e6198dacf9223aa
  • Complete diff: 84 files, 7,811 insertions, and 735 deletions; intended scope remains the inert [Epic] Support native Podman with buildless managed onboarding #7744 runtime-contract and E2E-foundation slice plus review fixes.
  • Base refresh: signed non-force merge afd4f65e7b51ec790ff11b4c34b829ee0548fb77 incorporates current upstream/main without conflict or PR-scope change.
  • GitHub verification: all 54 displayed commits are Verified.
  • Product scope: approved independently by the accepted [Epic] Support native Podman with buildless managed onboarding #7744 plan.
  • Human approval: GitHub reports APPROVED; existing approvals are preserved under maintainer direction, and no new approval is requested.
  • Hardware evidence: not applicable because scripts/prepare-dgx-station-host.sh is unchanged. No hardware review is claimed.

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

ericksoa added 30 commits July 30, 2026 14:50
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>
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>
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>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Preserve the exact reviewed tree while moving the stacked base to merged PR3.3.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Preserve the exact reviewed tree while moving the stacked base to restacked PR3.4a.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Preserve the exact reviewed tree while moving the stacked base to restacked PR3.4b.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Carry the reviewed PR3.4b slice unchanged onto the CodeRabbit feedback fix for PR3.4a.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Carry the reviewed PR3.5 slice unchanged onto the CodeRabbit feedback restack through PR3.4b.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Carry the reviewed PR3.4b slice unchanged onto the serialized PR3.4a transaction contract.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Carry the reviewed PR3.5 slice unchanged onto the serialized PR3.4a transaction contract.

The review patch remains unchanged through PR3.4b.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Restack PR3.4b without changing its review patch.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Restack PR3.5 without changing its review patch.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
github-actions Bot and others added 2 commits July 31, 2026 20:17
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@test/e2e/support/e2e-runtime-matrix.test.ts`:
- Around line 331-338: Update RuntimeReadinessEvidence to be a discriminated
union permitting both ready: true and ready: false variants, preserving the
existing evidence fields as appropriate. Then update
provider.environment.prepare in the runtime matrix test to return the unready
result directly and remove the as unknown as RuntimeReadinessEvidence assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0c339b23-f6d4-43cf-b5b9-9284e6a79e2c

📥 Commits

Reviewing files that changed from the base of the PR and between e6fdd40 and 9817262.

📒 Files selected for processing (30)
  • ci/source-architecture-budget.json
  • src/lib/actions/inference-set-provider.ts
  • src/lib/actions/inference-set.ts
  • src/lib/actions/sandbox/destroy-execution.ts
  • src/lib/actions/sandbox/destroy-flow.test.ts
  • src/lib/actions/sandbox/destroy.ts
  • src/lib/actions/sandbox/snapshot-restore-test-fixture.ts
  • src/lib/actions/sandbox/snapshot.test.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/actions/sandbox/start.test.ts
  • src/lib/actions/sandbox/start.ts
  • src/lib/actions/sandbox/stop.test.ts
  • src/lib/onboard/managed-startup/onboard-profile.ts
  • src/lib/onboard/managed-startup/profile-builder.ts
  • src/lib/onboard/managed-startup/profile.ts
  • src/lib/onboard/runtime-provider/docker.ts
  • src/lib/onboard/runtime-provider/runtime-provider-contract.test.ts
  • src/lib/state/registry/persistence.ts
  • src/lib/state/registry/types.ts
  • src/lib/state/registry/workload.ts
  • test/e2e/docs/README.md
  • test/e2e/fixtures/e2e-test.ts
  • test/e2e/fixtures/runtime-provider.ts
  • test/e2e/support/e2e-parity-evidence.test.ts
  • test/e2e/support/e2e-runtime-foundation-types.test.ts
  • test/e2e/support/e2e-runtime-matrix.test.ts
  • test/helpers/runtime-provider-bundle.ts
  • test/image-cleanup.test.ts
  • test/registry.test.ts
  • test/runtime-provider-source-shape.test.ts
💤 Files with no reviewable changes (2)
  • test/e2e/fixtures/e2e-test.ts
  • src/lib/onboard/managed-startup/profile.ts
🚧 Files skipped from review as they are similar to previous changes (20)
  • src/lib/actions/sandbox/snapshot.test.ts
  • src/lib/actions/sandbox/stop.test.ts
  • src/lib/actions/inference-set-provider.ts
  • src/lib/actions/inference-set.ts
  • src/lib/actions/sandbox/start.ts
  • test/runtime-provider-source-shape.test.ts
  • src/lib/state/registry/types.ts
  • src/lib/onboard/managed-startup/profile-builder.ts
  • src/lib/state/registry/workload.ts
  • src/lib/actions/sandbox/snapshot-restore-test-fixture.ts
  • test/e2e/support/e2e-runtime-foundation-types.test.ts
  • src/lib/actions/sandbox/start.test.ts
  • src/lib/onboard/runtime-provider/runtime-provider-contract.test.ts
  • src/lib/actions/sandbox/destroy-flow.test.ts
  • src/lib/onboard/runtime-provider/docker.ts
  • src/lib/onboard/managed-startup/onboard-profile.ts
  • src/lib/actions/sandbox/destroy-execution.ts
  • test/e2e/fixtures/runtime-provider.ts
  • src/lib/actions/sandbox/destroy.ts
  • test/e2e/docs/README.md

Comment thread test/e2e/support/e2e-runtime-matrix.test.ts Outdated
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv

Copy link
Copy Markdown
Collaborator

Exact-head automated-review disposition

Head: cf3af8561c85d8c1c4eb2ae099f16c71a9843a07
Base: 90f73918eeed5dcef9fe5733608e0a40dc3a7411

All actionable CodeRabbit review threads are fixed, replied to with exact commit evidence, and resolved. This includes runtime readiness, mismatch cleanup for both identities, non-tautological parity coverage, current persisted provider identity, absent-registry handling, bounded Docker image removal, immutable-support assertions, the fixture cleanup block plan, and spy restoration. The later readiness-type finding is fixed by the ready: true | false discriminated union in cf3af8561.

The outside-diff major finding about silently dropping invalid workload receipts is fixed in 981726255: registry load and save now reject invalid receipts, with load/save regression tests.

Safe same-surface suggestions were adopted: inference mutation converts only provider-selection errors; start removes a non-null assertion; managed receipt versions are literal; managed repository validation derives from the canonical repository set; provider source-shape assertions name the source; agent capability tables own validation; proxy inputs are named by protocol; and unsupported lifecycle tests assert that no side effect runs.

The remaining non-actionable suggestions are explicitly dispositioned:

  • Moving the Kubernetes factory or extracting additional rebuild helpers would be an architecture refactor beyond this inert contract slice.
  • Removing the bounded runtime-receipt normalizer would discard the provider-neutral validation seam reserved by [Epic] Support native Podman with buildless managed onboarding #7744; it remains non-activating and directly tested.
  • Replacing doctor and destroy-flow test literals or reworking the catalog fixture would be test-style churn without changing the protected contract.
  • Retaining the resolved provider object during destroy execution is intentional: authority is proved under the mutation lock, while the separate post-delete warning rereads the retained registry row to report any later identity drift.
  • The registry normalizer is directly exercised as a validation boundary even though production persistence of that future receipt is not activated in this slice.
  • The prior advisor suggestion to document the destructive-cleanup source of truth is satisfied by the SOURCE_OF_TRUTH block on requireRuntimeProviderDestructiveCleanupAuthority and its named regression proof.

No actionable automated-review finding remains at the time of this comment. New exact-head automated results will still be reviewed before merge.

Security review

Codex Desktop reviewed the complete exact-head diff. This is an agent review, not a human review.

  1. Secrets and credentials — PASS: no credential material or key files added; gitleaks and private-key hooks passed; provider-controlled destroy errors are fully redacted.
  2. Input validation and sanitization — PASS: provider IDs, workload receipts, managed profiles, channel references, artifact IDs, and readiness evidence are bounded and fail closed.
  3. Authentication and authorization — PASS: no endpoint or authentication surface is added; destructive actions require recorded provider and workload authority.
  4. Dependencies and third-party libraries — PASS: no dependency or production image pin changes are in the diff.
  5. Error handling and logging — PASS: invalid state is rejected without silent data loss, cleanup aggregates failures, Docker removal is bounded, and logged provider errors are redacted.
  6. Cryptography and data protection — PASS: existing SHA-256 validation and canonical base64 checks are retained; no custom cryptography is introduced.
  7. Configuration and security headers — PASS: no HTTP header, port, container privilege, policy, or deployment configuration is weakened.
  8. Security testing — PASS: adversarial receipt, authority, readiness, cleanup, mutation-ordering, redaction, and parity regressions are covered.
  9. System security — PASS: provider selection is rechecked under mutation locks, destructive cleanup fails closed, and no client-only or mutable-name ownership inference is introduced.

No security finding remains. No hardware review is claimed.

@senthilr-nv senthilr-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for exact head cf3af85 against base 90f7391. I reviewed the current Files changed and approve this exact revision for merge, subject to all required CI and exact-pair E2E gates passing.

@senthilr-nv

Copy link
Copy Markdown
Collaborator

Exact-head automated-review disposition addendum for cf3af8561c85d8c1c4eb2ae099f16c71a9843a07: CodeRabbit’s remaining generic docstring-coverage warning is non-actionable for this repository. NemoClaw does not impose CodeRabbit’s 80% docstring heuristic; its checked-in writing guidance favors plain language and targeted explanatory text, and the repository-required static, documentation, and review checks govern this change. Adding boilerplate docstrings across this large contract slice would be unrelated churn. The exact-head PR Review Advisor reports 0 blockers, 0 warnings, and 0 suggestions, and all CodeRabbit review threads are resolved.

@senthilr-nv

Copy link
Copy Markdown
Collaborator

PR Review Advisor PRA-1 is addressed in 236d7e5. The new snapshot restore lifecycle regression forces the post-delete registry-removal outcome to blocked, verifies the durable destination row remains observable, and verifies replacement creation, registration, and state restore do not run. The exact-head lifecycle suite passes 18/18 on afd4f65e7b51ec790ff11b4c34b829ee0548fb77.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv

Copy link
Copy Markdown
Collaborator

PR Review Advisor PRA-1 from head afd4f65e7b51ec790ff11b4c34b829ee0548fb77 is addressed in bd1aae39934a456903a8c7bd1a42a12ac49ed24d. deleteSandboxForRestore now acquires the destination timer-bound lock before re-reading durable ownership, proving destructive cleanup authority, and stopping NIM. The regression changes the workload receipt at lock entry and verifies that NIM stop, OpenShell delete, provider cleanup, shields cleanup, registry removal, replacement creation, and registration all remain untouched. The exact-head snapshot-focused suite passes 100/100.

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv

Copy link
Copy Markdown
Collaborator

Exact-head follow-up for 047c5dcf316093204ccbde0a1af25d6d2b11b1a5: the prior codebase-growth-guardrails failure on bd1aae39934a456903a8c7bd1a42a12ac49ed24d is addressed. The authority-race regression remains intact, but its lock-entry receipt mutation now uses a branch-free Map lookup, removing the added conditional. Local exact-head evidence: snapshot restore lifecycle 19/19 passed, all snapshot-focused tests 100/100 passed, test-conditionals:scan passed, and diff-aware pre-commit/commit-message/pre-push checks passed.

@senthilr-nv
senthilr-nv merged commit 99d5b66 into main Aug 1, 2026
82 of 86 checks passed
@senthilr-nv
senthilr-nv deleted the feat/buildless-managed-contract-hardening branch August 1, 2026 00:49
@senthilr-nv senthilr-nv mentioned this pull request Aug 1, 2026
23 tasks
senthilr-nv added a commit that referenced this pull request Aug 1, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the canonical dated changelog entry for `v0.0.100` so the
maintainer release plan can verify the pre-tag documentation
prerequisite. The entry summarizes the user-facing changes merged since
`v0.0.99` and links to the relevant guides.

## Changes

- Add `docs/changelog/2026-07-31.mdx` with the exact `## v0.0.100`
heading.
- Cover restored OpenClaw pairing, transactional replacement, Deep
Agents Code, onboarding recovery, lifecycle cleanup, Hermes builds, host
provenance, documentation, and trusted E2E evidence.
- Distinguish active Docker and Kubernetes runtime-bundle enforcement
from the still-inactive managed shared-state transaction foundation.

## Source Coverage

The release entry maps the doc-impacting merged PRs in the
`v0.0.99..main` release range to `docs/changelog/2026-07-31.mdx`: #8021,
#8024, #7973, #8028, #7947, #7788, #7884, #8023, #7969, #8020, #7989,
#8000, #7907, #7942, #7567, #8013, #7955, #8017, #8014, #8015, #7629,
#7644, #7821, #7971, and #7991.

PR #7974 was reviewed after the final rebase and excluded because it
changes internal maintainer-skill attribution policy and tests only; it
does not change a user-facing product or documentation surface.

## 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
- [x] Existing tests cover changed behavior — justification: the
changelog contract test validates the dated entry, version heading, SPDX
form, and route constraints.
- [ ] Tests not applicable — justification:
- [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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/changelog/2026-07-31.mdx`; exact-head review passed
for `6093f44f`; writing rules and documentation style reviewed; `npx
vitest run test/changelog-docs.test.ts` passed 6/6; `npm run docs`
passed with zero Fern errors and two generic Fern upgrade notices.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 6093f44 -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable; no DGX Station host script changed.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## 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 `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run test/changelog-docs.test.ts` passed 6/6 at `6093f44f`.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not applicable to a dated
prose-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) —
validation passed with zero errors; Fern emitted two generic upgrade
notices.
- [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 changelog entry has the required parser-safe MDX SPDX header;
dated changelog entries intentionally do not use page frontmatter.

---

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Added release notes for v0.0.100.
* Documented improvements to restore pairing, sandbox replacement,
onboarding recovery, lifecycle cleanup, runtime handling, build support,
host readiness, and end-to-end validation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
ericksoa added a commit that referenced this pull request Aug 1, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the inert, provider-neutral managed-workload rebuild transaction
for the incremental buildless stack. The exact old workload and registry
row remain authoritative through replacement preparation, readiness,
state restore, and provider rebind. Only one exact compare-and-swap
publishes the replacement, and old-runtime retirement happens afterward
through provider-owned opaque handles.

This slice does not wire a production rebuild caller or activate
buildless onboarding. Snapshot/backup and durable recovery ownership
remain tracked in #7744 and are required before activation.

## Related Issue

Part of #7744

## Changes

- Capture a deep-frozen rebuild plan bound to the exact provider,
shipped agent, platform, prior managed receipt, full durable-row
revision, lifecycle generation, and live identity fingerprint.
- Pre-render and validate the exact replacement image, startup profile,
receipt, and safe metadata before provider mutation.
- Define provider-neutral prepare, create, readiness, restore,
provider-rebind, rollback, abort-preparation, and retire-previous phases
using opaque exact handles rather than sandbox-name deletion.
- Keep partial prepare/create cleanup transaction-idempotent and run
abort cleanup even when post-prepare registry revalidation throws.
- Publish only through exact old-authority CAS; reconcile ambiguous
persistence against either the exact replacement or exact old row.
- Preserve the staged replacement and return an immutable recovery task
when publication is indeterminate, avoiding rollback of a replacement
that may already be durable.
- Retire the exact old runtime only after publication; return a
durable-owner recovery task if retirement remains pending.
- Bind replacement contracts and startup profiles to OpenClaw, Hermes,
or DCode authority and reject provider, agent, platform, receipt,
generation, or identity drift.
- Reject malformed provider artifacts at every transition, stop before
later phases, and prove exact transaction abort or exact staged-handle
rollback.
- Document the shared backup boundary and the durable recovery ownership
tracked in #7744 before activation.

## Type of Change

- [x] 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: The transaction is inert with
no production caller or support claim; the internal README records
ownership boundaries for later slices.
- [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: Exact-head audit covers
immutable authority, pre-mutation validation, CAS ambiguity, abort
cleanup, exact-handle rollback, and deferred recovery ownership.
- [ ] 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: `docs-updated`
- Evidence: The reviewed 23-file, `+4,272/-0` slice remains
byte-identical after the append-only current-main refresh to
`0de2789608a86e580d787991e81c03c5f0b14dbf` through
`e97ecce48c7fcc1dfb398e1cfae8c81a859b7dcd`; stable patch ID remains
`dd1c4a899fd9a62954a00d4e2e61da445a306e03`. The only documentation path
is `src/lib/onboard/managed-workload/rebuild/README.md`. It accurately
states that the transaction is dormant, has no CLI command or
production-action importer, and does not activate buildless rebuilds. It
assigns ambiguous publication and pending retirement to durable
recovery, links recovery and snapshot/backup ownership to the live
accepted epic #7744, and requires normalized backup manifests, restore
validation, durable reconciliation, and protected qualification for
OpenClaw, Hermes, and LangChain Deep Agents Code before activation.
Production-import and command/action diff scans found no activation
caller. Markdownlint passed with zero issues on the exact refreshed
head. The append-only parent refresh to `362a70cda` preserves the exact
reviewed slice diff and changes no reviewed documentation.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 362a70c -->
<!-- docs-review-agents-blob-sha: 3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- Exact locally validated head/base:
`e97ecce48c7fcc1dfb398e1cfae8c81a859b7dcd` /
`0de2789608a86e580d787991e81c03c5f0b14dbf`
- Review budget: 23 files, `+4,272/-0`.
- Stable exact-slice patch ID:
`dd1c4a899fd9a62954a00d4e2e61da445a306e03`.
- [x] The six implementation/review commits and both maintainer refresh
commits are SSH-signed and contain DCO trailers; GitHub-generated
conflict-resolution merge commits preserve append-only branch history.
- [x] `npm run validate:pr` passed on the exact clean head with Node
22.16.0.
- [x] 132 focused rebuild transaction, workload authority, registry CAS,
and source-boundary tests passed again on the exact refreshed head; CLI
typecheck and repository checks also passed; changed test files add zero
`if` statements.
- [x] `npm run build:cli`, CLI typecheck through `validate:pr`,
exact-base pre-commit, commitlint, and pre-push gates passed.
- [x] Failure tests prove prepare/create ambiguity aborts exact
transaction resources, staged failures roll back only exact staging
authority, and indeterminate CAS never rolls back.
- [x] Agent-binding tests reject cross-agent image/profile drift for all
shipped managed-image agents.
- [x] No snapshot manifest dependency, production rebuild callsite,
runtime selection change, or public activation exists in this slice.
- [ ] Applicable broad gate passed — exact-head required CI, advisors,
CodeRabbit, multiarch, and protected E2E are the broad remote gates.

## Stack

- Base: live `main` at `0de2789608a86e580d787991e81c03c5f0b14dbf`; PR3.1
through PR3.6 content is already landed, with #7976, #7988, and #7990
carried once through the final #7973 aggregate tree.
- This slice: PR3.7 branch `feat/managed-workload-rebuild-parity` at
`e97ecce48c7fcc1dfb398e1cfae8c81a859b7dcd`.
- Epic #7744 tracks shared snapshot, backup, restore, and durable
recovery ownership before activation.
- Buildless support remains disabled until OpenClaw, Hermes, and DCode
plus required multiarch and protected qualification pass together.

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 workload rebuild workflows with staged replacement,
validation, rollback, recovery, and atomic commit handling.
* Added authority validation for managed workloads, including receipt,
image, platform, and startup configuration checks.
  * Added safe cloning and deep-freezing for supported immutable data.
* Added safeguards against stale, conflicting, or incomplete workload
state during rebuilds.

* **Documentation**
  * Documented rebuild recovery behavior and activation requirements.

* **Tests**
* Added comprehensive coverage for rebuild transactions, authority
validation, rollback, persistence reconciliation, and immutable data
handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: security Security controls, permissions, secrets, or hardening bug platform: container Affects Docker, containerd, Podman, or images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants