fix(snapshot): verify idle dcode without ps - #6617
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe dcode activity probe was extracted into a dedicated module containing its shell script, state constants, type, and output parser. Snapshot logic now imports these definitions, with tests covering process fallback, fail-closed behavior, and sentinel parsing. ChangesDcode activity probe
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
3c5c3dc to
53909f8
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/lib/actions/sandbox/dcode-activity-probe.test.ts (1)
16-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winNo test covers the fail-closed branch when
/procscanning finds no readable processes at all.The PR objective states the existing fail-closed behavior "remains when neither
psnor/proccan verify a dcode runtime," but no test exercisessaw_proc_process == 0(e.g. an empty/inaccessibleprocRoot) to assertunverifiable/no-runtimesentinel output. Given this is the safety-critical branch protecting snapshot consistency, it's worth locking in with a regression test.🤖 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/actions/sandbox/dcode-activity-probe.test.ts` around lines 16 - 88, Add a regression test in the “dcode activity probe” suite using runProbeScriptWithProcessSources with psExitCode nonzero and no procCmdlines, then assert the probe exits successfully and emits the expected unverifiable/no-runtime sentinel for the fail-closed path when neither ps nor /proc verifies a runtime.
🤖 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 `@src/lib/actions/sandbox/dcode-activity-probe.test.ts`:
- Around line 33-35: Remove the conditional statement in the test setup around
homeHasDcodeRuntime. In the relevant test initialization, build an array
containing the .deepagents directory only when the condition is true, then
iterate over that array to call fs.mkdirSync, preserving behavior without adding
an if statement.
In `@src/lib/actions/sandbox/dcode-activity-probe.ts`:
- Around line 41-58: Normalize each `/proc/*/cmdline` value in the fallback scan
before appending it to `processes`: update the transformation in the
`command_line` assignment within the fallback block to replace or remove literal
newlines after converting NUL separators to spaces. Preserve one process per
line so `detect_dcode_processes` cannot interpret crafted argv content as a
separate fake process.
---
Nitpick comments:
In `@src/lib/actions/sandbox/dcode-activity-probe.test.ts`:
- Around line 16-88: Add a regression test in the “dcode activity probe” suite
using runProbeScriptWithProcessSources with psExitCode nonzero and no
procCmdlines, then assert the probe exits successfully and emits the expected
unverifiable/no-runtime sentinel for the fail-closed path when neither ps nor
/proc verifies a runtime.
🪄 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: 205316f7-fe33-4543-b57b-0d4936b33918
📒 Files selected for processing (4)
src/lib/actions/sandbox/dcode-activity-probe.test.tssrc/lib/actions/sandbox/dcode-activity-probe.tssrc/lib/actions/sandbox/snapshot.test.tssrc/lib/actions/sandbox/snapshot.ts
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/lib/actions/sandbox/dcode-activity-probe.ts (1)
48-52: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winNormalize embedded newlines in
/proc/*/cmdline.
tr '\000' ' 'preserves literal newlines in argv. A crafted argument such as\n123 dcodecan create a synthetic matching process-list line and falsely reportactive, unnecessarily blocking snapshots. Replace or reject embedded newlines before appending the command line, and add a regression test.🤖 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/actions/sandbox/dcode-activity-probe.ts` around lines 48 - 52, Normalize or reject embedded newline characters in the command line produced by the process scan before appending it to processes, preventing crafted argv values from creating synthetic process-list entries and false active matches. Update the scan logic around saw_proc_process and command_line, and add a regression test covering an argument containing a newline such as “\n123 dcode”.
🤖 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 `@src/lib/actions/sandbox/dcode-activity-probe.ts`:
- Around line 45-68: Update the process scan around detect_dcode_processes to
track unreadable cmdline entries and failed reads separately from readable
processes, including glob entries that cannot be inspected. If any process entry
is skipped or its cmdline read fails, mark the scan incomplete and emit dcode
probe state unverifiable before allowing idle or no-runtime; only classify the
sandbox as idle when the /proc scan completed without omissions and no active
process was detected.
---
Duplicate comments:
In `@src/lib/actions/sandbox/dcode-activity-probe.ts`:
- Around line 48-52: Normalize or reject embedded newline characters in the
command line produced by the process scan before appending it to processes,
preventing crafted argv values from creating synthetic process-list entries and
false active matches. Update the scan logic around saw_proc_process and
command_line, and add a regression test covering an argument containing a
newline such as “\n123 dcode”.
🪄 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: cd309e70-e163-4053-98c1-21f1513c0442
📒 Files selected for processing (4)
src/lib/actions/sandbox/dcode-activity-probe.test.tssrc/lib/actions/sandbox/dcode-activity-probe.tssrc/lib/actions/sandbox/snapshot.test.tssrc/lib/actions/sandbox/snapshot.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/actions/sandbox/snapshot.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/snapshot.ts
53909f8 to
aa8ad26
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/lib/actions/sandbox/dcode-activity-probe.ts (1)
45-57: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftFail closed when
/procvisibility is incomplete.Unreadable
cmdlinefiles and read failures are silently skipped. If any other process is readable, the scan can reportidleeven though an active dcode process was hidden, allowing a running sandbox to be snapshotted. Track skipped, failed, and empty reads as an incomplete scan and emitunverifiablebefore allowingidle; add regression coverage for partial visibility.This is the same unresolved incomplete-visibility failure mode reported in the previous review and conflicts with the PR’s fail-closed snapshot invariant.
Proposed fix
processes="" saw_proc_process=0 + proc_scan_incomplete=0 for cmdline in "$proc_root"/[0-9]*/cmdline; do - [ -r "$cmdline" ] || continue + if [ ! -r "$cmdline" ]; then + proc_scan_incomplete=1 + continue + fi pid="$(basename "$(dirname "$cmdline")")" - command_line="$(tr '\000\n\r' ' ' < "$cmdline" 2>/dev/null)" || continue - [ -n "$command_line" ] || continue + if ! command_line="$(tr '\000\n\r' ' ' < "$cmdline" 2>/dev/null)"; then + proc_scan_incomplete=1 + continue + fi + if [ -z "$command_line" ]; then + proc_scan_incomplete=1 + continue + fi saw_proc_process=1 ... done + [ "$proc_scan_incomplete" -eq 0 ] || { + [ "$has_dcode_runtime" -eq 1 ] && emit_dcode_probe_state unverifiable + emit_dcode_probe_state no-runtime + }🤖 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/actions/sandbox/dcode-activity-probe.ts` around lines 45 - 57, Update the `/proc` scan around the process-discovery loop and `emit_dcode_probe_state` handling to track unreadable, failed, and empty `cmdline` entries as an incomplete scan instead of silently skipping them. When visibility is incomplete, emit `unverifiable` before any `idle` result, while preserving the existing `no-runtime` behavior where appropriate. Add regression coverage for partial `/proc` visibility, including skipped and failed reads.
🤖 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 `@src/lib/actions/sandbox/dcode-activity-probe.test.ts`:
- Around line 39-46: Update the test setup around DCODE_BUSY_PROBE_SCRIPT to
avoid replacing shell source with the temporary procRoot path. Pass procRoot via
an environment variable or an explicit script-builder parameter, update the
probe invocation accordingly, and exercise the public probe boundary with a path
containing a single quote to verify behavior without relying on source-text
formatting.
---
Duplicate comments:
In `@src/lib/actions/sandbox/dcode-activity-probe.ts`:
- Around line 45-57: Update the `/proc` scan around the process-discovery loop
and `emit_dcode_probe_state` handling to track unreadable, failed, and empty
`cmdline` entries as an incomplete scan instead of silently skipping them. When
visibility is incomplete, emit `unverifiable` before any `idle` result, while
preserving the existing `no-runtime` behavior where appropriate. Add regression
coverage for partial `/proc` visibility, including skipped and failed reads.
🪄 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: cd51ce16-90e7-4c40-af3d-5f018381fb7e
📒 Files selected for processing (4)
src/lib/actions/sandbox/dcode-activity-probe.test.tssrc/lib/actions/sandbox/dcode-activity-probe.tssrc/lib/actions/sandbox/snapshot.test.tssrc/lib/actions/sandbox/snapshot.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/actions/sandbox/snapshot.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/snapshot.ts
aa8ad26 to
00d9e1e
Compare
There was a problem hiding this comment.
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 `@src/lib/actions/sandbox/dcode-activity-probe.test.ts`:
- Around line 62-80: Update the fallback tests in
runProbeScriptWithProcessSources to assert the complete observable output rather
than searching for a substring: compare output.trim() exactly with the expected
DCODE_PROBE_PREFIX plus idleDcodeRuntime or active sentinel, or parse the output
and assert the single returned state. Apply the same exact-result assertion to
the additional fallback cases around the referenced later block.
🪄 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: 26784327-0704-44da-8f23-6bf07249acc6
📒 Files selected for processing (4)
src/lib/actions/sandbox/dcode-activity-probe.test.tssrc/lib/actions/sandbox/dcode-activity-probe.tssrc/lib/actions/sandbox/snapshot.test.tssrc/lib/actions/sandbox/snapshot.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/actions/sandbox/snapshot.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/snapshot.ts
00d9e1e to
4b39b6c
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/actions/sandbox/dcode-activity-probe.ts (1)
86-93: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDerive the parser's state alternation from
DCODE_PROBE_STATEinstead of duplicating literals.The regex hardcodes
active|idle|unverifiable|no-runtime, duplicating the values already defined inDCODE_PROBE_STATE. If a state is renamed or added later, this regex can silently drift out of sync and either fail to parse a valid sentinel or (with a careless edit) widen the match unexpectedly.♻️ Proposed fix deriving alternation from the state map
export function parseDcodeProbeState(output: string): DcodeProbeState | null { const escapedPrefix = DCODE_PROBE_PREFIX.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + const stateAlternation = Object.values(DCODE_PROBE_STATE).join("|"); const matches = [ - ...output.matchAll(new RegExp(`^${escapedPrefix}(active|idle|unverifiable|no-runtime)$`, "gm")), + ...output.matchAll(new RegExp(`^${escapedPrefix}(${stateAlternation})$`, "gm")), ]; if (matches.length !== 1) return null; return (matches[0][1] as DcodeProbeState | undefined) ?? null; }🤖 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/actions/sandbox/dcode-activity-probe.ts` around lines 86 - 93, Derive the state alternation in parseDcodeProbeState from the keys or values of DCODE_PROBE_STATE rather than hardcoding active, idle, unverifiable, and no-runtime. Escape each derived state for regex safety, construct the alternation dynamically, and preserve the existing single-match and DcodeProbeState return behavior.
🤖 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/actions/sandbox/dcode-activity-probe.ts`:
- Around line 86-93: Derive the state alternation in parseDcodeProbeState from
the keys or values of DCODE_PROBE_STATE rather than hardcoding active, idle,
unverifiable, and no-runtime. Escape each derived state for regex safety,
construct the alternation dynamically, and preserve the existing single-match
and DcodeProbeState return behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a5a306aa-29b7-4ed2-b899-18f7903fc139
📒 Files selected for processing (4)
src/lib/actions/sandbox/dcode-activity-probe.test.tssrc/lib/actions/sandbox/dcode-activity-probe.tssrc/lib/actions/sandbox/snapshot.test.tssrc/lib/actions/sandbox/snapshot.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/actions/sandbox/snapshot.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/snapshot.ts
4b39b6c to
9667ea5
Compare
Signed-off-by: Ho Lim <subhoya@gmail.com>
9667ea5 to
8ad4bd6
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
Exact-head maintainer gate passed at e5ab98d. The sandbox-controlled proc-root redirect is removed: production hard-codes /proc, the hostile legacy env is ignored in tests, and GPT returned merge_as_is with all security categories passing. Ordinary CI, CodeRabbit, Verified commits, 52 focused tests, state-backup-restore, onboard-repair, and onboard-resume are green. upgrade-stale-sandbox is explicitly waived because it failed before PR behavior while the unchanged base image requested Debian’s unavailable curl=8.14.1-2+deb13u3 pin.
<!-- markdownlint-disable MD041 --> ## Summary Release-prep documentation for v0.0.81 now summarizes user-facing changes merged since v0.0.80. It also closes the Hermes dashboard-profile backup gap and distinguishes direct blueprint-runner actions from public host CLI commands. ## Changes - Add the `v0.0.81` section to `docs/about/release-notes.mdx` with links to the detailed user guides. - Document that Hermes rebuilds preserve `.hermes/dashboard-home/`, including Dashboard `MEMORY.md` and `USER.md`. - Update Hermes manual backup and restore examples to transfer those two profile files without copying generated configuration or the secret-bearing dashboard `.env`. - Explain the new per-item backup failure causes. - Clarify that migration snapshot retention fragments are direct-runner arguments and are not exposed by the host `nemoclaw` CLI. ### Source summary - #6445 -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/backup-restore.mdx`, and `docs/manage-sandboxes/workspace-files.mdx`: Summarize manifest-owned key-level restore and current-config authority. - #6617 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Record the fail-closed `/proc` fallback used to verify an idle Deep Agents runtime before snapshot creation. - #6685 -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/backup-restore.mdx`, and `docs/manage-sandboxes/workspace-files.mdx`: Document Hermes Web Dashboard profile persistence and safe manual transfer. - #6649 -> `docs/about/release-notes.mdx`: Summarize host-validated loopback compatible-endpoint routing through the sandbox gateway. - #6643 -> `docs/about/release-notes.mdx`: Summarize automatic `max_completion_tokens` handling for GPT-5 and o-series models. - #6661 -> `docs/about/release-notes.mdx`: Summarize bounded connection reuse for eligible provider-validation probes. - #6704 -> `docs/about/release-notes.mdx`: Record that direct blueprint apply stops instead of persisting incomplete state after provider or inference setup fails. - #6677 -> `docs/about/release-notes.mdx`: Summarize transactional recovery for legacy Docker containers whose managed supervisor disappeared after restart. - #6625 -> `docs/about/release-notes.mdx`: Record Hermes managed-startup persistence across direct Docker restarts. - #6597 -> `docs/about/release-notes.mdx`: Record final-sandbox gateway cleanup on macOS. - #6680 -> `docs/about/release-notes.mdx`: Summarize managed Deep Agents first-run and process-tree cleanup improvements. - #6647 -> `docs/about/release-notes.mdx`: Record fail-closed validation for the managed Deep Agents fetch CA bundle. - #6645 -> `docs/about/release-notes.mdx`: Summarize WhatsApp loopback pairing and trusted npm plugin provenance. - #6673 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Document stopped-sandbox backup remediation. - #6631 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Document per-item backup failure causes. - #6620 -> `docs/about/release-notes.mdx`: Record the created-but-not-ready sandbox lifecycle receipt. - #6664 -> `docs/about/release-notes.mdx`: Record prompt-aware onboarding progress output. - #6598 -> `docs/about/release-notes.mdx`: Summarize stale replay-result invalidation during resumed onboarding. - #6593 -> `docs/about/release-notes.mdx`: Summarize contextual OpenClaw audit findings for managed dashboard compatibility settings. - #6650 -> `docs/about/release-notes.mdx`: Record redaction of token-shaped URL query values. - #6638 -> `docs/about/release-notes.mdx`: Record the exact-path MCP `DELETE` policy recipe for session termination. - #5453 -> `docs/reference/host-files-and-state.mdx`: Clarify that snapshot retention actions belong to direct runner integrations and are not standalone host CLI commands. ### Skipped from docs-skip - #6633 matched the `openclaw-sandbox-permissive.yaml` path in `docs/.docs-skip` and produced no documentation in this update. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] 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 examples and routes. - [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; `npm run docs` 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: 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 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: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Added release notes for v0.0.81 covering state preservation, inference setup, sandbox recovery, session setup, pairing, diagnostics, and security policy updates. - Expanded backup and restore guidance to include dashboard profile files and clarify files that must not be copied. - Added dashboard profile persistence details to workspace and rebuild documentation. - Clarified snapshot retention guidance and the distinction between host CLI capabilities and direct runner actions. - Added more detailed backup failure reporting information. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Carlos Villela <cvillela@nvidia.com>
## Summary - Move the dcode snapshot activity probe into a focused helper module so the probe script can be tested directly. - Fall back to scanning `/proc/*/cmdline` when `ps -eo pid=,args=` is unavailable inside the sandbox. - Keep the existing fail-closed behavior when neither `ps` nor `/proc` can verify a dcode runtime, while allowing confirmed-idle dcode sandboxes to snapshot. ## Validation - `npx vitest run --project cli src/lib/actions/sandbox/snapshot.test.ts src/lib/actions/sandbox/dcode-activity-probe.test.ts` - `npm run typecheck` - `git diff --check` - `npx prek run --files src/lib/actions/sandbox/snapshot.ts src/lib/actions/sandbox/snapshot.test.ts src/lib/actions/sandbox/dcode-activity-probe.ts src/lib/actions/sandbox/dcode-activity-probe.test.ts --stage pre-commit` - `npm run check:diff` - `npm --prefix nemoclaw ci` Refs NVIDIA#6180 Signed-off-by: Ho Lim <subhoya@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved dcode activity detection when process details are unavailable, using fail-closed “unverifiable runtime” results. - Hardened probe output parsing to avoid incorrect idle/active classification when sentinels are ambiguous or contradictory. - **New Features** - Added a sandboxed dcode activity probe that reports a single machine-readable status/state (including active, idle, unverifiable, and no-runtime). - **Tests** - Expanded sandbox tests with simulated process environments to cover `ps` failures, incomplete visibility, and conflicting sentinel scenarios. - **Refactor** - Centralized dcode probe parsing and state constants for reuse in snapshot-creation eligibility checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Ho Lim <subhoya@gmail.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Release-prep documentation for v0.0.81 now summarizes user-facing changes merged since v0.0.80. It also closes the Hermes dashboard-profile backup gap and distinguishes direct blueprint-runner actions from public host CLI commands. ## Changes - Add the `v0.0.81` section to `docs/about/release-notes.mdx` with links to the detailed user guides. - Document that Hermes rebuilds preserve `.hermes/dashboard-home/`, including Dashboard `MEMORY.md` and `USER.md`. - Update Hermes manual backup and restore examples to transfer those two profile files without copying generated configuration or the secret-bearing dashboard `.env`. - Explain the new per-item backup failure causes. - Clarify that migration snapshot retention fragments are direct-runner arguments and are not exposed by the host `nemoclaw` CLI. ### Source summary - NVIDIA#6445 -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/backup-restore.mdx`, and `docs/manage-sandboxes/workspace-files.mdx`: Summarize manifest-owned key-level restore and current-config authority. - NVIDIA#6617 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Record the fail-closed `/proc` fallback used to verify an idle Deep Agents runtime before snapshot creation. - NVIDIA#6685 -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/backup-restore.mdx`, and `docs/manage-sandboxes/workspace-files.mdx`: Document Hermes Web Dashboard profile persistence and safe manual transfer. - NVIDIA#6649 -> `docs/about/release-notes.mdx`: Summarize host-validated loopback compatible-endpoint routing through the sandbox gateway. - NVIDIA#6643 -> `docs/about/release-notes.mdx`: Summarize automatic `max_completion_tokens` handling for GPT-5 and o-series models. - NVIDIA#6661 -> `docs/about/release-notes.mdx`: Summarize bounded connection reuse for eligible provider-validation probes. - NVIDIA#6704 -> `docs/about/release-notes.mdx`: Record that direct blueprint apply stops instead of persisting incomplete state after provider or inference setup fails. - NVIDIA#6677 -> `docs/about/release-notes.mdx`: Summarize transactional recovery for legacy Docker containers whose managed supervisor disappeared after restart. - NVIDIA#6625 -> `docs/about/release-notes.mdx`: Record Hermes managed-startup persistence across direct Docker restarts. - NVIDIA#6597 -> `docs/about/release-notes.mdx`: Record final-sandbox gateway cleanup on macOS. - NVIDIA#6680 -> `docs/about/release-notes.mdx`: Summarize managed Deep Agents first-run and process-tree cleanup improvements. - NVIDIA#6647 -> `docs/about/release-notes.mdx`: Record fail-closed validation for the managed Deep Agents fetch CA bundle. - NVIDIA#6645 -> `docs/about/release-notes.mdx`: Summarize WhatsApp loopback pairing and trusted npm plugin provenance. - NVIDIA#6673 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Document stopped-sandbox backup remediation. - NVIDIA#6631 -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Document per-item backup failure causes. - NVIDIA#6620 -> `docs/about/release-notes.mdx`: Record the created-but-not-ready sandbox lifecycle receipt. - NVIDIA#6664 -> `docs/about/release-notes.mdx`: Record prompt-aware onboarding progress output. - NVIDIA#6598 -> `docs/about/release-notes.mdx`: Summarize stale replay-result invalidation during resumed onboarding. - NVIDIA#6593 -> `docs/about/release-notes.mdx`: Summarize contextual OpenClaw audit findings for managed dashboard compatibility settings. - NVIDIA#6650 -> `docs/about/release-notes.mdx`: Record redaction of token-shaped URL query values. - NVIDIA#6638 -> `docs/about/release-notes.mdx`: Record the exact-path MCP `DELETE` policy recipe for session termination. - NVIDIA#5453 -> `docs/reference/host-files-and-state.mdx`: Clarify that snapshot retention actions belong to direct runner integrations and are not standalone host CLI commands. ### Skipped from docs-skip - NVIDIA#6633 matched the `openclaw-sandbox-permissive.yaml` path in `docs/.docs-skip` and produced no documentation in this update. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] 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 examples and routes. - [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; `npm run docs` 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: 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 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: Carlos Villela <cvillela@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Added release notes for v0.0.81 covering state preservation, inference setup, sandbox recovery, session setup, pairing, diagnostics, and security policy updates. - Expanded backup and restore guidance to include dashboard profile files and clarify files that must not be copied. - Added dashboard profile persistence details to workspace and rebuild documentation. - Clarified snapshot retention guidance and the distinction between host CLI capabilities and direct runner actions. - Added more detailed backup failure reporting information. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
/proc/*/cmdlinewhenps -eo pid=,args=is unavailable inside the sandbox.psnor/proccan verify a dcode runtime, while allowing confirmed-idle dcode sandboxes to snapshot.Validation
npx vitest run --project cli src/lib/actions/sandbox/snapshot.test.ts src/lib/actions/sandbox/dcode-activity-probe.test.tsnpm run typecheckgit diff --checknpx prek run --files src/lib/actions/sandbox/snapshot.ts src/lib/actions/sandbox/snapshot.test.ts src/lib/actions/sandbox/dcode-activity-probe.ts src/lib/actions/sandbox/dcode-activity-probe.test.ts --stage pre-commitnpm run check:diffnpm --prefix nemoclaw ciRefs #6180
Signed-off-by: Ho Lim subhoya@gmail.com
Summary by CodeRabbit
psfailures, incomplete visibility, and conflicting sentinel scenarios.