Skip to content

fix(onboard): reject stale Deep Agents base inventories - #7810

Merged
jyaunches merged 1 commit into
mainfrom
fix/7809-dcode-base-security-inventory
Jul 29, 2026
Merged

fix(onboard): reject stale Deep Agents base inventories#7810
jyaunches merged 1 commit into
mainfrom
fix/7809-dcode-base-security-inventory

Conversation

@sandl99

@sandl99 sandl99 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Deep Agents Code onboarding now rejects a release base image that has the expected distribution version but an obsolete security package inventory. The resolver detects the incompatibility before completed-image construction and retains its existing release-refresh and local-build fallback behavior.

Related Issue

Fixes #7809

Changes

  • Require Deep Agents Code base images to match both the manifest distribution version and the immutable security package inventory.
  • Move the existing inventory probe to a shared base-image module because OpenClaw and Deep Agents Code must enforce one inventory definition. A second direct probe would let the two compatibility gates drift; deep-agents-code-base-image.test.ts protects the shared DCode consumer.
  • Add regression coverage that rejects the stale v0.0.96 inventory even when deepagents-code==0.1.34.
  • Preserve the existing resolver contract that refreshes the selected release once, builds the current base locally when required, and does not substitute mutable latest.

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 command, configuration, recovery, and resolver fallback contracts do not change. Existing docs already describe incompatible-image rejection and compatible local builds.
  • 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 completed the repository's nine-category security review on exact PR SHA 4fafec7ef; all categories passed with no findings. The probe uses constant shell input and runs without network access, Linux capabilities, writable filesystem access, or privilege escalation.
  • 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: Existing Deep Agents and base-image documentation already covers incompatible-image rejection, compatible local builds, exact override validation, and fail-closed behavior. No command, flag, configuration, schema, workflow, or recovery action changes.
  • 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 check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project cli src/lib/agent/deep-agents-code-base-image.test.ts src/lib/agent/base-image.test.ts src/lib/onboard/base-image.test.ts passed 31 tests; npx vitest run --project integration test/dcode-base-image-workflow.test.ts passed 4 tests; npm run test:changed passed 289 tests.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — Not run; focused CLI, integration, changed-test, type-check, and normal hook evidence cover this scoped compatibility validation.
  • 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: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Strengthened base-image validation to require an up-to-date immutable security package inventory.
    • Prevented otherwise compatible images from being accepted when their security inventory is outdated or invalid.
    • Improved validation details to clearly indicate both version and security-inventory requirements.
  • Tests

    • Added regression coverage for rejecting images with stale security inventories.
    • Expanded workflow and compatibility tests for the enhanced validation checks.

Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99 sandl99 self-assigned this Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Deep Agents Code base-image validation now requires both the expected package version and immutable security package inventory. The inventory probe is shared with OpenClaw, and tests cover stale inventory rejection and updated validation descriptions.

Changes

Base image security inventory validation

