Skip to content

fix(onboard): rebuild on messaging credential drift - #7853

Merged
cv merged 70 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-3631-credential-drift
Aug 13, 2026
Merged

fix(onboard): rebuild on messaging credential drift#7853
cv merged 70 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-3631-credential-drift

Conversation

@HOYALIM

@HOYALIM HOYALIM commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #8859 superseded this branch and merged the accepted messaging credential-drift fix into main as bcf8e6054.
The final conflict resolution retained current main for every overlapping implementation, test, and documentation file.
This pull request now contributes contributor history only and has no remaining file diff.

Related Issue

Related to #3631, resolved by #8859.

Changes

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: the merge candidate is tree-identical to current main; fix(onboard): rebuild on messaging credential drift #8859 owns the implementation and tests.
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: this pull request has no remaining documentation or user-facing behavior diff.
  • 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: fix(onboard): rebuild on messaging credential drift #8859 completed the credential-drift review and merged the canonical implementation; this merge candidate is tree-identical to current main.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

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

  • PR description includes a Signed-off-by: line and every existing PR commit appeared as Verified before the final merge refresh
  • Normal pre-commit and commit-msg hooks passed on the final merge commits
  • Targeted behavior tests are covered by current main; the final tree is byte-identical to main
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed

GitHub Actions

Fresh GitHub checks remain authoritative for the final merge commit.


Signed-off-by: Ho Lim subhoya@gmail.com
Signed-off-by: Charan Jagwani cjagwani@nvidia.com
Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Signed-off-by: Ho Lim <subhoya@gmail.com>
Copilot AI review requested due to automatic review settings July 29, 2026 20:38
@copy-pr-bot

copy-pr-bot Bot commented Jul 29, 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.

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.

@coderabbitai

coderabbitai Bot commented Jul 29, 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

Sandbox resume compares stored messaging credential hashes with environment credentials for active channels. Detected changes prevent reuse, validate replacement credentials, recreate the sandbox when required, and leave disabled channels unchanged.

Changes

Messaging credential drift

Layer / File(s) Summary
Credential drift detection
src/lib/onboard/machine/handlers/sandbox-messaging.ts, src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
Adds active-channel credential hash comparison, durable-plan selection, forced validation support, and tests for changed, unchanged, and disabled-channel credentials.
Resume decision and recreation wiring
src/lib/onboard/machine/handlers/sandbox.ts, src/lib/onboard/machine/handlers/sandbox-resume.ts
Loads registry messaging plans, propagates credential drift through resume decisions, and enables credential validation during sandbox recreation.
Drift integration and validation
src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts, src/lib/onboard/machine/handlers/sandbox-resume.test.ts, docs/reference/troubleshooting.mdx
Tests successful and rejected Telegram token rotation, disabled checkpoint channels, recreation decisions, and active-channel troubleshooting behavior.

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

Possibly related PRs

Suggested labels: area: security

Suggested reviewers: cv

Sequence Diagram(s)

sequenceDiagram
  participant Onboard
  participant SandboxResume
  participant CredentialDrift
  participant SandboxRegistry
  participant SandboxRuntime
  Onboard->>SandboxResume: resume existing sandbox
  SandboxResume->>SandboxRegistry: load registry messaging plan
  SandboxResume->>CredentialDrift: compare active-channel hashes with environment
  CredentialDrift-->>SandboxResume: messaging credential drift
  SandboxResume->>SandboxRuntime: validate credentials and recreate sandbox
  SandboxRuntime->>SandboxRegistry: store updated messaging plan
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes detect Telegram credential drift, validate replacements before destructive actions, preserve disabled channels, and trigger sandbox recreation for issue #3631.
Out of Scope Changes check ✅ Passed The code, tests, and troubleshooting updates directly support messaging credential drift handling and issue #3631.
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 and concisely describes the main change: rebuilding sandboxes when onboarding detects messaging credential drift.
✨ 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.

🧹 Nitpick comments (2)
src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts (2)

18-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the hoisted module mock.

This import-time vi.mock setup has no explanation. Add a short comment stating that messaging discovery is mocked to isolate credential-drift resume behavior. As per coding guidelines, import-time stubs must be documented.

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

In `@src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts` around
lines 18 - 20, Add a short explanatory comment immediately above the import-time
vi.mock for detectMessagingChannelsFromEnv, stating that messaging discovery is
mocked to isolate credential-drift resume behavior.

Source: Coding guidelines


64-72: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Assert the durable registry result after recreation.

These assertions verify the session hash and mocked remove/create calls, but not the PR’s durable contract: one registry entry for saved containing only the replacement hash and no raw credential. Add a public-boundary assertion against the resulting registry state.
As per path instructions, tests should prove observable behavior through the public boundary.

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

In `@src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts` around
lines 64 - 72, The test currently verifies session state and mocked sandbox
calls but not the durable registry contract. Extend the test around the
recreation flow to inspect the resulting registry through its public boundary,
asserting exactly one entry for “saved” containing only the replacement
credential hash and no raw credential; keep the existing session and call
assertions unchanged.

