Repository navigation
fix(snapshot): retire unused host Python sanitizer - #12766
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe snapshot sanitizer boundary module was deleted. Snapshot tests now use a sandbox registry helper that accepts an optional agent, and the Hermes backup test checks that backup does not invoke host Python. An executable-proof test accepts an additional process state. ChangesSnapshot sanitizer and backup tests
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The inspected changes do not introduce a demonstrated backup, rebuild, or test risk; the reported Hermes rebuild path uses its managed sandbox interpreter rather than host Python. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The Ollama descendant-cleanup test change accepts Linux process state
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 6743094 in the Show a line coverage summary of the most impacted files.
TypeScript / code-coverage/cliThe overall line coverage in commit 6743094 in the Show a line coverage summary of the most impacted files.
Updated |
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
deepujain
left a comment
There was a problem hiding this comment.
LGTM.
Removing the unused helper leaves archive sanitization with its current owner. The Hermes regression verifies credential removal and unchanged live state while rejecting host Python; no inline comments follow.
Advisor feedback: 0 of 0 items require changes; all nine specialists are clear.
Recommended E2E: full-e2e, security-posture, rebuild-hermes and rebuild-openclaw have not run on this commit. These are advisory under the default approval rule.
Tested: focused snapshot authority, SQLite, rebuild backup and Ollama tests; snapshot integration and growth guardrails; clean CLI and plugin builds; both typechecks; trusted approval checker passed. The Hermes regression also passed on the base, so the original bug was not reproduced. The Linux-only descendant case was skipped locally on macOS. Local publication validation was blocked by missing SDK installation.
Outcome
Complete the main-branch removal of snapshot sanitization's host Python dependency. Hermes backups keep using the existing Node archive sanitizer, with regression coverage that rejects host Python invocation while verifying credential removal and preservation of live state.
Reason
Issue #11174 reported a Hermes rebuild failure when a verified host Python interpreter was unavailable. The active backup path moved to Node archive sanitization in #12340 after the retired plugin migration path was removed in #11825. The unused Python sanitizer module remained in the CLI source and compiled output.
Related issues
Fixes #11174 on
main. The v1 branch and backports are out of scope.Changes
Accept Linux terminal
Xstate in the existing Ollama descendant-cleanup test, alongside absent and zombie states. This repairs the inherited CI failure while retaining rejection of live states and all timeout and cleanup assertions.Delete the unused 849-line snapshot sanitizer boundary module. No production or test consumers remain.
Extend the existing Hermes backup test to reject both named and absolute-path host Python invocations, use the Hermes registry identity, and preserve its archive sanitization and unchanged-source assertions.
Add no dependency, prerequisite, installer behavior, or replacement sanitizer. Current documentation already reflects the active implementation.
Verification
Repair commit
6743094e828b27db633e0e45950bdf4e1838f1bf:vitest run --project cli src/lib/onboard/ollama-systemd/executable-proof.test.tspassed 30 tests; its Linux-only case was skipped on macOS and awaits current Linux CI. Commit hooks, publication validation, and CLI typechecking passed for this repair.vitest runacross snapshot, native authority, SQLite sanitization, and rebuild backup tests: 5 files, 69 tests passed.vitest run --project integration test/state/snapshot.test.ts test/automation/pull-requests/growth-guardrails.test.ts: 2 files, 54 tests passed. Hermes regression: passed. Temporarily introducing an absolute/usr/bin/python3call in the backup path made the regression fail; the mutation was removed.npm run clean:clifollowed byNODE_OPTIONS=--max-old-space-size=8192 npm run build:cli: passed; the deleted sanitizer is absent from the generated output. CLI and plugin typechecks passed during contributor setup.Normal guarded
git pushwith repository hooks: publication validation, CLI, plugin, and JavaScript configuration checks passed.Commit hooks: passed, including formatting, lint, secrets, source-shape budget, growth guardrails, and commitlint.
Source and import audit: no remaining consumers of the deleted module.
Live DGX rebuild was not rerun. This change removes unreachable code and protects the existing archive behavior at its local runtime boundary.
The diff contains no secrets, API keys, or credentials. The test retains only synthetic values and the existing public proxy sentinel.
Review notes
Self-review of NVIDIA/NemoClaw commit
3527153d81dfb32913eb65460099fc3d29bc6c30and its two changed paths confirmed thatsrc/lib/security/snapshot-sanitizer-boundary.tshas no remaining callers and that active archive sanitization is unchanged. This sensitive-path deletion awaits independent review; no approval or waiver is claimed.Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com
Summary by CodeRabbit