fix(sandbox): stage Slack deny-feedback patch script#4971
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.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 (2)
📝 WalkthroughWalkthroughThis PR extends the sandbox build-context staging to include a new script, ChangesSandbox Build Context Script Staging
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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. |
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
|
Selective E2E Results — ✅ All requested jobs passedRun: 27155399599
|
…ontext (#4970) ## Summary Nightly E2E run [27154074940](https://github.com/NVIDIA/NemoClaw/actions/runs/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 ``` COPY failed: file not found in build context: stat scripts/patch-openclaw-slack-deny-feedback.mts: file does not exist ``` PR #4933 added `scripts/patch-openclaw-slack-deny-feedback.mts` and the matching `COPY` line in `Dockerfile`, but did **not** register the new file in `stageOptimizedSandboxBuildContext` (`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 `.mts` patch was missed, so `docker build` couldn'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`: stage `patch-openclaw-slack-deny-feedback.mts` next 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 Dockerfile `COPY scripts/...` lines and verify every referenced script exists in the optimized staged context, folding in the broader guard from #4971. ## Validation - `npx vitest run test/sandbox-build-context.test.ts` → 7/7 passing locally. - GitHub PR checks on updated head `7fca86f78` are green, including `build-sandbox-images`, `build-sandbox-images-arm64`, `unit-vitest-linux`, `cli-tests`, and downstream self-hosted smoke jobs. - After merge, rerun `nightly-e2e.yaml` (or `gh 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 (`Dockerfile` `COPY` + 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). --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
Stage the Slack deny-feedback patch script in the optimized sandbox build context so OpenClaw source installs can satisfy every
COPY scripts/...line in the Dockerfile. This fixes the nightly E2E image-build failure where Docker could not findscripts/patch-openclaw-slack-deny-feedback.mts.Changes
scripts/patch-openclaw-slack-deny-feedback.mtsinto the optimized sandbox build context alongside the existing OpenClaw patch scripts.COPY scripts/...entries and verifies every referenced script exists in the staged context.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Tests
Chores