Layer / File(s) Summary
Shared inventory probe and OpenClaw wiring
src/lib/sandbox-base-image/security-inventory.ts, src/lib/onboard/base-image.ts
A locked-down Docker probe validates the inventory file’s ownership, permissions, symlink status, and contents; OpenClaw re-exports the shared validator.
Deep Agents Code validation and regression coverage
src/lib/agent/deep-agents-code-base-image.ts, src/lib/agent/*test.ts, test/dcode-base-image-workflow.test.ts
Deep Agents Code validation requires the expected version and inventory marker, with tests covering stale inventories and updated descriptions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#7667: Updates security package contents that the immutable inventory validation checks.
  • NVIDIA/NemoClaw#7679: Changes the underlying security inventory used by the shared validation probe.

Suggested labels: bug-fix, area: security, area: sandbox, platform: container

Suggested reviewers: cv, prekshivyas

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds the required inventory check, shares the inventory probe, and adds regression coverage for the stale base.
Out of Scope Changes check ✅ Passed The changed files all support the inventory-validation fix and regression coverage; no unrelated scope stands out.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: rejecting stale Deep Agents base inventories during onboarding validation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/7809-dcode-base-security-inventory

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

@github-code-quality

github-code-quality Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 4fafec7 in the fix/7809-dcode-base-... branch remains at 96%, unchanged from commit 125ca30 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 4fafec7 in the fix/7809-dcode-base-... branch remains at 81%, unchanged from commit cf34b72 in the main branch.

Show a code coverage summary of the most impacted files.
File main cf34b72 fix/7809-dcode-base-... 4fafec7 +/-
src/lib/onboard/base-image.ts 86% 80% -6%
src/lib/onboard...etson-groups.ts 100% 96% -4%
src/lib/agent/d...e-base-image.ts 86% 86% 0%
src/lib/sandbox...rce-identity.ts 88% 88% 0%
src/lib/tunnel/services.ts 73% 73% 0%
src/lib/sandbox...ty-inventory.ts 0% 100% +100%

Updated July 29, 2026 09:31 UTC

@github-actions

github-actions Bot commented Jul 29, 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 E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

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

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

Workflow run details

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

@sandl99 sandl99 added area: install Install, setup, prerequisites, or uninstall flow bug integration: dcode LangChain Deep Code integration behavior bug-fix PR fixes a bug or regression v0.0.98 and removed bug labels Jul 29, 2026
@jyaunches
jyaunches merged commit 7fcd808 into main Jul 29, 2026
101 of 103 checks passed
@jyaunches
jyaunches deleted the fix/7809-dcode-base-security-inventory branch July 29, 2026 13:20
@sandl99 sandl99 mentioned this pull request Jul 30, 2026
23 tasks
cv pushed a commit that referenced this pull request Jul 30, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical pre-tag release entry for NemoClaw v0.0.98.
The dated entry records the user-visible changes merged after v0.0.97
and links each release theme to its published documentation.

## Changes

- Add `docs/changelog/2026-07-29.mdx` with the exact `## v0.0.98`
release heading.
- Summarize Hermes 0.19, Deep Agents Code automation and skill safety,
readiness diagnostics, lifecycle recovery, uninstall behavior, messaging
conflicts, dependency hardening, and bounded diagnostics.
- Use the parser-safe MDX SPDX comment and root-absolute routes for
published OpenClaw, Hermes, and Deep Agents documentation.

### Source summary

- [#7849](#7849) ->
`docs/changelog/2026-07-29.mdx`: Record the Hermes 0.19 runtime
migration repairs for cron state, dashboard seeding, and MCP naming.
- [#7662](#7662) ->
`docs/changelog/2026-07-29.mdx`: Record bounded gateway and Docker
subprocess diagnostics.
- [#7850](#7850) ->
`docs/changelog/2026-07-29.mdx`: Record verified no-clobber Deep Agents
Code skill installation.
- [#7848](#7848) ->
`docs/changelog/2026-07-29.mdx`: Record post-reboot delivery-chain
recovery for visible OpenClaw sandboxes.
- [#7831](#7831) ->
`docs/changelog/2026-07-29.mdx`: Record OpenShell gateway-state
preservation during uninstall.
- [#7827](#7827) ->
`docs/changelog/2026-07-29.mdx`: Record the removal of upstream test
sources from published Hermes images.
- [#7775](#7775) ->
`docs/changelog/2026-07-29.mdx`: Record the blocking diagnostic for
unsupported `DOCKER_HOST` values.
- [#7833](#7833) ->
`docs/changelog/2026-07-29.mdx`: Record reviewed Python dependency
baselines for Hermes and Deep Agents Code images.
- [#7771](#7771) ->
`docs/changelog/2026-07-29.mdx`: Record the managed Hermes Agent 0.19.0
upgrade.
- [#7811](#7811) ->
`docs/changelog/2026-07-29.mdx`: Record fail-closed messaging channel
conflict handling.
- [#7797](#7797) ->
`docs/changelog/2026-07-29.mdx`: Record the managed non-interactive Deep
Agents Code JSON envelope.
- [#7782](#7782) ->
`docs/changelog/2026-07-29.mdx`: Record the storage-remediation
readiness capability.
- [#7784](#7784) ->
`docs/changelog/2026-07-29.mdx`: Record the 120-second OpenShell
readiness budget for sandbox recreation.
- [#7810](#7810) ->
`docs/changelog/2026-07-29.mdx`: Record rejection of stale Deep Agents
Code security inventories.

## 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:
`test/changelog-docs.test.ts` validates the native changelog contract,
including the version heading, MDX SPDX comment, and published routes.
- [ ] 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-29.mdx` was reviewed against
`docs/CONTRIBUTING.md` and `WRITING.md` for release meaning,
terminology, structure, voice, sentence form, MDX structure, published
routes, and code-sample presentation. The changelog contract passed 6
tests. The docs build completed with 0 errors and 2 existing Fern
warnings.
- Agent: Codex CLI
<!-- docs-review-head-sha: e3221d1 -->
<!-- docs-review-agents-blob-sha: c052d60 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable. `scripts/prepare-dgx-station-host.sh`
is unchanged.
- 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 — `npx vitest run
test/changelog-docs.test.ts` passed 6 tests.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not run for this
documentation-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 completed with 0 errors and 2 existing Fern 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)
— Native changelog entries use the required parser-safe MDX SPDX comment
and do not use frontmatter.

---
Signed-off-by: San Dang <sdang@nvidia.com>


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

## Summary by CodeRabbit

- **New Features**
- Added managed Hermes upgrades with verified releases, version
reporting, and preserved configuration contracts.
- Improved Deep Agents Code JSON output and skill installation behavior.
  - Added clearer Docker host and system readiness reporting.
  - Improved post-reboot delivery recovery and sandbox readiness timing.
- **Bug Fixes**
  - Preserved gateway state when uninstalling with `--keep-openshell`.
- Prevented conflicting messaging credentials from blocking onboarding
and rebuilds.
- Improved gateway diagnostics, dependency security, runtime filesystem
protection, and evidence handling.
- **Documentation**
  - Published the v0.0.98 release notes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: install Install, setup, prerequisites, or uninstall flow bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(onboard): reject stale Deep Agents base inventories

2 participants