Skip to content

fix(messaging): keep build plan out of image env - #6737

Merged
cv merged 7 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-5896-messaging-plan-env
Jul 13, 2026
Merged

fix(messaging): keep build plan out of image env#6737
cv merged 7 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-5896-messaging-plan-env

Conversation

@HOYALIM

@HOYALIM HOYALIM commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep NEMOCLAW_MESSAGING_PLAN_B64 available to Docker build steps without persisting it in final OpenClaw or Hermes image environments
  • preserve the validated reduced runtime-plan artifact used by startup and rebuild flows
  • add source-shape and runtime-plan regressions for both agents

Validation

  • npx vitest run test/messaging-image-env-contract.test.ts test/messaging-build-applier.test.ts
  • npm run build:cli
  • npm run typecheck:cli
  • npm run check:diff

Refs #5896

Signed-off-by: Ho Lim subhoya@gmail.com

Summary by CodeRabbit

  • Security

    • Treated NEMOCLAW_MESSAGING_PLAN_B64 as build-time only, ensuring it is not exported into the final container runtime environment.
  • Reliability / Tests

    • Expanded Dockerfile environment contract coverage to handle both modern and legacy ENV syntaxes, including multiline continuations.
    • Parameterized runtime plan/startup checks to cover both supported agent flavors and validate required startup phases and environment handling.
  • CI / Automation

    • Added a new “messaging plan boundary” CI job and workflow validation to enforce image boundary rules for both agent types.

Copilot AI review requested due to automatic review settings July 13, 2026 02:34

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@copy-pr-bot

copy-pr-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Dockerfiles no longer persist NEMOCLAW_MESSAGING_PLAN_B64 in final image environments. New utilities, workflow checks, and tests verify reduced messaging-plan artifacts and runtime isolation for OpenClaw and Hermes.

Changes

Messaging plan image boundary

Layer / File(s) Summary
Remove messaging plan runtime exports
Dockerfile, agents/hermes/Dockerfile, test/messaging-build-applier.test.ts, test/messaging-image-env-contract.test.ts, ci/source-shape-test-budget.json
The messaging plan remains build-time configuration, while Dockerfile contract tests cover both agent flavors and verify the variable is absent from runtime environments.
Generate and verify agent image boundaries
scripts/check-messaging-plan-image-boundary.mts, test/messaging-plan-image-boundary.test.ts
Agent-specific plans, reduced artifacts, rendered configuration evidence, Docker environment checks, and leakage rejection are implemented and tested.
Build and validate boundary images in CI
.github/workflows/sandbox-images-and-e2e.yaml, tools/e2e/sandbox-images-workflow-boundary.mts, test/e2e/support/sandbox-images-workflow-boundary.test.ts
CI builds and verifies OpenClaw and Hermes boundary images, while workflow validation enforces isolation, ordering, timeouts, and non-publication of probe artifacts.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant DockerBuild
  participant BoundaryVerifier
  participant RuntimeImage
  CI->>DockerBuild: Generate plan and build OpenClaw or Hermes image
  BoundaryVerifier->>RuntimeImage: Inspect environment and reduced artifact
  BoundaryVerifier->>RuntimeImage: Read agent-specific rendered configuration
  BoundaryVerifier-->>CI: Report boundary validation result
Loading

Possibly related PRs

Suggested labels: area: ci

