fix: clean up remaining export audit issues#3230
Conversation
- Rename _testing to testHelpers in host-iptables-shared.ts (#3221) TypeScript convention: underscore prefix implies unused, not test-only. Added @internal JSDoc tag. Updated 5 test files. - Remove public export of subnetsOverlap in host-env.ts (#3205) No production callers. Expose via testHelpers for test access only. - Add @internal JSDoc to DOMAIN_CHAR_PATTERN in domain-patterns.ts (#3206) Only used internally and by test assertions. Keep exported for test readability but mark as non-public API. Closes #3221, closes #3205, closes #3206 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Cleans up the remaining three [Export Audit] findings not resolved by #3169: renames the test-only _testing export in host-iptables-shared.ts to testHelpers, makes subnetsOverlap module-private in host-env.ts and re-exposes it via a testHelpers object, and annotates DOMAIN_CHAR_PATTERN as @internal.
Changes:
- Rename
_testing→testHelpersinhost-iptables-shared.tsand update all 5 consuming test files. - Make
subnetsOverlapnon-exported inhost-env.ts; expose viatestHelpersobject and update the test file. - Add
@internalJSDoc +ts-prune-ignore-nexttoDOMAIN_CHAR_PATTERN.
Show a summary per file
| File | Description |
|---|---|
| src/host-iptables-shared.ts | Rename _testing export to testHelpers with refined @internal doc. |
| src/host-iptables-setup.test.ts | Update import to use testHelpers. |
| src/host-iptables-network.test.ts | Update import to use testHelpers. |
| src/host-iptables-host-access.test.ts | Update import to use testHelpers. |
| src/host-iptables-doh.test.ts | Update import to use testHelpers. |
| src/host-iptables-cleanup.test.ts | Update import to use testHelpers. |
| src/host-env.ts | Make subnetsOverlap private and re-expose via testHelpers. |
| src/docker-manager-utils.test.ts | Switch to testHelpers.subnetsOverlap for assertions. |
| src/domain-patterns.ts | Mark DOMAIN_CHAR_PATTERN as @internal and ignored by ts-prune. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 9/9 changed files
- Comments generated: 0
Smoke Test Results
Result: FAIL (1/3 tests failed)
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: FAIL — workflow misconfiguration: pre-step outputs not passed to agent step; GitHub MCP unauthenticated.
|
🔬 Smoke Test Results
Overall: FAIL — GitHub Actions template substitution did not occur;
|
Smoke Test: Gemini Engine Validation
PR Titles Reviewed:
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.
|
|
Smoke test Codex: FAIL 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 versions match — Python and Node.js differ between host and chroot environments.
|
Smoke Test Results — FAIL
Overall: ❌ FAIL
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — ❌ FAIL ❌ Failure DetailsJava (gson, caffeine) — two compounding issues:
Both projects fail at the
|
Summary
Addresses the remaining 3 [Export Audit] issues not fixed by #3169.
Changes
_testing→testHelpersinhost-iptables-shared.ts(fixes [Export Audit] Naming convention violation:_testingexport inhost-iptables-shared.ts#3221)@internalJSDoc tagRemove public export of
subnetsOverlapinhost-env.ts(fixes [Export Audit] Dead export: subnetsOverlap in src/host-env.ts is never called in production code #3205)testHelpersobject for test access onlyAdd
@internalJSDoc toDOMAIN_CHAR_PATTERNindomain-patterns.ts(fixes [Export Audit] Dead export: DOMAIN_CHAR_PATTERN in src/domain-patterns.ts is only used internally #3206)Issues closed
Closes #3221, closes #3205, closes #3206
Previously closed by #3169: #3220, #3226, #3223, #3224, #3225
All 8 [Export Audit] issues are now resolved.