fix: remove unused exports from public API surface (batch 2)#3265
Conversation
- Remove export from AwfFileConfig interface in config-file.ts (#3242) Callers use type inference, no external imports exist. - Remove export from cleanupFirewallNetwork in host-iptables-network.ts (#3244) Only used in tests; exposed via testHelpers object. - Remove export from validateFormat and handlePredownloadAction in subcommands.ts (#3245) — internal helpers, tests already assert these must not be in public API. Closes #3242, closes #3244, closes #3245 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Removes three unused exports from the public API surface to keep internal helpers from leaking into module barrels, addressing the export-audit issues #3242, #3244, and #3245.
Changes:
- Drops
exportfromAwfFileConfiginterface insrc/config-file.ts(annotated@internal). - Makes
cleanupFirewallNetworkmodule-private and exposes it to tests via atestHelpersobject; test file updated to import via the helper. - Drops
exportfromvalidateFormatandhandlePredownloadActioninternal helpers insrc/commands/subcommands.ts.
Show a summary per file
| File | Description |
|---|---|
| src/config-file.ts | De-exports the internal AwfFileConfig interface. |
| src/host-iptables-network.ts | Makes cleanupFirewallNetwork private; re-exposes via testHelpers for tests. |
| src/host-iptables-network.test.ts | Updates import to access cleanupFirewallNetwork via testHelpers. |
| src/commands/subcommands.ts | Removes export from validateFormat and handlePredownloadAction. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Smoke Test Results❌ FAIL (2 of 3 tests passed)
To fix: The gh CLI needs authentication. Use
|
🔬 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: FAIL — workflow template variables (
|
🔬 Smoke Test Results
Overall: FAIL Pre-computed step outputs were not passed to the agent (template variables unexpanded). The smoke test infrastructure needs fixing.
|
|
#3259 refactor: split 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 Smoke Test Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — ❌ FAIL ❌ Failure DetailsJava (gson, caffeine) — Both projects failed with the same error: Maven cannot reach Maven Central (
|
Smoke Test Results: FAIL
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 Results
Overall: FAIL — Service containers are not reachable via
|
Summary
Removes three unnecessary exports from the public API surface, addressing the remaining open [Export Audit] issues.
Changes
src/config-file.tsAwfFileConfigexport— callers use type inference, no external importssrc/host-iptables-network.tscleanupFirewallNetworktestHelpersfor testssrc/commands/subcommands.tsvalidateFormat,handlePredownloadActionexport— internal helpers, existing tests already assert these must not be in public APIVerification
npm run build)Closes #3242, closes #3244, closes #3245