You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(runtime): preserve workspaces on MicroSandbox compatibility failures - #1475
Add two actual-VM compatibility scenarios, one for the built-in MicroSandbox provider and one for the published external provider. A test-owned CLI shim injects old, malformed and failing version responses while forwarding all other commands to the supported CLI. Each failed explicit recreation must consume the injected response, issue no mutating runtime command, and preserve the running VM generation, root and source data, workspace record and SSH files.
Restoring the supported CLI must permit explicit recreation, produce a new VM generation and a working SSH session, reset the old root marker and preserve workspace and source identity. Cleanup clears injected faults independently and targets only the fixture's recorded workspace or previously absent backend identity. These fault-injection scenarios do not claim behavior against an actual historical MicroSandbox release or complete migration readiness.
Validation: affected-package uncached race tests, vet, module verification, strict lint with zero issues, all applicable pre-commit hooks, actionlint and formatting/diff checks passed. The branch now integrates the merged safe-recreate/shared MicroSandbox foundation. Compatibility uses its shared session/provider selector and explicit provider labels; its two cases are the thirteenth dedicated CI row, bringing the native catalogue to 74 expected cases. The new selection-only dry run chose both provider cases; it did not start VMs. Fresh full committed local CodeRabbit review completed with zero findings and exact coverage of all three final files. Post-integration race/vet/module verification, strict lint (zero) and all applicable hooks passed.
The previous Windows run completed CLI and E2E builds and artifact uploads, then exceeded the unchanged job deadline while archiving the optional Go cache. Disable that cache only for Windows builds; Linux/macOS caching, all test assertions, catalogue counts and deadlines remain unchanged. Workflow hooks and full committed local review passed for that cache correction; its implementation CI completed with all 84 jobs successful, including all 74 actual MicroSandbox cases.
Greptile identified a valid gap in the no-mutation assertion: image imports through msb load were missing. The final guard includes load. A temporary regression against the actual assertion reproduced the old false acceptance and passed after the change, while read-only version/list/inspect calls remained allowed. Fresh affected-package race/vet, strict lint, all scoped hooks, module verification and full committed local CodeRabbit review (zero findings, all three files) passed. Current-head implementation CI passed all 84 jobs, including all 74 actual MicroSandbox cases (37 built-in and 37 external), with one attempt and no selected skips or dry runs. Fresh exact-head Greptile review completed at 5/5 with no actionable findings. Explicit full remote CodeRabbit review completed while draft with all three PR files covered, no actionable findings and minimal merge risk. Its private-helper docstring warning is dispositioned with source evidence. All actionable threads are resolved; all nine commits have valid GitHub signatures. The built-in provider remains available.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
📝 Walkthrough
The pull request adds MicroSandbox compatibility E2E coverage for version-command faults and successful recreation. It also registers the suite in CI, documents its scope and limitations, and changes Go setup caching for Windows runners.
Changes: MicroSandbox compatibility E2E
Layer / File(s)
Summary
Scenario, fixture, and CI registration e2e/tests/up/provider_microsandbox_compatibility.go, .github/workflows/pr-ci.yml
The E2E spec sets up an isolated workspace for builtin and external providers. The CI matrix registers the compatibility suite.
Version faults and state preservation e2e/tests/up/provider_microsandbox_compatibility.go
The test shim injects old, malformed, or failing msb --version responses. The test checks failure diagnostics, logged commands, and preserved VM, workspace, host-file, and SSH state.
Successful retry and protocol documentation e2e/tests/up/provider_microsandbox_compatibility.go, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
The test retries recreation without an injected fault and checks VM replacement and SSH access. The documentation describes the suite, platform coverage, and the limits of the shim.
Windows Go caching
Layer / File(s)
Summary
Runner-specific Go caching .github/workflows/pr-ci.yml
The build workflow disables Go setup caching on Windows and retains it on other runners.
The compatibility tests and CI changes are mergeable after normal checks. The shim does not establish compatibility with an actual historical MicroSandbox release, as the documentation notes.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
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 13 functions across 1 files. (2 skipped: 2…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely identifies the runtime tests for preserving workspaces during MicroSandbox compatibility failures. It matches the primary changes in the pull request.
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 13 functions across 1 files. (2 skipped: 2 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.
Final review disposition: the docstring-coverage warning concerns private Go test fixtures and assertion helpers, not an undocumented public API. The source already documents the non-obvious fault-injection, cleanup, argument-safety and state-preservation contracts, and the runtime protocol documentation states the historical-runtime limitation. Adding comments that restate each private helper would not improve that contract. No source change is needed for this warning. The completed full review covers all three files at 5146b2e and reports no actionable findings and minimal merge risk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add two actual-VM compatibility scenarios, one for the built-in MicroSandbox provider and one for the published external provider. A test-owned CLI shim injects old, malformed and failing version responses while forwarding all other commands to the supported CLI. Each failed explicit recreation must consume the injected response, issue no mutating runtime command, and preserve the running VM generation, root and source data, workspace record and SSH files.
Restoring the supported CLI must permit explicit recreation, produce a new VM generation and a working SSH session, reset the old root marker and preserve workspace and source identity. Cleanup clears injected faults independently and targets only the fixture's recorded workspace or previously absent backend identity. These fault-injection scenarios do not claim behavior against an actual historical MicroSandbox release or complete migration readiness.
Validation: affected-package uncached race tests, vet, module verification, strict lint with zero issues, all applicable pre-commit hooks, actionlint and formatting/diff checks passed. The branch now integrates the merged safe-recreate/shared MicroSandbox foundation. Compatibility uses its shared session/provider selector and explicit provider labels; its two cases are the thirteenth dedicated CI row, bringing the native catalogue to 74 expected cases. The new selection-only dry run chose both provider cases; it did not start VMs. Fresh full committed local CodeRabbit review completed with zero findings and exact coverage of all three final files. Post-integration race/vet/module verification, strict lint (zero) and all applicable hooks passed.
The previous Windows run completed CLI and E2E builds and artifact uploads, then exceeded the unchanged job deadline while archiving the optional Go cache. Disable that cache only for Windows builds; Linux/macOS caching, all test assertions, catalogue counts and deadlines remain unchanged. Workflow hooks and full committed local review passed for that cache correction; its implementation CI completed with all 84 jobs successful, including all 74 actual MicroSandbox cases.
Greptile identified a valid gap in the no-mutation assertion: image imports through
msb loadwere missing. The final guard includesload. A temporary regression against the actual assertion reproduced the old false acceptance and passed after the change, while read-only version/list/inspect calls remained allowed. Fresh affected-package race/vet, strict lint, all scoped hooks, module verification and full committed local CodeRabbit review (zero findings, all three files) passed. Current-head implementation CI passed all 84 jobs, including all 74 actual MicroSandbox cases (37 built-in and 37 external), with one attempt and no selected skips or dry runs. Fresh exact-head Greptile review completed at 5/5 with no actionable findings. Explicit full remote CodeRabbit review completed while draft with all three PR files covered, no actionable findings and minimal merge risk. Its private-helper docstring warning is dispositioned with source evidence. All actionable threads are resolved; all nine commits have valid GitHub signatures. The built-in provider remains available.