Suggested reviewers: cv, ericksoa, apurvvkumaria

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: keeping the build plan out of the final image environment.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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/messaging-image-env-contract.test.ts`:
- Around line 12-24: Update dockerfileEnvNames to recognize legacy Docker ENV
key-value syntax in addition to NAME=value assignments, including continued
directives, so keys such as NEMOCLAW_MESSAGING_PLAN_B64 are recorded and
contract checks cannot be bypassed.
🪄 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: 04b0c4db-8869-4182-954f-5555c0b4ebb1

📥 Commits

Reviewing files that changed from the base of the PR and between deed1aa and d85c69c.

📒 Files selected for processing (5)
  • Dockerfile
  • agents/hermes/Dockerfile
  • ci/source-shape-test-budget.json
  • test/messaging-build-applier.test.ts
  • test/messaging-image-env-contract.test.ts

Comment thread test/messaging-image-env-contract.test.ts Outdated
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard, messaging-plan-image-boundary
Optional E2E: messaging-compatible-endpoint, hermes-sandbox-secret-boundary

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: target/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard: Required validation floor: changed production Dockerfiles can affect clean-host installation and hosted onboarding image construction.
  • messaging-plan-image-boundary: Run the new isolated real-image workflow job to prove both OpenClaw and Hermes retain build-time Teams rendering/package evidence while excluding the complete messaging plan from final image and process environments.

Optional E2E

  • messaging-compatible-endpoint: Provides an adjacent end-to-end OpenClaw onboarding, messaging configuration, inference, and assistant-turn check after changing messaging-plan image handling.
  • hermes-sandbox-secret-boundary: Useful regression coverage for the Hermes production image's runtime secret boundary after changing its build-time messaging-plan handling.

New E2E recommendations

  • messaging (medium): Current real-image coverage validates synthetic Teams render and package evidence, but does not exercise a complete Teams-configured assistant lifecycle after onboarding for both supported agents.
    • Suggested test: Add a live, secretless Teams-compatible messaging lifecycle E2E that onboards OpenClaw and Hermes with a controlled Teams plan, starts each agent, and verifies the rendered channel is accepted without exposing the serialized plan.

@cv cv added the v0.0.82 label Jul 13, 2026
@HOYALIM
HOYALIM force-pushed the codex/issue-5896-messaging-plan-env branch from d85c69c to 450f6af Compare July 13, 2026 05:38

@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/messaging-image-env-contract.test.ts`:
- Around line 12-30: Update dockerfileEnvNames to distinguish Dockerfile ENV
syntax using only the first token: treat it as modern assignment form when that
token contains “=”, otherwise parse the first token as the legacy variable name
and ignore “=” characters in its value. Extend the existing “recognizes modern
and legacy Dockerfile ENV forms” test with a legacy value ending in base64
padding, such as “eyJhIjoxfQ=”, and expect only the declared variable name.
🪄 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: 23c98928-2192-4a9b-93ea-2f35cfa520bd

📥 Commits

Reviewing files that changed from the base of the PR and between d85c69c and 450f6af.

📒 Files selected for processing (5)
  • Dockerfile
  • agents/hermes/Dockerfile
  • ci/source-shape-test-budget.json
  • test/messaging-build-applier.test.ts
  • test/messaging-image-env-contract.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • ci/source-shape-test-budget.json
  • test/messaging-build-applier.test.ts
  • agents/hermes/Dockerfile
  • Dockerfile

Comment thread test/messaging-image-env-contract.test.ts
Signed-off-by: Ho Lim <subhoya@gmail.com>
@HOYALIM
HOYALIM force-pushed the codex/issue-5896-messaging-plan-env branch from 450f6af to 57e6ffe Compare July 13, 2026 06:30
@wscurran wscurran added area: messaging Messaging channels, bridges, manifests, or channel lifecycle area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images labels Jul 13, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for the security hardening work, @HOYALIM. Moving the messaging build plan to build-time only (ARG) and keeping it out of final OpenClaw and Hermes image environments is a solid improvement. Ready for maintainer review.


Related open issues:


Related open issues:

@cjagwani cjagwani self-assigned this Jul 13, 2026
cjagwani added 2 commits July 13, 2026 11:26
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@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 @.github/workflows/sandbox-images-and-e2e.yaml:
- Around line 242-273: Update the workflow job containing the OpenClaw and
Hermes boundary steps to ensure Node is pinned to version 22.6 or newer, or
enable check-latest for the Node 22 setup. Keep the existing .mts commands
unchanged and apply the runtime constraint to both build-and-verify steps.
🪄 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: 98d962c8-159d-426c-89ea-1957f097a428

📥 Commits

Reviewing files that changed from the base of the PR and between ff16f56 and ef02fce.

📒 Files selected for processing (5)
  • .github/workflows/sandbox-images-and-e2e.yaml
  • scripts/check-messaging-plan-image-boundary.mts
  • test/e2e/support/sandbox-images-workflow-boundary.test.ts
  • test/messaging-plan-image-boundary.test.ts
  • tools/e2e/sandbox-images-workflow-boundary.mts

Comment thread .github/workflows/sandbox-images-and-e2e.yaml
cjagwani added 3 commits July 13, 2026 11:48
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested tests passed

Run: 29277614078
Workflow ref: codex/pr-6737-image-boundary-f87b0a6d
Requested targets: (default — all supported)
Requested test IDs: cloud-onboard,rebuild-openclaw,rebuild-hermes,messaging-providers,hermes-e2e,messaging-compatible-endpoint
Summary: 6 passed, 0 failed, 0 cancelled, 0 skipped, 0 unknown

Test Result
cloud-onboard ✅ success
hermes-e2e ✅ success
messaging-compatible-endpoint ✅ success
messaging-providers ✅ success
rebuild-hermes ✅ success
rebuild-openclaw ✅ success

@cjagwani cjagwani 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 at exact head f87b0a6 after terminal standard CI/security/DCO, the exact-head disposable OpenClaw and Hermes image-boundary run (29276795188), the six-job live E2E run (29277614078), and the final trusted two-model Advisor run (29278916628). Terra and Nemotron both recommend merge_as_is with high confidence and no findings, warnings, or suggestions. All review threads are resolved. This approval does not merge the PR.

@cv
cv merged commit 05bf146 into NVIDIA:main Jul 13, 2026
122 checks passed
cv pushed a commit that referenced this pull request Jul 14, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Release-prep documentation for v0.0.82 now summarizes user-facing
changes merged since v0.0.81.
It also closes stale wording in the stopped-sandbox backup,
snapshot-clone, Ollama selection, and custom-policy authoring guidance.

## Changes

- Add the `v0.0.82` section to `docs/about/release-notes.mdx` with links
to the focused user guides.
- Document that snapshot clones receive a destination-owned dashboard
port before destructive replacement begins.
- Align `backup-all` guidance with eligible stopped Docker-driver
sandboxes that NemoClaw starts temporarily.
- Describe the running and stopped Ollama menu states without claiming
one fixed label.
- Document runtime rejection of catch-all hosts in custom policy files.

### Source summary

