Disambiguate internal test-helper exports across six modules#3826
Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR removes ambiguous testHelpers exports from several internal modules by renaming them to module-specific *TestHelpers exports, and updates all impacted unit tests to import the new names directly—eliminating naming collisions and unnecessary aliasing in test code.
Changes:
- Renamed test-only helper export objects to module-specific names (e.g.,
logDiscoveryTestHelpers,iptablesSharedTestHelpers, etc.). - Updated all affected unit tests to use the new export names and removed collision-driven import aliasing where it was only used to disambiguate
testHelpers. - Kept the helpers explicitly marked as
@internal/ test-only while making import intent clearer at call sites.
Show a summary per file
| File | Description |
|---|---|
| src/logs/log-discovery.ts | Renames testHelpers export to logDiscoveryTestHelpers. |
| src/logs/log-discovery.test.ts | Updates imports/usages to logDiscoveryTestHelpers. |
| src/host-iptables-shared.ts | Renames testHelpers export to iptablesSharedTestHelpers. |
| src/host-iptables-shared.test.ts | Updates imports/usages to iptablesSharedTestHelpers. |
| src/host-iptables-setup.test.ts | Updates imports/usages to iptablesSharedTestHelpers. |
| src/host-iptables-network.ts | Renames testHelpers export to iptablesNetworkTestHelpers. |
| src/host-iptables-network.test.ts | Updates imports/usages to iptablesNetworkTestHelpers and iptablesSharedTestHelpers; removes aliasing. |
| src/host-iptables-host-access.test.ts | Updates imports/usages to iptablesSharedTestHelpers. |
| src/host-iptables-doh.test.ts | Updates imports/usages to iptablesSharedTestHelpers. |
| src/host-iptables-cleanup.test.ts | Updates imports/usages to iptablesSharedTestHelpers. |
| src/host-env.ts | Renames testHelpers export to hostEnvTestHelpers. |
| src/docker-manager-utils.test.ts | Updates imports/usages to hostEnvTestHelpers. |
| src/docker-manager-lifecycle.test.ts | Updates imports/usages to containerLifecycleTestHelpers (removes aliasing). |
| src/copilot-api-resolver.ts | Renames testHelpers export to copilotApiResolverTestHelpers. |
| src/copilot-api-resolver.test.ts | Updates imports/destructuring to copilotApiResolverTestHelpers. |
| src/container-lifecycle.ts | Renames testHelpers export to containerLifecycleTestHelpers. |
| src/cli.test.ts | Updates imports to copilotApiResolverTestHelpers without aliasing. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 17/17 changed files
- Comments generated: 0
Smoke Test: Claude Engine
Result: PASS
|
🔬 Smoke Test Results
PR: "Disambiguate internal test-helper exports across six modules" by Overall: PARTIAL — MCP test passed; pre-step smoke data was not injected (unexpanded
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PARTIAL — BYOK inference and MCP working; pre-step smoke data template vars were not substituted. PR author:
|
|
fix(api-proxy): prevent stream_options injection into OpenAI Responses API requests ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Runtime Version Comparison
Result: Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results: FAIL
|
|
Smoke test 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.
|
|
@copilot address review feedback |
I checked the PR review output and there are currently no actionable review comments/threads (the Copilot review reported “Comments generated: 0”). Please point me to the specific feedback you want addressed, and I’ll apply it immediately. |
The codebase exported
testHelpersfrom six different modules, creating avoidable naming collisions and forcing import aliasing in tests. This change makes each test-only helper export module-specific so import intent is explicit and collision-free.API surface cleanup (test-only exports)
host-iptables-shared.ts→iptablesSharedTestHelperscopilot-api-resolver.ts→copilotApiResolverTestHelpershost-env.ts→hostEnvTestHelperscontainer-lifecycle.ts→containerLifecycleTestHelpershost-iptables-network.ts→iptablesNetworkTestHelperslogs/log-discovery.ts→logDiscoveryTestHelpersConsumer updates (tests)
testHelperscollisions.Resulting pattern