Commit 5f92696
authored
fix(onboard): accept Hermes startup CMD in root helper (#9511)
<!-- markdownlint-disable MD041 -->
## Summary
Hermes managed startup could reach the root helper with Docker-appended
image `CMD` arguments, but the helper rejected that valid process shape
before recording its durable fence. This change accepts trailing
arguments only after the fixed `nemoclaw-start` position while
preserving complete process identity binding.
## Related Issue
Fixes #9485
## Changes
- Authenticate the exact `/usr/local/bin/nemoclaw-start` path when it is
direct or immediately interpreted by an allowed Bash path, including
Docker-appended trailing `CMD` arguments.
- Continue hashing and fencing the complete argument vector, and reject
bare, prefixed, or reordered startup-script forms.
- Model Docker named-volume state in the mutation harness and verify
recovery when the durable-volume acquire succeeds but its response is
lost.
- Documentation writer review found no documentation change is needed
because this restores the existing managed Hermes topology without
changing commands, configuration, defaults, or user workflow.
## 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
<!-- Check one tests line. Check other lines when applicable. Add every
requested justification or approval reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests 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: Complete diff reviewed
for exact process identity, parent and UID checks, full argument
hashing, durable-volume recovery, and fail-closed negative forms.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:
## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or 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:
`vitest` root-helper integration, 11/11 passed; Docker, Podman, and
persisted-engine lifecycle suite, 83/83 passed; `npm run build:cli` and
`npm run typecheck:cli` 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)
- [ ] 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)
---
<!-- 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: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved recognition of supported `nemoclaw-start` launch commands,
including Docker-appended arguments and approved Bash invocation paths.
- Tightened validation to reject unsupported or reordered command
formats.
- Improved recovery handling when durable-volume state acquisition
responses are lost.
- **Tests**
- Expanded coverage for bind-mounted and managed-volume state
configurations.
- Added validation across multiple runtime command layouts and volume
metadata scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>1 parent 96e05c7 commit 5f92696
4 files changed
Lines changed: 47 additions & 17 deletions
File tree
- scripts
- src/lib/onboard/runtime-provider
- test
- helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
2402 | 2403 | | |
2403 | 2404 | | |
2404 | 2405 | | |
2405 | | - | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
2406 | 2409 | | |
2407 | | - | |
2408 | | - | |
| 2410 | + | |
| 2411 | + | |
2409 | 2412 | | |
2410 | 2413 | | |
2411 | 2414 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
538 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
539 | 544 | | |
540 | 545 | | |
541 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
| 166 | + | |
| 167 | + | |
160 | 168 | | |
161 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
162 | 173 | | |
163 | 174 | | |
164 | 175 | | |
| |||
229 | 240 | | |
230 | 241 | | |
231 | 242 | | |
232 | | - | |
| 243 | + | |
233 | 244 | | |
| 245 | + | |
234 | 246 | | |
| 247 | + | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
| |||
483 | 482 | | |
484 | 483 | | |
485 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
486 | 490 | | |
487 | 491 | | |
488 | 492 | | |
| |||
1273 | 1277 | | |
1274 | 1278 | | |
1275 | 1279 | | |
1276 | | - | |
| 1280 | + | |
1277 | 1281 | | |
1278 | 1282 | | |
1279 | 1283 | | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1280 | 1289 | | |
1281 | 1290 | | |
1282 | 1291 | | |
| |||
0 commit comments