fix(sandbox): stage patch-openclaw-slack-deny-feedback.mts in build context#4970
Conversation
…ontext PR #4933 added `scripts/patch-openclaw-slack-deny-feedback.mts` and a matching `COPY` in the Dockerfile, but did not register the new file in `stageOptimizedSandboxBuildContext`. The optimized staging path therefore omits it, and `docker build` fails at step 23 with: COPY failed: file not found in build context: stat scripts/patch-openclaw-slack-deny-feedback.mts: file does not exist This took out 48 of 67 jobs in nightly run 27154074940 — every E2E job that performs onboard/install via the sandbox image was killed before any test logic ran. Fix: stage the new patch alongside its two siblings, and extend the build-context test to assert it lands in the staged context.
|
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 (2)
📝 WalkthroughWalkthroughThe PR ensures that ChangesScript staging in build context
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
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)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 0 nice ideas Consider writing more tests for
This is an automated advisory review. A human maintainer must make the final merge decision. |
Selective E2E Results — ✅ All requested jobs passedRun: 27155279333
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Folded in the stronger regression guard from #4971 in commit 7fca86f: the build-context test now parses staged Dockerfile |
Selective E2E Results — ✅ All requested jobs passedRun: 27155288425
|
Selective E2E Results — ✅ All requested jobs passedRun: 27156172292
|
Summary
Nightly E2E run 27154074940 lost 48 of 67 jobs to a single root cause: every E2E job that exercises onboard/install died at the same Dockerfile step with
PR #4933 added
scripts/patch-openclaw-slack-deny-feedback.mtsand the matchingCOPYline inDockerfile, but did not register the new file instageOptimizedSandboxBuildContext(src/lib/sandbox/build-context.ts). The optimized staging path hand-copies a curated set of files into a temp build context — its two existing siblings (patch-openclaw-tool-catalog.js,patch-openclaw-chat-send.js) are listed there explicitly. The new.mtspatch was missed, sodocker buildcouldn't see it.PR #4933 itself was green because PR-time builds were satisfied by other paths or cached layers; the gap only showed up when nightly built from main against the staged context.
Change
src/lib/sandbox/build-context.ts: stagepatch-openclaw-slack-deny-feedback.mtsnext to its siblings.test/sandbox-build-context.test.ts: extend the fixture + assertion so any future drop of this file is caught locally before it can take down nightly.test/sandbox-build-context.test.ts: parse staged DockerfileCOPY scripts/...lines and verify every referenced script exists in the optimized staged context, folding in the broader guard from fix(sandbox): stage Slack deny-feedback patch script #4971.Validation
npx vitest run test/sandbox-build-context.test.ts→ 7/7 passing locally.7fca86f78are green, includingbuild-sandbox-images,build-sandbox-images-arm64,unit-vitest-linux,cli-tests, and downstream self-hosted smoke jobs.nightly-e2e.yaml(orgh run rerun 27154074940 --failed). A single onboard-stage job clearing Dockerfile step 23 confirms all 48 failures are resolved.Follow-up (suggested, not in this PR)
The two-place duplication (
DockerfileCOPY+ hand-listed staging) is the structural cause of this incident. This PR now adds a contract test for that duplication; a future cleanup could still drive the staged list from a glob (scripts/patch-openclaw-*.{js,mts}) or shared manifest.cc @yimoj (PR #4933 author).