Skip to content

test(runtime): cover MicroSandbox prebuild reuse - #1463

Merged
skevetter merged 2 commits into
mainfrom
codex/microsandbox-prebuild-parity
Oct 11, 2026
Merged

skevetter merged 2 commits into
mainfrom
codex/microsandbox-prebuild-parity

Conversation

@skevetter

@skevetter skevetter commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Add four shared MicroSandbox prebuild scenarios, covering matching reuse and changed-Dockerfile invalidation with the built-in driver and published external provider v0.1.7.

Each case publishes a Dockerfile and local Feature through the real workspace build command into an isolated registry. Matching consumption must read the published hash with no Docker build or build-strategy probe; changed input must request a different hash, build a new image and leave the previous manifest available. Guest file and environment markers establish which image and Feature were used. The Docker wrapper forwards arguments unchanged and records strategy probes separately so internal BuildKit fallback cannot silently satisfy a zero-build assertion.

The Linux fixture requires a local Docker daemon and buildx. It removes only its own output tags and independently bounds workspace, provider, tag and registry cleanup. This slice does not independently prove hashing of local Feature script contents, Dockerless execution or migration safety.

Local focused race tests, vet, module verification, strict lint and all 13 repository hooks passed. Fresh full committed local CodeRabbit completed with zero findings across all six files. An actual CLI parser check verifies the publication command uses the supported --devcontainer-path flag. All 79 jobs in current-head Pull Request CI passed. Full actual VM logs prove all 50 selected scenarios passed, including four new prebuild publication/reuse and changed-input cases against both drivers. Fresh Greptile completed on the current head with confidence 5/5 and no actionable issues. Full remote CodeRabbit completed across all six files with no actionable findings or retained architecture/security concern. Its generic private-helper docstring warning was independently dispositioned; there are no review threads. Both commits have valid GitHub signatures.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 770f7d2
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6acba826469839000873be0b

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 06e88bae-7b6b-4d2b-9005-5d1ccc872197


📥 Commits

Reviewing files that changed from the base of the PR and between 5aee7e3 and 770f7d2.



📒 Files selected for processing (6)
  • .github/workflows/pr-ci.yml
  • e2e/tests/up/provider_microsandbox_prebuilds.go
  • e2e/tests/up/testdata/microsandbox-prebuilds/Dockerfile
  • e2e/tests/up/testdata/microsandbox-prebuilds/features/parity/devcontainer-feature.json
  • e2e/tests/up/testdata/microsandbox-prebuilds/features/parity/install.sh
  • sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx


Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

Adds end-to-end tests for prebuild reuse and Dockerfile-change invalidation with built-in and external MicroSandbox providers. Adds a CI matrix entry and documents the scenario, its requirements, and its coverage limitations.

Changes

MicroSandbox prebuild parity

Layer / File(s) Summary
Parity test harness and fixture inputs
e2e/tests/up/provider_microsandbox_prebuilds.go, e2e/tests/up/testdata/microsandbox-prebuilds/*
Adds a table-driven test for both provider types, an isolated registry and Docker instrumentation, cleanup, and Dockerfile and Feature markers used to check container output.
Publication and consumption checks
e2e/tests/up/provider_microsandbox_prebuilds.go, .github/workflows/pr-ci.yml, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
Checks publication and matching-prebuild reuse, then verifies that changed Dockerfile input builds a new image while the old manifest remains available. Adds the test to the CI matrix and documents its requirements and coverage limits.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other



Merge Risk: ⚪ Minimal · up to 770f7

The new prebuild parity coverage has no identified merge-blocking issue. Merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding runtime coverage for MicroSandbox prebuild reuse.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (4 skipped: 4 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 770f7d2
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6acba8257e39500008539943

@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issue was found.

Summary

Adds four MicroSandbox prebuild scenarios for the built-in and external providers.

  • MicroSandbox tests now check that matching prebuilds are reused.
  • MicroSandbox tests now check that changed Dockerfiles trigger a fresh image.

skevetter explicitly identifies local Feature script hashing, Dockerless execution, and migration safety as outside this slice. These intentional limits are not findings.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Copy isolated fixture] --> B[Publish through workspace build]
  B --> C[Remove local output tags and reset counters]
  C --> D{Dockerfile changed?}
  D -->|No| E[Require published hash read and no build or probe]
  D -->|Yes| F[Require different hash miss and new build]
  F --> G[Check old manifest remains available]
  E --> H[Check guest image and Feature markers]
  G --> H
  H --> I[Delete workspace and provider, remove tags, stop registry]
Loading

Reviews (1) · Last reviewed commit: "test(runtime): use supported prebuild co..." · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@skevetter

Copy link
Copy Markdown
Contributor Author

The completed full CodeRabbit run 06e88bae-7b6b-4d2b-9005-5d1ccc872197 covers all six files at 770f7d2 and reports no actionable comments or retained architecture/security concern. Its generic docstring-coverage warning is not actionable here: this diff adds private test-fixture helpers, executable fixture scripts and public parity documentation, with no new exported Go API. The helper names describe their operations, and comments explain the non-obvious registry observation, fallback detection and cleanup boundaries. Adding comments that restate every helper would not improve the contract. Strict repository lint and all hooks pass. No code change is warranted for this warning.

@skevetter
skevetter marked this pull request as ready for review October 11, 2026 16:11
@skevetter
skevetter merged commit 2aa3d86 into main Oct 11, 2026
101 checks passed
@skevetter
skevetter deleted the codex/microsandbox-prebuild-parity branch October 11, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant