fix(shields): attest private mutable Hermes topology - #7049
Conversation
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@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>
…ate-shields-root Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
📝 WalkthroughWalkthroughThe Hermes guard now attests runtime topology, reconciles mutable ChangesHermes topology and shields posture
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Shields
participant RuntimeConfigGuard
participant LifecycleMarker
participant HermesRoot
Shields->>RuntimeConfigGuard: finish-shields-transition
RuntimeConfigGuard->>LifecycleMarker: attest runtime topology
LifecycleMarker-->>RuntimeConfigGuard: return topology state
RuntimeConfigGuard->>HermesRoot: reconcile and enforce metadata posture
RuntimeConfigGuard->>HermesRoot: fsync metadata for root-separated topology
HermesRoot-->>RuntimeConfigGuard: return final metadata
RuntimeConfigGuard-->>Shields: commit transition or abort on drift
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/runtime-config-guard.py`:
- Around line 766-793: The _attested_shields_runtime_topology function must
revalidate lifecycle and startup-ready marker state after
_openshell_supervised_nonroot_start_is_live completes. Before returning
"same-uid-nonroot", resample _root_lifecycle_marker_state and
_startup_ready_marker_absent, return "unknown" or fail closed if either no
longer matches the initial state, and preserve the existing root-separated
validation behavior.
In `@src/lib/shields/legacy-hermes-compat.test.ts`:
- Around line 293-304: Update the rollback assertions in the test around
commandFromCall to verify protocol order, not just command presence: assert
prepare-shields-abort occurs before the run-state-dir-transition state lock
command, which occurs before abort-shields-transition. Preserve the existing
guard-action and state-lock checks while deriving and comparing their command
positions in the recorded commands.
In `@test/e2e/live/hermes-shields-config.test.ts`:
- Around line 113-115: Update the assertion in the Hermes shields E2E test to
derive or declare the fixture’s topology and require mode 3770 when the
lifecycle marker indicates root separation, while allowing 700 only for the
same-UID topology. Keep the check at the public command-output boundary and
remove the alternation that accepts 0700 for root-separated execution.
🪄 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: e643bc79-f9cc-4a06-aed9-95da011ad74a
📒 Files selected for processing (5)
agents/hermes/runtime-config-guard.pysrc/lib/shields/index.tssrc/lib/shields/legacy-hermes-compat.test.tstest/e2e/live/hermes-shields-config.test.tstest/hermes-runtime-config-guard-topology.test.ts
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. |
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry required before the v0.0.85 release plan can be generated. The entry summarizes the user-visible OpenShell, DGX Station, inference, MCP, onboarding, and recovery changes merged since v0.0.84 and links to their owning guides. ## Changes - Add `docs/changelog/2026-07-16.mdx` with the exact `## v0.0.85` heading, parser-safe SPDX comment, release summary, and detailed bullets. - Link every documented theme to its most specific published OpenClaw guide routes. - Reconcile the release entry with these merged source PRs: - #6726 -> `docs/changelog/2026-07-16.mdx`: Document the supported OpenShell v0.0.85 upgrade, immutable consumed artifacts, multiline exec, credential rewrite diagnostics, and child-process TLS boundary. - #6986 -> `docs/changelog/2026-07-16.mdx`: Document managed MCP behavior shared across supported agents. - #6991 and #7045 -> `docs/changelog/2026-07-16.mdx`: Document qualified DGX Station host preparation and the interactive-terminal boundary for `--station-deepseek`. - #6992, #7001, #7006, and #7044 -> `docs/changelog/2026-07-16.mdx`: Document managed-model reasoning behavior, safe inference route mutation, and verified vLLM served aliases. - #6865, #7010, and #7028 -> `docs/changelog/2026-07-16.mdx`: Document onboarding DNS recovery, explicit notice acceptance, and upgrades with user-local OpenShell. - #7005, #7021, #7029, and #7049 -> `docs/changelog/2026-07-16.mdx`: Document rebuild backup safety, no-dashboard state, managed gateway discovery, and Hermes shields topology checks. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `test/changelog-docs.test.ts` validates the canonical heading, parser-safe SPDX comment, and detailed entry structure; the docs build validates published routes. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## 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 — `npx vitest run test/changelog-docs.test.ts` passed 6/6. - [ ] 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 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) — passed with 0 errors and 2 pre-existing Fern warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [x] New doc pages include SPDX header and frontmatter (new pages only) — native changelog entries use the required parser-safe MDX SPDX comment instead of frontmatter. --- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for NemoClaw v0.0.85. * Documented improvements to compatibility, credential handling, setup validation, recovery workflows, endpoint configuration, gateway discovery, and runtime validation. * Added links to relevant user-guide sections. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Summary
Supersedes #7033 with an append-only maintainer follow-up that preserves every original commit by Prekshi Vyas. It keeps the intended private Hermes root support while requiring descriptor-safe lifecycle-marker and process-topology attestation before accepting or repairing that state.
Related Issue
Refs #6381
Changes
Type of Change
Quality Gates
Verification
Verifiedin GitHubnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Targeted evidence: the topology suite passed (3 host tests; 2 platform-gated), the Docker-backed real-root rollback case passed independently, the legacy shields suite passed (14/14), Python compilation and CLI typecheck passed, and changed-file hooks plus title, size, source-shape, Biome, Docker-abstraction, and diff checks passed. Fresh exact-head CI and trusted E2E are pending.
Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit