perf(sandbox): reduce image build time by skipping broad permission repair#4018
perf(sandbox): reduce image build time by skipping broad permission repair#4018zyang-dev wants to merge 3 commits into
Conversation
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactors Dockerfile cleanup to record legacy migrations via a marker and apply conditional permission repairs; tightens OpenClaw directory/file initialization; adds classic Docker build-step timing in the stream processor; and adds a regression test covering modern vs legacy permission repair behavior. ChangesLegacy OpenClaw Layout Migration & Conditional Permissions
Build Step Timing Instrumentation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
E2E Advisor RecommendationRequired E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
PR Review AdvisorRecommendation: blocked This is an automated advisory review. A human maintainer must make the final merge decision. Limitations: Review used trusted metadata and the provided diff only; no PR scripts, package-manager commands, Docker builds, or tests were executed by this advisor.; The diff was provided as truncated-if-large context; conclusions focus on visible changed hunks and trusted metadata.; No full workflow logs were reviewed, so successful CI context internals were not independently inspected.; No passed required E2E runs for head 65e281a were available in trusted context.; PR body validation claims, build timing measurements, and freshly built sandbox validation claims were treated as untrusted evidence only.; Review thread state was not fully available beyond the provided trusted metadata. Full advisor summaryPR Review AdvisorBase: Blocked by GitHub mergeStateStatus=BLOCKED, missing required sandbox/OpenClaw E2E evidence for this head SHA, and unoffset create-stream.ts monolith growth; required CI contexts are currently green. Gate status
🔴 Blockers
🟡 Warnings
🔵 Suggestions
Acceptance coverage
Security review
Test / E2E status
✅ What looks good
Review completeness
|
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
Summary
This PR reduces sandbox image build time by avoiding broad recursive
.openclawpermission repair on current unified-layout sandbox bases. It keeps the conservative repair path for legacy.openclaw-datamigrations and adds Docker build step timing to make future build bottlenecks visible.DGX Spark build-time comparison:
178.1s68.0sChanges
.openclaw-datasymlink verification so it only runs when legacy migration occurs..openclawpermission repair with a legacy-only broad repair and a targeted fast path for current unified layouts. The fast path relies on the current unified.openclawlayout being provisioned earlier in the image:Dockerfile.basecreates the known state directories assandbox:sandboxwith group-write/setgid permissions, andopenclaw plugins installruns asUSER sandbox, soplugin-runtime-depscontents are already owned bysandbox:sandboxbefore the final repair step..openclawrepair path: current layouts use targeted permission repair, while legacy.openclaw-datamigrations still use broad recursive repair..openclawlayout contract check so future directory/file layout changes fail tests until the targeted permission repair assumptions are reviewed.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Additional validation:
/sandbox/.openclaw/plugin-runtime-depsand sampled contents are owned bysandbox:sandbox; no non-sandbox:sandboxentries were found, and a sandbox-user write probe inplugin-runtime-depssucceeded.Signed-off-by: zyang-dev 267119621+zyang-dev@users.noreply.github.com
Summary by CodeRabbit
New Features
Chores
Tests