- [#6748](#6748) ->
`docs/about/release-notes.mdx`, `docs/manage-sandboxes/lifecycle.mdx`,
and `docs/reference/commands.mdx`: Summarize non-destructive sandbox
`stop` and `start` commands.
- [#6723](#6723) ->
`docs/about/release-notes.mdx`,
`docs/manage-sandboxes/backup-restore.mdx`, and
`docs/reference/commands.mdx`: Record temporary startup and cleanup for
eligible stopped-sandbox backups.
- [#6749](#6749) ->
`docs/about/release-notes.mdx` and
`docs/manage-sandboxes/backup-restore.mdx`: Document destination-owned
dashboard ports for snapshot clones.
- [#6764](#6764) ->
`docs/about/release-notes.mdx`: Summarize installer handling of
route-only onboarding placeholders.
- [#6771](#6771) ->
`docs/about/release-notes.mdx`, `docs/inference/set-up-vllm.mdx`,
`docs/inference/choose-inference-provider.mdx`,
`docs/reference/commands.mdx`, and
`docs/reference/platform-support.mdx`: Summarize managed-vLLM storage
gates, immutable image digests, and the explicit override boundary.
- [#6759](#6759) ->
`docs/about/release-notes.mdx`: Record early, actionable OpenShell
gateway-port conflict diagnostics.
- [#6753](#6753) ->
`docs/about/release-notes.mdx` and `docs/inference/set-up-ollama.mdx`:
Document truthful running and stopped Ollama menu states.
- [#6776](#6776) ->
`docs/about/release-notes.mdx`: Summarize proxy-independent loopback
readiness checks.
- [#6769](#6769) ->
`docs/about/release-notes.mdx`: Record compatible endpoint and agent
guidance when Chat Completions is unavailable.
- [#6730](#6730) ->
`docs/about/release-notes.mdx`: Summarize bounded reuse of an eligible
successful Chat Completions check.
- [#6768](#6768) ->
`docs/about/release-notes.mdx`: Record route-reservation repair during
resumed onboarding.
- [#6742](#6742) ->
`docs/about/release-notes.mdx`: Summarize pre-mutation resolution of
secret-free sandbox create intent.
- [#6721](#6721) ->
`docs/about/release-notes.mdx` and
`docs/get-started/quickstart-langchain-deepagents-code.mdx`: Record
bounded cleanup of completed managed Deep Agents headless sessions.
- [#6731](#6731) ->
`docs/about/release-notes.mdx` and
`docs/network-policy/customize-network-policy.mdx`: Document runtime
rejection of catch-all custom-policy destinations.
- [#6729](#6729) ->
`docs/about/release-notes.mdx` and `docs/get-started/prerequisites.mdx`:
Record the Node.js 22.19 minimum.
- [#6735](#6735) ->
`docs/about/release-notes.mdx` and
`docs/reference/platform-support.mdx`: Summarize the Ubuntu 26.04
userspace contract without claiming pending host or live validation.
- [#6775](#6775) ->
`docs/about/release-notes.mdx` and
`docs/resources/community-contributions.mdx`: Route independent
solutions outside canonical supported-product documentation.
- [#6740](#6740) ->
`docs/about/release-notes.mdx`: Summarize the semantic
dependency-upgrade contributor workflow.
- [#6777](#6777) ->
`docs/about/release-notes.mdx` and `docs/CONTRIBUTING.md`: Summarize the
route-safe documentation-refactor workflow.
- [#6741](#6741) ->
`docs/about/release-notes.mdx` and
`docs/security/openclaw-2026.6.10-dependency-review.md`: Summarize
reviewed npm archive verification and audit enforcement.
- [#6739](#6739) ->
`docs/about/release-notes.mdx` and
`docs/security/openclaw-2026.6.10-dependency-review.md`: Record the
locked offline dependency graph for the managed OpenClaw WeChat runtime.
- [#6737](#6737) ->
`docs/about/release-notes.mdx`: Record removal of the messaging build
plan from final OpenClaw and Hermes image environments.
- [#6733](#6733) ->
`docs/about/release-notes.mdx`: Summarize cached plugin dependency
layers for source and blueprint rebuilds.

### Skipped from docs-skip

- None. No commit or changed path in `v0.0.81..origin/main` matched
`openclaw-sandbox-permissive.yaml` or `config-show`, and the drafted
content contains none of the configured skip terms.

## 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 is a documentation-only
release-prep update; behavior is protected by the merged source PRs, and
the documentation build validates the changed routes and agent variants.
- [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 the DCO sign-off declaration 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 — tests are not applicable for this
documentation-only change.
- [ ] 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) — 0
errors; two pre-existing Fern warnings remain.
- [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)
— no new pages.

---
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
* Updated release notes with improvements to sandbox recovery,
onboarding, session management, policy validation, storage checks, and
system requirements.
  * Clarified Ollama setup instructions and status labels.
* Documented safer snapshot restoration, including dedicated ports and
protection against destructive failures.
* Expanded `backup-all` coverage to include eligible stopped sandboxes.
* Added guidance rejecting broad or catch-all network destinations in
custom policies.

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

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: messaging Messaging channels, bridges, manifests, or channel lifecycle area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants