refactor(shields): isolate mutable config repair#6136
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com> (cherry picked from commit 717d6ef)
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughExtracts mutable OpenClaw config normalization into ChangesMutable Config Normalization Extraction
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
|
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the branch is 96%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the branch is 68%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Findings index
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 2 in-scope improvements
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28542337844
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Maintainer follow-up on exact head a32d292:
Validation: full pre-commit CLI/integration coverage and pre-push CLI typecheck passed; focused behavior tests passed 49/49; security call-chain tests passed 63/63; Biome and git diff checks passed. Independent runtime probes confirmed the process group is gone before the outer timeout. Commit a32d292 is signed, DCO-signed-off, and GitHub Verified. @coderabbitai review |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
fd . src/lib/shields -e ts | head -50
echo "---mutable-config-repair.ts---"
cat -n src/lib/shields/mutable-config-repair.ts 2>/dev/null || true
echo "---exec.ts relevant excerpt---"
rg -n "timeout|TERM|KILL|watchdog" src/lib/actions/sandbox/exec.ts 2>/dev/null || true
echo "---normalize_mutable_config_perms.py---"
cat -n scripts/lib/normalize_mutable_config_perms.py 2>/dev/null || trueLength of output: 62936
Everything checks out against the description. I'll kick off a fresh review pass on this head now. ✅ Action performedReview finished.
|
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28549995589
|
|
Advisor follow-up disposition for exact head a32d292:
Both advisors now recommend merge_as_is with zero required findings and zero warnings. CodeRabbit is green with no review threads; all latest exact-head check runs are passing. The only remaining branch-protection gate is the requested human approval. |
Summary
This follow-up extracts the direct mutable OpenClaw repair invocation from the oversized shields module after #6060 merged. It preserves the trusted-helper command, identity validation, timeouts, and runtime behavior while documenting the existing cross-process lock and first-start recovery-baseline semantics requested by automated review.
Related Issue
Follow-up to #6060 and #6047.
Changes
src/lib/shields/mutable-config-repair.ts.execrepair.Type of Change
Quality Gates
execcleanup suites exercise the unchanged public path, identity validation, and trusted-helper invocation.Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Evidence
npx prek run --from-ref origin/main --to-ref HEADpassed under the repository-requiredumask 022, including the full CLI/integration coverage hook.execcleanup tests passed 49/49; CLI type-checking, Biome, Python parsing, test-title style, file-size budget, andgit diff --checkpassed.stdin=falseandsanitizeEnvironment=trueon every privileged call, reject invalid UID/GID values before normalization, assert forwarded Docker argv/options, and propagate normalizer execution failures.npm run docscompleted with 0 errors and 2 pre-existing warnings.Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit