[Test Coverage] src/sbx-manager.ts#6127
Conversation
Add comprehensive unit tests for all uncovered paths in sbx-manager.ts: - sanitizeEnvForSbx: secret pattern filtering, override merging - SBX_DEFAULT_NAME: prefix and PID format validation - createSandbox: default name/port, auth failure paths (null/non-zero exit), sbx create failure, degenerate success detection, mount deduplication, rw/ro/2-segment mount formats, system path dedup - execInSandbox: exit codes (0/non-zero/null), timeout (124), unexpected error, workDir/tty/environment/timeoutMinutes options - removeSandbox: stop non-zero, stop throws, rm null exit, success logging - isSbxAvailable: true on success, false on throw Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Expands unit coverage for the sbx sandbox lifecycle manager.
Changes:
- Tests environment sanitization and default naming.
- Covers sandbox creation, execution, cleanup, and availability branches.
- Verifies mount, timeout, environment, and error handling.
Show a summary per file
| File | Description |
|---|---|
src/sbx-manager.test.ts |
Adds comprehensive sbx manager tests. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 4
- Review effort level: Medium
| expect(result.PATH).toBe('/custom'); | ||
| }); | ||
|
|
||
| it('overrides cannot smuggle secret keys', () => { |
| expect(mockedLogger.info).toHaveBeenCalledWith( | ||
| expect.stringContaining('http://172.30.0.10:3128'), | ||
| ); |
| expect(mockedLogger.info).toHaveBeenCalledWith( | ||
| expect.stringContaining('http://172.30.0.10:8080'), | ||
| ); |
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
Fixed all four issues in cb802d5:
The existing "uses shell agent" test at line 83 was also updated to expect |
|
✅ Copilot review passed with no inline comments. @github-actions[bot] Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
✅ Smoke Claude passed |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Build Test Suite completed successfully! |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Smoke Gemini completed. All facets verified. 💎 Checking connectivity |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident... |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
🚀 Security Guard has started processing this pull request |
|
✅ Contribution Check completed successfully! |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
🔬 Smoke Test Results
Overall: PASS (MCP verified; pre-step outputs not injected into prompt) Author: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test Results: Copilot BYOK (Direct) Mode✅ GitHub API connectivity (HTTP 200) Status: PASS Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Claude Engine Validation
Overall Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Copilot PAT Auth
Overall: PASS (core connectivity verified) Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke Test Results:
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Thanks for adding comprehensive unit coverage for src/sbx-manager.ts. Before merging, please replace the placeholder PR description with a clear summary of what changed and reference any related issue, or state that none exists, as required by CONTRIBUTING.md under Pull Request requirements. The tests and file organization otherwise align with the applicable contribution guidelines. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Services Connectivity
Overall: FAIL — Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
All 5 scenarios passed. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke test: PASS Merged PRs reviewed:
Checks:
Overall: PASS Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Version Comparison
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Gemini Engine Validation
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
placeholder
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.