Source: Path instructions

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

Nitpick comments:
In `@src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts`:
- Around line 18-20: Add a short explanatory comment immediately above the
import-time vi.mock for detectMessagingChannelsFromEnv, stating that messaging
discovery is mocked to isolate credential-drift resume behavior.
- Around line 64-72: The test currently verifies session state and mocked
sandbox calls but not the durable registry contract. Extend the test around the
recreation flow to inspect the resulting registry through its public boundary,
asserting exactly one entry for “saved” containing only the replacement
credential hash and no raw credential; keep the existing session and call
assertions unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 60303fae-3b03-4bc2-beb8-8a5ceb5a50cd

📥 Commits

Reviewing files that changed from the base of the PR and between cd49b2f and d44c709.

📒 Files selected for processing (6)
  • src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.ts
  • src/lib/onboard/machine/handlers/sandbox-resume.test.ts
  • src/lib/onboard/machine/handlers/sandbox-resume.ts
  • src/lib/onboard/machine/handlers/sandbox.ts

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · low 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 match; normalized E2E selections differ; severity counts match.
5 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • token-rotation: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • channels-add-remove: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • channels-stop-start: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • messaging-providers: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • onboard-resume: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

Workflow run details

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

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

Maintainer security review — exact head f17c8894aff2552c08add35d4d1e674b7ca395aa against base 795de982e26b400009bf1fc0f3826845d79acc4d: PASS. No security findings. Diff fingerprint: 12d36c86f39aef3a93fe3f5a2771338c2dac662ce3c166e698e78f69a7184900.

  1. Secrets and credentials — PASS. The change compares only SHA-256 credential hashes. Raw token values are neither persisted nor logged, and disabled-channel bindings are excluded from drift-triggered recreation.
  2. Input validation and sanitization — PASS. Drift is bounded to canonical active channel IDs from the durable messaging plan; missing credentials remain non-events, and explicitly changed active credentials enter the existing validation flow.
  3. Authentication and authorization — PASS. Replacement credentials are validated through the existing channel setup before any sandbox deletion or recreation. No role, permission, or pairing boundary changes.
  4. Dependencies and third-party code — PASS. No dependency, lockfile, registry, image-source, or license changes.
  5. Error handling and logging — PASS. Validation failures occur before the destructive recreation edge; existing rollback behavior remains intact. Messages disclose only that drift occurred, never credential content.
  6. Cryptography and data protection — PASS. The existing credential-hash primitive is reused without algorithm or storage changes.
  7. Configuration and infrastructure — PASS. No new command, option, environment variable, network policy, capability, or filesystem-permission surface. Paused channels retain their current sandbox without unrelated churn.
  8. Security testing — PASS. Focused tests cover changed active credentials, unchanged/missing credentials, disabled-channel replacement credentials, and resume decision behavior. Three focused files passed 38/38; CLI typecheck, Biome, diff checks, secret scan, and npm run check:diff passed.
  9. Holistic security posture — PASS. The patch strengthens the fail-closed credential-rotation path by coupling the active-channel drift decision to validation before recreation while preventing unneeded destructive work for inactive channels.

Documentation writer result: docs-updated; npm run docs passed with 0 errors and 2 pre-existing warnings.

@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 `@docs/reference/troubleshooting.mdx`:
- Around line 726-728: Rewrite the new troubleshooting text around NemoClaw so
it addresses the reader directly in active voice and present tense, replacing
third-person references with second-person wording while preserving the existing
credential validation, backup, recreation, restore, and paused-channel behavior.
🪄 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: e0864382-415a-4fc2-a2ab-c57490c8738b

📥 Commits

Reviewing files that changed from the base of the PR and between d44c709 and f17c889.

📒 Files selected for processing (5)
  • docs/reference/troubleshooting.mdx
  • src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts

Comment thread docs/reference/troubleshooting.mdx Outdated
Signed-off-by: Ho Lim <subhoya@gmail.com>
@wscurran wscurran added area: messaging Messaging channels, bridges, manifests, or channel lifecycle area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: telegram Telegram integration or channel behavior labels Jul 29, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for the PR. This fixes credential drift detection by comparing explicitly supplied messaging credential hashes against the durable sandbox plan and entering the reconciliation path when they differ. Maintainers will review the hash comparison logic, registry cleanup, and test coverage for missing, unchanged, and replacement credentials.


Related open issues:

@HOYALIM

HOYALIM commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Current-head CI note for 8d144240adabbbe36901a32dd633af8312203a27: cli-test-shards (4) failed in the unchanged shared test test/mcp-lifecycle-lock.test.ts:436 because the expected corrupt lock file disappeared after the timeout assertion (ENOENT). This PR does not modify the MCP lifecycle lock implementation or test. On the exact head, the failing file passes 25/25 locally, and the three credential-drift/resume files pass 38/38. The failure is consistent with a loaded-run timing race between the 30 ms test timeout and 100 ms corrupt-lock grace, rather than this diff. I attempted to rerun only job 90742116177, but GitHub requires repository admin rights. Could a maintainer please rerun that failed shard? No code or no-op commit is warranted from the PR diff.

