fix(e2e): prebuild trusted EXDEV fixture image - #8654
Conversation
Signed-off-by: Apurv Kumaria <akumaria@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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesTrusted EXDEV prebuild flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant LifecycleTest
participant buildTrustedPluginFixtureImage
participant LocalSandboxPrebuild
participant Docker
participant OpenShell
LifecycleTest->>buildTrustedPluginFixtureImage: build trusted v1 or v2 fixture image
buildTrustedPluginFixtureImage->>LocalSandboxPrebuild: submit staged Docker context
LocalSandboxPrebuild->>Docker: build tagged image
Docker-->>LocalSandboxPrebuild: return image reference and immutable image ID
LocalSandboxPrebuild-->>LifecycleTest: return validated trusted image
LifecycleTest->>OpenShell: create sandbox with selected image
OpenShell-->>LifecycleTest: use rewritten trusted --from source
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts (1)
78-84: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for a failed image removal.
Every mocked
docker image rmcall returns exit code 0. The cleanup step aborts on the first non-zero exit code, so the remaining images are never removed. This test cannot detect that behavior. Add a case where the first removal returns a non-zero exit code, then assert that the second removal still runs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts` around lines 78 - 84, Extend the cleanup test around the mocked docker image removal calls to make the first `docker image rm` return a non-zero exit code, then assert cleanup continues by verifying the second image removal is invoked. Preserve the existing call ordering and image arguments while covering the failed-first-removal path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/e2e/live/openclaw-plugin-runtime-exdev-trusted-prebuild.ts`:
- Around line 131-144: The cleanup callback in
test/e2e/live/openclaw-plugin-runtime-exdev-trusted-prebuild.ts:131-144 should
collect failed docker image removals, continue processing every image, and
assert after the loop that no removals failed. In
test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts:78-84,
add coverage where the first mocked removal fails, verify the second removal
still runs, and verify the cleanup step reports the failure.
---
Nitpick comments:
In `@test/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts`:
- Around line 78-84: Extend the cleanup test around the mocked docker image
removal calls to make the first `docker image rm` return a non-zero exit code,
then assert cleanup continues by verifying the second image removal is invoked.
Preserve the existing call ordering and image arguments while covering the
failed-first-removal path.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3417e6b2-d3d0-4dbc-b91d-306194dec1fe
📒 Files selected for processing (4)
test/e2e/README.mdtest/e2e/live/openclaw-plugin-runtime-exdev-trusted-prebuild.tstest/e2e/live/openclaw-plugin-runtime-exdev.test.tstest/e2e/support/openclaw-plugin-runtime-exdev-trusted-prebuild.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
3 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
1 additional E2E selection from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite against this exact revision. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Summary
The current-checkout OpenClaw EXDEV lifecycle fixture now prebuilds its repository-controlled v1 and v2 images with local BuildKit, then passes only validated fixture-owned tags to the test OpenShell wrapper. This avoids the failing classic gateway build without changing the product's arbitrary custom-Dockerfile trust boundary, and it guarantees partial-build image cleanup.
Related Issue
Related to #8590. This PR does not close the umbrella issue.
Changes
--fromDockerfiles on the existingorigin=customgateway-builder path. The fixture-onlyorigin=generatedbridge is required by the current OpenShell 0.0.99 builder path; changing the product path directly would weaken that trust boundary.Type of Change
Quality Gates
797491a9b65ccc32787c7031b9cf6ceee523d895with all nine security categories passing and no findings.Documentation Writer Review
no-docs-neededtest/e2e/README.mddocuments the fixture-only BuildKit handoff. No page underdocs/changes because the production user experience and documented product behavior are unchanged.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result: Not run; the change is isolated to one live fixture and its focused support contract. Repository checks, CLI type checking, source-shape, test-size, title, project-membership, secret-scan, and diff gates passed.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit