Remove test-only helper export from host-iptables-network API surface#3879
Conversation
host-iptables-network API surface
✅ 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 tightens the host-iptables-network module’s exported surface by removing the iptablesNetworkTestHelpers test-only export and updating the co-located unit test to call the cleanup function directly.
Changes:
- Removed
iptablesNetworkTestHelpersexport fromsrc/host-iptables-network.ts. - Promoted
cleanupFirewallNetworkto a direct named export for test usage. - Updated
src/host-iptables-network.test.tsto importcleanupFirewallNetworkdirectly.
Show a summary per file
| File | Description |
|---|---|
src/host-iptables-network.ts |
Removes the test-helper export and directly exports the cleanup function. |
src/host-iptables-network.test.ts |
Updates imports to use cleanupFirewallNetwork directly. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Smoke Test: Claude Engine
Result: PASS
|
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( PR author: Overall: PARTIAL (BYOK path ✅, pre-step data missing
|
🔬 Smoke Test Results
PR: "Remove test-only helper export from Overall: PARTIAL — MCP test passed; pre-step data unavailable due to unresolved workflow template expressions.
|
|
Deduplicate OIDC 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.
|
Gemini Engine Smoke Test Results
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.
|
Chroot Version Comparison — Smoke Test Results
Result: ❌ FAILED — Python and Node.js versions differ between host and chroot.
|
Smoke Test Results — FAIL
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
src/host-iptables-network.tswas exportingiptablesNetworkTestHelpers, a test-only wrapper used exclusively by the co-located unit test. This leaked internal cleanup behavior from a security-critical module into its production API without any production callers.API surface cleanup
iptablesNetworkTestHelpersexport fromhost-iptables-network.ts.cleanupFirewallNetworkas the explicit export used by tests, eliminating the unnecessary wrapper object.Test alignment
host-iptables-network.test.tsto importcleanupFirewallNetworkdirectly from./host-iptables-network.cleanupFirewallNetworkfrom the deleted helper object.Resulting module shape