@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 exact head 8d144240adabbbe36901a32dd633af8312203a27 against base 795de982e26b400009bf1fc0f3826845d79acc4d (diff fingerprint faba59c22c4ae37d4b3f2500598c449c83a2b3cd4c876db845d3977aad811520). The credential-drift rebuild path was reviewed end to end: reconciliation validates messaging inputs before destructive recreation, completed checkpoints still detect drift before recreation, and rejected placeholder handling preserves the existing hash contract. Final security verdict is PASS; the last delta after that receipt is documentation only. All four commits are GitHub-verified, DCO/docs receipt/primary advisor/current threads are clean, normal CI passed after one unrelated temporary-lock retry, and protected E2E run 30503257538 passed cloud-onboard, onboard-repair, and onboard-resume with controller verification 30503239150.

@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 exact head 0e10adf14b9238a7f85592a40a4339b0ab6dd8f5 against current base d52d4599a18490e7f8efc6e8062296fffcbea4a7 (diff fingerprint faba59c22c4ae37d4b3f2500598c449c83a2b3cd4c876db845d3977aad811520). The only delta after the previously reviewed 8d144240a head is the current-main merge; the credential-drift behavior and prior PASS security verdict are unchanged. The current-main merge gate reports all 41 checks green, clean/mergeable state, no unresolved major CodeRabbit findings, risky-path test coverage, DCO compliance, and all five commits GitHub-verified. Protected E2E child run 30505198308 passed cloud-onboard, onboard-repair, and onboard-resume; controller run 30505176269 and the native exact-head gate both succeeded. Contributor/approver overlap for @cjagwani is surfaced as the repository's non-blocking advisory.

cjagwani
cjagwani previously approved these changes Jul 30, 2026

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

Exact-head approval after refresh onto current main. Deterministic maintainer gate passes with all 41 current checks green, clean merge state, verified history, and no unresolved major findings. Protected cloud-onboard, onboard-repair, and onboard-resume all passed on this head.

@github-actions github-actions Bot added v0.0.99 and removed v0.0.98 labels Jul 30, 2026
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

CI disposition for branch revision 201b64983:

  • The CLI shard 8 failure is the stale base-image path expectation also failing on current main; it is outside this credential-drift patch.
  • PR test(installer): harden readiness ID output coverage #8776 contains that base correction and the related installer repair. Its refreshed full CI run passes all CLI shards and aggregate checks.
  • The prior Advisor attempt was cancelled or unsuccessful, so it is not accepted as review evidence and will not be rerun on the stale base. After test(installer): harden readiness ID output coverage #8776 lands on main, this branch will be refreshed and must pass a new complete CI and Advisor cycle before approval or merge.

