refactor: remove dead exports from export audit#2960
Conversation
- Remove unused `OptionSourceResolver` type export from main-action.ts (not imported anywhere) — closes #2927 - Remove dead `extractPort` function from log-parser.ts (never called internally or externally) and its barrel re-export — closes #2914 - Remove redundant `PidTrackResult` re-export from pid-tracker.ts (already exported from types/index.ts) — closes #2915 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Smoke Test Results✅ Playwright: Page title verified Overall: PARTIAL (3/4 tests passed)
|
🔬 Smoke Test Results
Overall: FAIL — workflow pre-step outputs were not substituted into the agent prompt. The
|
🔥 Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PARTIAL — BYOK inference and file I/O pass; GitHub MCP blocked by sandbox credential isolation (expected in this environment).
|
There was a problem hiding this comment.
Pull request overview
This PR reduces the package’s public API surface by removing unused/dead exports identified by the export audit, keeping only the canonical/used symbols exposed.
Changes:
- Made
OptionSourceResolvermodule-private insrc/commands/main-action.ts. - Removed dead
extractPorthelper and its related tests; dropped it from the logs barrel re-export. - Removed the redundant
PidTrackResultre-export fromsrc/pid-tracker.ts.
Show a summary per file
| File | Description |
|---|---|
| src/commands/main-action.ts | Converts OptionSourceResolver from exported to module-private type to reduce public surface area. |
| src/logs/log-parser.ts | Removes unused extractPort helper function entirely. |
| src/logs/index.ts | Drops extractPort from the logs barrel exports. |
| src/logs/log-parser.test.ts | Removes tests that existed only to cover the now-removed extractPort. |
| src/pid-tracker.ts | Removes redundant PidTrackResult re-export (type remains available via src/types). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 5/5 changed files
- Comments generated: 0
|
Codex smoke test: 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 Smoke Test Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
Summary
Removes three dead/redundant exports identified during the export audit:
OptionSourceResolvertype (main-action.ts) — Not imported anywhere in production or tests. Closes [Export Audit] Unused exportOptionSourceResolverinsrc/commands/main-action.ts#2927extractPortfunction (log-parser.ts) — Dead code, never called internally or externally. Removes from barrel re-export and tests. Closes [Export Audit] Dead export:extractPortexported but never used in production code #2914PidTrackResultre-export (pid-tracker.ts) — Redundant; the canonical export already lives intypes/index.ts. Closes [Export Audit] Dead re-export:PidTrackResultre-exported frompid-tracker.tsbut never imported from there #2915Changes
src/commands/main-action.ts: Removeexportkeyword fromOptionSourceResolvertypesrc/logs/log-parser.ts: RemoveextractPortfunction entirelysrc/logs/index.ts: RemoveextractPortfrom barrel re-exportssrc/logs/log-parser.test.ts: RemoveextractPorttestssrc/pid-tracker.ts: Remove redundantPidTrackResultre-exportTesting
log-parser.test.ts,pid-tracker.test.ts)