fix(rebuild): preserve Hermes default kanban board database - #7096
Conversation
kanban.db (a durable SQLite task board: tasks, comments, events, runs) and the kanban/ workspaces directory were not listed in the Hermes agent manifest state contract, so every sandbox rebuild silently dropped the board while restoring the rest of the agent state. Add kanban to state_dirs and kanban.db (sqlite_backup strategy, matching runtime/state.db) to state_files. Signed-off-by: tyeth <tyethgundry@googlemail.com>
|
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 Hermes durable-state manifest now includes ChangesHermes Kanban state
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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 `@agents/hermes/manifest.yaml`:
- Around line 87-91: Update the Hermes manifest’s kanban state configuration so
backupSandboxState does not recursively preserve ephemeral scratch workspaces.
Split the durable kanban data, such as worktree/dir state and run logs, from
scratch workspace paths and declare only the durable directory in stateDirs,
using the existing kanban layout and backup mechanisms.
🪄 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: a3891b4e-97f3-4c5c-8662-70ee2af8268b
📒 Files selected for processing (1)
agents/hermes/manifest.yaml
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
…pshot Addresses PR Review Advisor blocker PRA-1: the Hermes durable-state snapshot fixture pinned the pre-change contract (SOUL.md, .hermes_history, runtime/state.db only). - Seed kanban.db and kanban/workspaces content in the fixture - Extend the fake SSH shim: dir existence check reports kanban, pre-backup audit walks the seeded state dir for unsafe entries, tar handlers stream the kanban dir both ways, and the SQLite backup/restore handlers key on the target path so kanban.db and runtime/state.db stay distinct - Update backup/restore expectations for the expanded manifest contract - Add a negative case: an unsafe symlink inside kanban/ makes the pre-backup security audit reject the backup (NC-2227-04 coverage on the new writable state surface) Both tests pass locally: npx vitest run test/snapshot.test.ts -t Hermes / -t 'unsafe symlink'. Signed-off-by: tyeth <tyethgundry@googlemail.com>
|
Addressed Verified locally: |
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 `@test/snapshot.test.ts`:
- Around line 1420-1435: Update the fake audit walker around the local walk
function to report regular files with st.nlink > 1 as hard links, matching the
production audit’s output and rejection behavior. Add this handling before the
generic regular-file path while preserving existing symlink, directory, and
special-file reporting; avoid broad mocks that bypass the behavior under test.
🪄 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: 473f1ccc-1ef1-409f-b922-786eb381dc4e
📒 Files selected for processing (1)
test/snapshot.test.ts
The fake audit walker in the Hermes snapshot fixture claimed to mirror the production pre-backup audit but never reported regular files with st.nlink > 1, so fixture-based hard-link coverage would pass where production rejects. Emit an 'f' row for hard-linked regular files, matching find's -type f -a -links +1 branch. Both Hermes snapshot tests re-verified locally with vitest. Signed-off-by: tyeth <tyethgundry@googlemail.com>
The kanban coverage added for PRA-1 grew test/snapshot.test.ts past the 1500-line default ceiling (now 1598 lines). Add the ratchet entry at the file's exact current length, per the check's lower-the-budget contract (scripts/check-test-file-size-budget.mts rejects any headroom). Verified locally: npx tsx scripts/check-test-file-size-budget.mts passes (1627 files scanned). Signed-off-by: tyeth <tyethgundry@googlemail.com>
|
✨ Thanks for the fix. Adding the kanban board to the Hermes backup manifest ensures board tasks, comments, events, runs, and workspaces survive rebuilds. Ready for maintainer review. Related open issues: Related open issues: |
Preserve only the backward-compatible default-board SQLite database and explicitly exclude state that cannot be safely or completely archived by the current manifest contract. Co-authored-by: tyeth <tyethgundry@googlemail.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Deferred for the v0.0.88 review pass on exact head |
cv
left a comment
There was a problem hiding this comment.
Deferred at exact head 42116bf. Direct salvage added real Hermes kanban CLI rebuild persistence coverage and corrected backup-scope docs; non-secret CI and exact-head advisor review are green, and the credentialed fork E2E omission was recorded as a policy-approved audited skip. The deterministic gate still fails closed because GitHub returned empty PR associations for 32 approved attempt-2 workflow contexts, so this revision is not approval-ready.
cv
left a comment
There was a problem hiding this comment.
Approved. Security review: PASS. Preservation is limited to the default Hermes kanban SQLite database, uses SQLite-safe backup/restore behavior, and does not claim attachments or external workspaces. Focused snapshot and rebuild coverage passes; standard fork CI and the protected E2E decision remain merge gates.
|
Thanks everyone for picking this up! 💌 |
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry for NemoClaw `v0.0.89` before the release plan captures the tag commit. The entry summarizes the user-visible Station preparation, inference, recovery, policy-disclosure, and CLI-containment changes merged since `v0.0.88`. ## Changes - Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89` release heading, parser-safe SPDX comment, summary, and detailed bullets. - Link each shipped theme to the most specific published OpenClaw documentation routes. - Keep internal E2E, advisory-registry, and review-workflow refactors out of the user-facing release summary. Source summary: - #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 -> `docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station identity, package-state, PackageKit, DKMS, and reboot-handoff fixes. - #7242, #7221, #7186, #7164, and #6874 -> `docs/changelog/2026-07-20.mdx`: Summarize inference endpoint provenance, provider attachment, managed vLLM cleanup and progress, and Ollama selection guidance. - #7225, #7216, #7192, #7136, #7096, and #6910 -> `docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery guidance, rebuilt model routing, durable Hermes state, and gateway restart behavior. - #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective messaging-preset egress disclosure before policy mutation. - #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize structured output containment, terminal-safe route display, and Hermes forward cleanup. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This PR adds release-history prose only; the focused changelog contract test validates its required structure 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 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 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 — `mise exec node@22.23.1 -- npx vitest run test/changelog-docs.test.ts` (6 passed). - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this doc-only release entry. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — `mise exec node@22.23.1 -- npm run docs` completed with 0 errors and 2 existing site-wide 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) — the native changelog entry uses the required parser-safe MDX SPDX comment and does not use frontmatter. --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded DGX Station installation support for qualified GB300 and OTA-upgraded environments. * Preserved selected inference providers, endpoints, model pins, and tuning settings during sandbox creation and rebuilds. * Improved sandbox recovery by validating availability and stability before restarting services. * Added clearer policy output showing the complete effective messaging egress configuration. * **Bug Fixes** * Hardened status and inference route displays by sanitizing terminal control characters. * Improved Hermes uninstall behavior by stopping detached dashboard forwarding. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Summary
Hermes rebuild backup silently drops the backward-compatible default kanban board database. This change preserves only
~/.hermes/kanban.dbusing the existing online SQLite backup strategy.The sibling
kanban/tree is intentionally excluded. Named-board databases, attachments, worker logs, scratch workspaces, and externaldir/worktree targets need a separate durability design before they can safely enter the rebuild state contract.Related Issue
Partially addresses #7095
Changes
kanban.dbto the Hermesstate_filesmanifest withstrategy: sqlite_backup.kanbanout ofstate_dirsso the rebuild path does not make an incomplete or inconsistent archive of live and externally rooted state.test/snapshot.test.ts, removing the temporary file-size ratchet.Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, or equivalent targeted checks passed when hooks were unavailable — note: localprekwas unavailable; Biome, test-size, title-style, and diff checks passed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Responsible human: @tyeth (please review) — opened on their behalf by
tyeth-ai-assisted.Signed-off-by: tyeth tyethgundry@googlemail.com
Summary by CodeRabbit