The +1,556-line increase remains flagged for large-change scrutiny. Contributor compliance, risky-path test coverage, documentation review, and the nine-category security review pass on the current branch.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
apurvvkumaria pushed a commit that referenced this pull request Aug 11, 2026
…eate (#8774)

## Problem

`nemoclaw <name> rebuild --yes` destroys the sandbox during preflight
and then fails to recreate it:

```text
Brave Search requires BRAVE_API_KEY or a saved Brave Search credential in non-interactive mode.
Recreate failed after sandbox was destroyed.
```

Exit code 1, sandbox left destroyed. Reported on Ubuntu 24.04 /
v0.0.105; the code is platform-independent.

## Root cause

`resolveWebSearchForCreation` required **two** proofs before reusing the
credential already registered with the sandbox's OpenShell gateway
provider: a session-scoped staged receipt **and** an exact live gateway
binding match.

The first is structurally unobtainable on rebuild:

- `runRebuildRecreatePhase` overwrites the session with
`createSession({...})` and rebuilds the checkpoint from
`deriveCheckpointFromSession` before calling `onboard --resume`
([rebuild-recreate-phase.ts:151-210](src/lib/actions/sandbox/rebuild-recreate-phase.ts#L151)),
so `stagedCredentialProviders` is `[]` and the checkpoint bindings are
empty.
- The only writer of that array runs in
`registerCompletedCredentialProviders` at
[sandbox.ts:1930/1943](src/lib/onboard/machine/handlers/sandbox.ts#L1930)
— **after** the read at `:1892`.

So the reuse branch was unreachable on every rebuild, and control fell
through to `ensureValidatedWebSearchCredential`, which throws under
`nonInteractive`
([web-search-flow.ts:283-288](src/lib/onboard/web-search-flow.ts#L283))
for a host key rebuild can never read.

This is the residual half of #7097. That change taught the **preflight**
to reuse the gateway binding
([`canReuseGatewayWebSearchCredential`](src/lib/actions/sandbox/rebuild-target-runtime.ts#L52))
on the stated premise that *"recreate reuses that gateway binding … so
the preflight accepts the same binding instead of demanding a host key
the recreate will never read."* That premise holds for the rest of
recreate but not for this one gate — which is why preflight destroys the
sandbox and recreate then refuses.

It also contradicts the shipped contract in
[recover-rebuild-sandboxes.mdx:216](docs/manage-sandboxes/recover-rebuild-sandboxes.mdx#L216),
which promises reuse on provider name + type + credential key with no
receipt clause, and matches
[`messaging-prep.ts:101-110`](src/lib/onboard/messaging-prep.ts#L101),
which already accepts the live binding alone for this same provider.

## Fix

Accept the recreate journal the replacement driver hands off as the
equivalent durable-ownership proof, in a new
`ownsGatewayWebSearchProvider`: the run must have been handed the
journal (`recreateJournalTargetIntentFingerprint`, set only by
[rebuild-recreate-phase.ts:271](src/lib/actions/sandbox/rebuild-recreate-phase.ts#L271)),
and that journal must name this sandbox, carry the same target-intent
fingerprint, and be past the delete boundary.

A journal merely resident in the session is deliberately **not**
accepted — nothing binds it to this run: one survives a failed attempt,
and `beginSandboxRecreateTransaction` opens one straight at `deleted`
when the sandbox is already missing.

The live gateway binding check is unchanged and still ANDed, so neither
proof can reuse a provider bound to anything but this sandbox on this
gateway. A host credential, when present, still takes precedence over
both.

Nothing downstream needed to change:
`preflightRequiredCredentialProviderBindings` accepts the surviving
matching provider with no planned token, the token-less def is filtered
before upsert, and `allRequiredBindingsLive` is satisfied by the live
binding.

## Scope

- `src/lib/onboard/machine/handlers/sandbox.ts` — the gate and its
rationale.
- `src/lib/onboard/lifecycle-contracts.md` — record the alternative
ownership proof and why a resident journal is not one.
-
`src/lib/onboard/machine/handlers/sandbox-rebuild-web-search-reuse.test.ts`
— new focused file, 10 cases.

Not in scope: the same shape exists on the messaging side, in the
`credentialNeedsValidation` predicate in
`selectionFromCompletedMessagingCheckpoint`
([sandbox-messaging.ts:353](src/lib/onboard/machine/handlers/sandbox-messaging.ts#L353)).
It is not reachable on the rebuild pass itself — `messagingDecision`
gates on `sandboxPromptProgress.messaging`, which rebuild's session
reset leaves false, so `reconcileSandboxMessaging` returns the
registry-authoritative plan first. But that pass persists the state that
detonates later: `checkpointMessaging`
([sandbox.ts:1286](src/lib/onboard/machine/handlers/sandbox.ts#L1286))
sets `messaging = true` unconditionally while nothing is staged without
a host token, so a rebuild that fails after that point leaves
`messaging=completed` with `stagedCredentialProviders=[]`, and the
recovery command rebuild prints (`onboard --resume --name <sb>`,
[rebuild-mcp-phase.ts:145](src/lib/actions/sandbox/rebuild-mcp-phase.ts#L145))
then throws at
[messaging-channel-setup.ts:140-146](src/lib/onboard/messaging-channel-setup.ts#L140).

That is deliberately left out of this PR: open PR #7853 already rewrites
that predicate and disarms it on exactly those routes, so fixing it here
would collide. Noted in [a comment on
#7853](#7853 (comment))
so the behaviour survives if that PR is narrowed. Traced by code
inspection, not reproduced at runtime.

## Maintainer Reviews

- Security review: PASS with no findings for the current branch revision
— #8774 (comment)
- Change size: 279 additions and 4 deletions; no large-LOC flag applies.

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: `docs/manage-sandboxes/recover-rebuild-sandboxes.mdx`
already documents matching gateway-provider credential reuse and failure
remediation; `npm run docs:sync-agent-variants` passed; documentation
build completed with 0 errors and 2 existing Fern warnings
- Agent: Codex Desktop
<!-- docs-review-head-sha: 27f3c92 -->
<!-- docs-review-agents-blob-sha: c4923a3 -->

## Verification

- New test file: the #8717 regression case fails on unpatched `main` and
passes with the fix; the other 9 pass on both.
- Negative cases pin every conjunct: journal not past `deleted`, journal
naming another sandbox, journal not handed to this run, handed journal
with a stale target intent, no journal and no receipt, live binding
mismatch (fails closed), host key present. The pre-existing
staged-receipt path is pinned unchanged.
- `src/lib/onboard/machine/handlers/` — 33 files, 376 tests, all pass.
`tsc -p tsconfig.src.json` clean. `npm run lint`, `checks:repository`,
`test-size:check`, `test:titles:check`, `test:imports:check` all pass.
Biome clean.
- 51 failures in `local-model-profile`, `setup-nim-flow`, `command`,
`created-sandbox-finalization`, `docker-llama-cpp-managed-lifecycle` and
`gateway-restart-hermes-drift` are pre-existing — verified
byte-identical on unpatched `main`.

Verified by unit test and by tracing the full recreate path; I have not
run a live `rebuild` against a Brave-backed sandbox, so QA
re-verification on hardware is worth having before this is treated as
closed.

Closes #8717

Signed-off-by: Dongni Yang <dongniy@nvidia.com>


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

## Summary by CodeRabbit

* **Bug Fixes**
  * Improved credential reuse during sandbox rebuilds.
* Reuses web-search credentials only when they are verified against the
correct sandbox and provider connection.
* Revalidates credentials when recovery information is missing,
incomplete, mismatched, or invalid.
* Preserves the correct precedence for host credentials and previously
staged credentials.

* **Documentation**
* Clarified recovery and credential-handling behavior for failed or
already-completed sandbox rebuilds.

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

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>

@prekshivyas prekshivyas 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.

Reviewed latest PR commit 4934f81ef under the messaging subsystem and nine-category security contracts; I found no new substantive blocker in the effective credential-drift patch.

Active manifest credential bindings are compared by hash without persisting/logging raw values; changed values enter existing channel validation before backup/deletion/recreation; stopped and disabled channels remain inactive; registry authority is rechecked under the mutation lock; provider restaging cannot reuse an older effect receipt; docs limit restoration to supported workspace and manifest-declared state. No new dependency, crypto, permission, command, or network-policy surface.

This remains a large +1,556/-118 security-sensitive change. Base 0cddc38c8 is behind current main, current required checks are absent, and the Nemotron advisor is red. Refresh and obtain exact-commit CI, advisor, documentation, security, E2E, and independent approval before merge.

senthilr-nv added a commit that referenced this pull request Aug 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Onboarding previously reused an active messaging provider when an
operator supplied a replacement credential, so the recreated sandbox
could retain the previous credential hash and provider binding.
This change detects supplied credential drift for active channels,
validates the available channel checks, registers the replacement, and
recreates the sandbox while preserving supported state.

## Related Issue

Fixes #3631

Supersedes #7853.

Transferred work retained from #7853:

- Ho Lim's credential-drift detection, recreation flow, regression
coverage, and credential-rotation documentation.
- Apurv Kumaria's validation-authority, fail-closed lifecycle,
race-handling, and expanded test work.
- Charan Jagwani's active credential-drift validation and
preservation-boundary hardening.

## Changes

- Compare each explicitly supplied active-channel credential with its
SHA-256 hash in the sandbox registry.
- Run the configured channel checks and register replacement messaging
providers before sandbox recreation.
- Keep stopped channels inactive and ignore credentials that the
operator did not supply.
- Recheck the authoritative messaging plan under the sandbox mutation
lock and stop before destructive recreation when channel state changes
concurrently.
- Persist only credential hashes in the registry, and document backup
boundaries, credential custody, recreation downtime, and required live
verification.
- Keep the repository formatter's existing gateway-restart line layout
so the all-files static check leaves the PR checkout unchanged.

## Notes

The non-interactive resume error now identifies the channels with
missing credentials while preserving the documented export-and-resume
procedure.
No command, option, default, or credential-custody boundary changes
beyond the documented credential-rotation behavior.

## 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:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [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: Codex Desktop reviewed
credential input, storage, logging, provider registration, mutation
locking, concurrent channel-state changes, and destructive recreation
boundaries. Raw credentials remain in the host environment and OpenShell
provider; the registry stores only SHA-256 identifiers. Available
validation failures and concurrent state changes stop before sandbox
replacement.
- [ ] 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: Verified exact head
`4c6d7f07ec6033a714d18959da4647f435bec7af`, parent
`265a85e41e344609890579346eaf1347b4fbfed8`, tree
`34fd94372d0834734d167ba000caab4a651bc103`, and byte identity with the
independently reviewed code candidate. The attribution-only head
contains the exact verified contributor identities retained from
superseded PR #7853 and does not change the tree. Reviewed the complete
14-file code, test, and documentation diff at patch SHA-256
`7fe1676ad466b3c8e9e1c5d4c65295f231527a4067778920f566287b816f1e69`.
Verified active-channel credential-drift detection, configured
validation limits, registry authority, stopped-channel preservation,
fail-closed recreation, credential custody, deep plan equality, and
channel-specific missing-credential reporting. Focused tests passed
133/133; CLI type-check and build passed; the all-files pre-commit lane,
diff check, and clean-worktree check passed. The final commit contains
an SSH signature and `Signed-off-by`.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 4c6d7f0 -->
<!-- docs-review-agents-blob-sha:
c4923a3 -->

## DGX Station Hardware Evidence

<!-- Not applicable: this change does not modify
scripts/prepare-dgx-station-host.sh. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## 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
src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
src/lib/onboard/machine/handlers/sandbox-credential-drift.test.ts
src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
src/lib/onboard/machine/handlers/sandbox-resume.test.ts
src/lib/onboard/messaging-channel-setup.test.ts
test/credential-rotation-docs.test.ts` passed 133 tests. `npm run
build:cli`, `npm run typecheck:cli`, and the all-files pre-commit lane
completed successfully.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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)
- [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)

`npm run docs` completed with 0 errors and 2 existing warnings.

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


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

## Summary by CodeRabbit

* **New Features**
* Detects changed messaging credentials during sandbox resume and
onboarding.
* Validates credentials before reuse or recreation, with safer recovery
when validation is incomplete.
* Preserves intentionally disabled channels during resume, repair, and
recreation.
* Supports reliable restoration of messaging configuration after
interrupted or failed operations.
* Improves non-interactive setup by validating supplied credentials and
avoiding unnecessary prompts.

* **Documentation**
* Expanded credential-rotation and troubleshooting guidance for
Telegram, Discord, Slack, WeChat, and Microsoft Teams.
* Documented validation limits, state backup and restoration,
channel-state behavior, and recreation downtime.

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

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Co-authored-by: Ho Lim <subhoya@gmail.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Charan Jagwani <cjagwani@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Current managed-image blocker\n\nThe workflow is already on attempt two, and all three direct managed-image jobs now fail at the same unchanged security-inventory assertion in their Dockerfiles. This PR changes credential-drift rebuild behavior and does not change the OpenClaw, Hermes, or Deep Agents Code security-package inventory.\n\nAll ordinary repository checks, all 12 CLI shards, documentation review, DCO, commit verification, CodeQL, and the focused credential-drift/security validation pass. The image failures require the base-image or managed-image owner to restore inventory coherence and provide a fresh complete run. I will not rerun the exhausted workflow.\n\nLarge-change flag: +1,556/−118 across 13 files.

@prekshivyas prekshivyas 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.

Reviewed the current head, code diff, required CI, advisor feedback, and resolved threads. No blocking code findings. Required checks are green. Approval is conditional on maintainer disposition of the auxiliary managed-image security-inventory failures because this touches a sensitive credential path.

senthilr-nv and others added 11 commits August 12, 2026 21:35
<!-- markdownlint-disable MD041 -->

Update three reviewed managed-image dependency boundaries. All managed
images now install Expat 2.8.3, both OpenClaw runtime locks select Hono
4.12.34, and Deep Agents Code selects `langgraph-checkpoint-sqlite`
3.1.1.

- Download the architecture-specific Debian `libexpat1=2.8.3-1` packages
from an immutable snapshot, verify their SHA-256 values, and assert the
installed dpkg and Python Expat identities in all three managed images.
- Override Hono to exact version 4.12.34 in the OpenClaw and mcporter
production graphs, refresh the locks and integrity bindings, and
document the compatibility boundary and removal condition.
- Add a hash-locked `langgraph-checkpoint-sqlite==3.1.1` constraint to
Deep Agents Code, refresh its lock, and assert the installed version
before publishing the image.
- Refresh the owning dependency-review records and security-package
contract tests.

- [ ] 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)

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [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: Reviewed the exact
Debian, npm, and Python artifact identities, checksums or integrity
values, advisory ranges, declared compatibility ranges, and removal
conditions. The independent documentation review passed on the final
commit.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `agents/langchain-deepagents-code/dependency-review.md`,
`agents/openclaw/dependency-review.md`,
`docs/security/openclaw-2026.7.1-dependency-review.md`, and
`docs/security/sandbox-base-2026-07-25-dependency-review.md`
- Agent: Codex Desktop
<!-- docs-review-head-sha: a5faa6a -->
<!-- docs-review-agents-blob-sha: c4923a3 -->

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

- [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: 101
focused package and image-contract tests passed before refresh; 80
focused audit-transition tests passed after refresh; normal hooks and
`git diff --check` passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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)
- [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)

Additional validation: the dependency-input Base Images run succeeded
for OpenClaw, Hermes, and Deep Agents Code on amd64 and arm64. `npm run
docs` completed with zero errors and the two existing hidden Fern
warnings.

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

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

* **Security Updates**
* Updated the Expat security package to version 2.8.3-1 across managed
images and runtime checks.
  * Pinned Hono to version 4.12.34 to address known advisories.
* Refreshed dependency audits, lockfile integrity checks, and security
inventories.

* **Dependency Updates**
  * Added SQLite checkpoint support for LangGraph with version 3.1.1.
* Updated dependency validation and package inventories for more
reliable builds and runtime verification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 250d4ab)
<!-- markdownlint-disable MD041 -->
## Summary

BuildKit in Base Images run 31619331540 published managed-image
attestations as workload-bound OCI artifacts, but the Base Images
verifier
still required the older image-config manifest shape. This change
validates
the current artifact encoding without weakening the exact workload, SLSA
v1,
or SPDX bindings, so publication evidence can complete after managed
images
pass runtime validation.

## Changes

- Require the exact Docker attestation artifact type, canonical inline
empty OCI config, and a subject descriptor whose digest and size match
the selected workload descriptor.
- Keep the existing requirement for exactly two in-toto layers: one
SLSA v1 provenance statement and one SPDX statement, with their full
build and workload identity checks unchanged.
- Update the verifier fixture to the current BuildKit encoding and add
negative coverage for a different artifact type, workload subject
digest or size, and inline empty-config data or digest.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This changes only the
internal registry-manifest parser used by the Base Images
publication-evidence gate. Managed-image behavior, public commands and
configuration, and the published SLSA v1 plus SPDX security contract
are unchanged.
- [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: Self-review applied all
nine security categories. The changed supply-chain trust boundary
remains fail-closed: the verifier accepts one exact Docker OCI artifact
shape, binds its subject digest and size to the selected workload,
verifies every descriptor against fetched bytes, and retains exact SLSA
v1 and SPDX statement validation. Focused negative tests reject altered
artifact type, subject identity, empty config, predicate cardinality,
statement bytes, and build identity.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: The four-file diff changes only internal CI verification. It
requires BuildKit's workload-bound OCI attestation artifact and
refreshes the
staging QA source from Expat 2.8.2 to 2.8.3. It does not change a public
command, configuration, user workflow, or managed-image runtime
behavior.
- Agent: Codex Desktop
<!-- docs-review-head-sha: e07f908 -->
<!-- docs-review-agents-blob-sha:
c4923a3 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable;
`scripts/prepare-dgx-station-host.sh` is unchanged.
- 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/managed-image-publication-evidence.test.ts
test/managed-image-publication-workflow.test.ts` passed 42/42; the
changed verifier also passed against the exact Hermes amd64 candidate
from Base Images run 31619331540, job 94191674141.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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)
- [ ] 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)

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

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved validation of image publication evidence to require the
canonical OCI attestation format.
* Ensured attestations are correctly tied to the published workload
image, including its digest and size.
* Added validation for the required artifact type and empty
configuration.

* **Tests**
  * Expanded coverage for valid attestation metadata.
  * Added checks to reject attestations with incorrect canonical fields.

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

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
(cherry picked from commit 7c721ae)
<!-- markdownlint-disable MD041 -->
## Summary

Upgrade Vim in all three managed base images from Debian `2:9.2.0782-1`
to checksum-pinned `2:9.2.0858-1`.
The new package pair contains the published fixes for `CVE-2026-73070`,
`CVE-2026-73072`, `CVE-2026-73074`, `CVE-2026-73076`, `CVE-2026-73077`,
and `CVE-2026-73078`.

## Changes

- Download the matching `vim-common` and architecture-specific
`vim-tiny` packages from Debian Snapshot `20260727T143429Z`.
- Verify the reviewed SHA-256 values before installation and reject
unsupported architectures.
- Assert the exact dpkg identities, Vim patch range `1-858`,
completed-image inventory, and clean package state across OpenClaw,
Hermes, and Deep Agents Code.
- Reject a stale runtime patch range in every base and completed-image
path.
- Record the artifact identities, security concern, removal condition,
and remaining multi-architecture publication gate.
- Register the updated completed-image verification instruction in the
existing remote-dashboard lifecycle integrity contract.

## 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: The package update changes no
user-facing command, configuration, policy, or workflow; the
repository-owned security dependency review is included.
- [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: Codex Desktop reviewed
commit `8abd6e3fa` against all nine security-rubric categories and found
no actionable issue. Artifact downloads remain HTTPS-only,
checksum-pinned, architecture constrained, and fail before installation
on integrity errors.
- [ ] 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/security/managed-base-vim-9.2.0858-dependency-review.md` records
the Vim package identities, security concern, affected image boundaries,
removal condition, and remaining publication and rescan gate. The merge
from current `main` does not change the PR documentation impact; the
lifecycle and managed-image CI contract updates preserve existing
documented behavior and need no additional documentation.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 677bbf1 -->
<!-- docs-review-agents-blob-sha: c4923a3 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable;
`scripts/prepare-dgx-station-host.sh` is unchanged.
- 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 — the remote-dashboard lifecycle,
managed security-package, and managed-image workflow suites pass, 94
tests total; repository checks and the source-shape security contract
pass.
- [ ] Applicable broad gate passed — GitHub CI remains the authoritative
broad and multi-architecture image gate.
- [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 passed with zero errors and two 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)
— this Markdown security review includes the required SPDX header;
frontmatter is not used for this directory.

---

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

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
(cherry picked from commit efce512)
<!-- markdownlint-disable MD041 -->
## Summary

Backport the upstream fixes for `CVE-2026-58050` and `CVE-2026-58051`
into the checksum-pinned libssh2 1.11.1 package used by all three
managed base images.
The package revision advances from `+nemoclaw1` to `+nemoclaw2` so image
inventory and runtime checks require the corrected build.

## Changes

- Add upstream commits `a9758da45a52bc8c630ec9493804d0c6ea30b24a` and
`7c8a170c6dca3cd4cf24de836f43ba1a20e662d5` to the existing reviewed
libssh2 patch bundle.
- Initialize each expanded public-key list entry before parsing or
cleanup.
- Reject oversized public-key packet fields above
`LIBSSH2_PACKET_MAXPAYLOAD`.
- Require `libssh2-1t64=1.11.1-1+deb13u1+nemoclaw2` in the builder,
completed images, immutable inventories, and test fixtures.
- Preserve the full upstream libssh2 test selection and add exact commit
and patch-contract checks.
- Record the new package contract, affected image boundaries, removal
condition, and remaining multi-architecture publication gate.

## 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: The package update changes no
user-facing command, configuration, policy, or workflow; the
repository-owned security dependency review is included.
- [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: Codex Desktop reviewed
commit `93f1899f9` against all nine security-rubric categories and found
no actionable issue. Source and original Debian packages remain
HTTPS-only and SHA-256 pinned; patch application, architecture, symbol,
soname, runtime, inventory, and package-state checks 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 subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence:
`docs/security/managed-base-libssh2-1.11.1-nemoclaw2-dependency-review.md`
records the reviewed artifacts, security concerns, package contract,
affected images, removal condition, and remaining publication and rescan
gates.
- Agent: Codex Desktop
<!-- docs-review-head-sha: f6171c1 -->
<!-- docs-review-agents-blob-sha: c4923a3 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable;
`scripts/prepare-dgx-station-host.sh` is unchanged.
- 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 — the native package, managed
security-package, remote-dashboard lifecycle, and managed-image workflow
suites pass, 101 tests total; the patched source also compiled
successfully against OpenSSL 3.
- [ ] Applicable broad gate passed — GitHub CI remains the authoritative
broad and multi-architecture image gate.
- [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 passed with zero errors and two 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)
— this Markdown security review includes the required SPDX header;
frontmatter is not used for this directory.

---

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

---------

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit ce96811)
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

PR #7853 is conclusively superseded by merged PR #8859.

Evidence:

No further implementation or CI remediation should be performed on this branch. I am leaving it open for the repository owner to close; no merge or closure action was taken here.

cv added 2 commits August 13, 2026 00:04
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

@cv cv 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.

Reviewed latest PR commit 636fbd8508d7ee273fbaa09726a0b7c43e0aec6e. PR #8859 already merged the canonical credential-drift fix. This candidate is tree-identical to current main, preserves contributor history, and introduces no additional code, documentation, or security change. Approval remains subject to current required checks and GitHub commit verification.

@cv
cv merged commit 3d22a59 into NVIDIA:main Aug 13, 2026
59 of 67 checks passed
cv added a commit that referenced this pull request Aug 13, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated release entry for NemoClaw v0.0.109 before
release planning captures the tag commit.
The entry reconciles all 70 PR-bearing commits after v0.0.108 and
records the no-diff superseded merge without attributing release
behavior to it.

## Changes

- Add `docs/changelog/2026-08-13.mdx` with the exact `## v0.0.109`
heading and parser-safe MDX SPDX comment.
- Group user-visible, contributor, and release-engineering changes with
root-absolute documentation routes.
- Link all 70 PRs in `v0.0.108..origin/main` exactly once, including the
explicit no-diff classification for PR #7853.

## 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
<!-- Check one tests line and one docs line. Check other lines when
applicable. Add every requested justification or approval reference. -->
- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates dated-entry structure,
parser-safe SPDX syntax, root-absolute links, version uniqueness, and
shared publication across all guide variants.
- [ ] 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
<!-- Required for code and documentation changes after the changes and
applicable validation are complete. Keep one review checkbox and one
instance of each visible or hidden field. For Evidence, list changed
documentation paths. For documentation-only changes, also state that the
writing rules and documentation style were reviewed. For other results,
explain why no documentation change is needed or why the review is
blocked. For Agent, use a consistent product and surface name, such as
Codex Desktop, Codex CLI, Claude Code, or Cursor. After committing all
review changes, put `git rev-parse --short HEAD` and `git rev-parse
--short HEAD:AGENTS.md` in the hidden metadata below. Rerun the review
and refresh that metadata after any new commit. This receipt is advisory
during the data-collection pilot. -->
- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/changelog/2026-08-13.mdx`; the subagent reviewed the
writing rules and documentation style.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 2bd3dcc -->
<!-- docs-review-agents-blob-sha: e30afb2 -->

## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving and
merging. This is human-reviewed evidence, not authenticated hardware
provenance. Exceptional bypasses use existing repository governance and
must be documented on the PR. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [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 tests; release coverage
check matched 70 exact PR links to 70 commits.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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)
- [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)

`npm run docs` exited with status 0. Fern reported two existing
environment/configuration warnings: unauthenticated redirect checking
and the existing light-mode accent contrast ratio.
The native changelog format uses an MDX SPDX comment and no frontmatter,
as required by `docs/CONTRIBUTING.md`.

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
  * Added the v0.0.109 changelog.
* Documented updates to launch readiness, sandbox behavior, inference,
gateway recovery, Hermes API and WhatsApp modes.
* Included notes on credential scanning, safety protections, managed
image hardening, uninstall cleanup, contributor tooling, and release
qualification.
  * Added related documentation links and pull request references.

<!-- 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: messaging Messaging channels, bridges, manifests, or channel lifecycle area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: telegram Telegram integration or channel behavior release-target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants