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
Add four shared MicroSandbox egress scenarios: default public TCP access and explicit denial for both the built-in driver and published external provider v0.1.7. Each repeats after stop/start and recreation while checking active network policy, creation time and boot identity.
A test-owned Linux dummy interface hosts the controlled destination. Successful host and default-policy VM probes bracket each denied request. Denial requires a healthy SSH session, an available client, explicit connection refusal/reset and zero matching endpoint receipts; a timeout or broken endpoint cannot satisfy the assertion. Interface, listener, workspaces and providers have independent cleanup. CI requires Linux/KVM and fixture privileges; the change adds no production networking behavior.
Local validation: focused uncached race tests, vet, strict lint and module verification passed. The dry run selects four cases only. All 13 repository hooks passed. Fresh full committed local CodeRabbit review completed with zero findings across all three PR files. Current-head implementation CI passed all 78 jobs. Full logs confirm all 46 selected MicroSandbox scenarios passed, including all four new TCP egress cases with the actual built-in and published external drivers. Fresh Greptile completed on this head with confidence 5/5 and no actionable findings. A full remote CodeRabbit review has been requested and remains pending.
This slice covers TCP egress to a controlled destination. UDP, DNS, TLS, ingress, live policy changes and later driver migration are outside its claims. Existing invalid-recreation preservation remains a separate pre-cutover correctness gate.
Summary by CodeRabbit
Tests
Added end-to-end coverage for MicroSandbox egress policies across both providers, checking public TCP access and explicit denial when workspaces are created, restarted, and recreated.
Added the scenario to CI, with required environment checks and a defined test timeout.
Documentation
Documented the scenario’s prerequisites and clarified which network behaviors it covers—and does not cover.
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
📝 Walkthrough
📝 Walkthrough
Walkthrough
Adds MicroSandbox egress tests for builtin and external providers. The tests check public TCP access and explicit egress denial at workspace creation, after stop/start, and after recreation. CI runs the scenario, and the provider runtime protocol documentation describes its scope and requirements.
Changes
MicroSandbox egress E2E
Layer / File(s)
Summary
Egress test fixture e2e/tests/up/provider_microsandbox_egress.go
Adds a controlled HTTP endpoint, host networking setup, receipt checks, and host and guest probes for allowed and blocked egress.
Provider policy and lifecycle checks e2e/tests/up/provider_microsandbox_egress.go
Tests builtin and external providers with default access and explicit denial. Checks policy and connectivity at creation, after stop/start, and after recreation, including workspace creation time and storage boot ID.
CI and scenario documentation .github/workflows/pr-ci.yml, sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
Adds the scenario to the CI matrix and documents its prerequisites and coverage limits.
No actionable merge-blocking risk is established for this test and documentation change.
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 11 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 describes the main change: adding runtime tests for MicroSandbox TCP egress parity.
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 11 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.
[Medium impact] The PR appears safe to merge; no actionable issue was found.
Summary
Adds four shared TCP-egress cases for the built-in MicroSandbox driver and external provider.
MicroSandbox tests check public TCP access and egress denial across VM lifecycles.
No actionable issues were found. Actual VM behavior was not run during this review.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Create controlled TCP endpoint] --> B[Create target VM]
B --> C[Check active policy and VM identity]
C --> D[Successful host probe]
D --> E{Egress blocked?}
E -->|No| F[Target request succeeds]
E -->|Yes| G[Control VM request succeeds]
G --> H[Target reports refusal or reset]
H --> I[Control VM request succeeds again]
I --> J[Confirm zero target receipts]
F --> K[Successful host probe]
J --> K
K --> L[Repeat after stop/start and recreation]
Reviewed the complete full CodeRabbit run 09bc8947 on 1b3e1c1, including merge-risk assessment. No actionable findings or review threads remain. The generic docstring-percentage warning concerns private E2E fixture helpers; existing descriptive names and comments explain the non-obvious network ownership and denial invariants. Adding comments that repeat every helper name would not improve these tests, so no code change is warranted. All 78 implementation CI jobs and all 46 actual MicroSandbox scenarios passed on this head; Greptile confidence is 5/5.
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 four shared MicroSandbox egress scenarios: default public TCP access and explicit denial for both the built-in driver and published external provider v0.1.7. Each repeats after stop/start and recreation while checking active network policy, creation time and boot identity.
A test-owned Linux dummy interface hosts the controlled destination. Successful host and default-policy VM probes bracket each denied request. Denial requires a healthy SSH session, an available client, explicit connection refusal/reset and zero matching endpoint receipts; a timeout or broken endpoint cannot satisfy the assertion. Interface, listener, workspaces and providers have independent cleanup. CI requires Linux/KVM and fixture privileges; the change adds no production networking behavior.
Local validation: focused uncached race tests, vet, strict lint and module verification passed. The dry run selects four cases only. All 13 repository hooks passed. Fresh full committed local CodeRabbit review completed with zero findings across all three PR files. Current-head implementation CI passed all 78 jobs. Full logs confirm all 46 selected MicroSandbox scenarios passed, including all four new TCP egress cases with the actual built-in and published external drivers. Fresh Greptile completed on this head with confidence 5/5 and no actionable findings. A full remote CodeRabbit review has been requested and remains pending.
This slice covers TCP egress to a controlled destination. UDP, DNS, TLS, ingress, live policy changes and later driver migration are outside its claims. Existing invalid-recreation preservation remains a separate pre-cutover correctness gate.
Summary by CodeRabbit