Skip to content

refactor: remove dead exports from export audit#2960

Merged
lpcox merged 1 commit into
mainfrom
fix/export-audit-cleanup
May 12, 2026
Merged

refactor: remove dead exports from export audit#2960
lpcox merged 1 commit into
mainfrom
fix/export-audit-cleanup

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented May 12, 2026

Summary

Removes three dead/redundant exports identified during the export audit:

  1. OptionSourceResolver type (main-action.ts) — Not imported anywhere in production or tests. Closes [Export Audit] Unused export OptionSourceResolver in src/commands/main-action.ts #2927
  2. extractPort function (log-parser.ts) — Dead code, never called internally or externally. Removes from barrel re-export and tests. Closes [Export Audit] Dead export: extractPort exported but never used in production code #2914
  3. PidTrackResult re-export (pid-tracker.ts) — Redundant; the canonical export already lives in types/index.ts. Closes [Export Audit] Dead re-export: PidTrackResult re-exported from pid-tracker.ts but never imported from there #2915

Changes

  • src/commands/main-action.ts: Remove export keyword from OptionSourceResolver type
  • src/logs/log-parser.ts: Remove extractPort function entirely
  • src/logs/index.ts: Remove extractPort from barrel re-exports
  • src/logs/log-parser.test.ts: Remove extractPort tests
  • src/pid-tracker.ts: Remove redundant PidTrackResult re-export

Testing

  • All affected tests pass (log-parser.test.ts, pid-tracker.test.ts)
  • TypeScript build passes
  • No production code depends on removed exports

- 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>
@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

✅ Playwright: Page title verified
✅ File Writing: Test file created
✅ Bash Tool: File verified
❌ GitHub MCP: gh CLI authentication failed

Overall: PARTIAL (3/4 tests passed)

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Status
GitHub MCP connectivity ❌ (401 — MCP token not propagated)
GitHub.com HTTP ❌ (pre-step output not available — template vars unexpanded)
File write/read ❌ (pre-step output not available — template vars unexpanded)

Overall: FAIL — workflow pre-step outputs were not substituted into the agent prompt. The steps.smoke-data.outputs.* variables arrived as literal strings. No PR data was available to verify.

PR author: @lpcox

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot BYOK (Offline) Mode

Test Result
GitHub MCP connectivity ❌ 401 (sandbox credential isolation)
GitHub.com HTTP ⚠️ Pre-step template not expanded
File write/read (smoke-test-copilot-byok-25705075639.txt) ✅ Content verified
BYOK inference (agent → api-proxy → api.githubcopilot.com) ✅ Responding in BYOK mode

Running in BYOK offline mode (COPILOT_OFFLINE=true) via api-proxy → api.githubcopilot.com.

Overall: PARTIAL — BYOK inference and file I/O pass; GitHub MCP blocked by sandbox credential isolation (expected in this environment).

🔑 BYOK report filed by Smoke Copilot BYOK

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 OptionSourceResolver module-private in src/commands/main-action.ts.
  • Removed dead extractPort helper and its related tests; dropped it from the logs barrel re-export.
  • Removed the redundant PidTrackResult re-export from src/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

@github-actions
Copy link
Copy Markdown
Contributor

Codex smoke test: FAIL
PRs: Refactor host iptables tests and fix follow-up CI regressions; test: remove dead mockLogger export from logger test helper
✅ GitHub PR review
❌ safeinputs-gh PR query (tool unavailable)
✅ Playwright title check
❌ Tavily MCP search (no tools exposed)
✅ File/bash and npm build
❌ github-discussion-query unavailable; oracle comment posted via fallback

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Copy Markdown
Contributor

Chroot Smoke Test Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.3 ❌ NO
Node.js v24.14.1 v20.20.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot.

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx All passed ✅ PASS
Node.js execa All passed ✅ PASS
Node.js p-limit All passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Note (Java): Maven's default local repository at ~/.m2/repository was owned by root (no write permission). Tests passed using -Dmaven.repo.local=/tmp/gh-aw/agent/m2repo as a workaround.

Generated by Build Test Suite for issue #2960 · ● 629.2K ·

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: GitHub Actions Services Connectivity

Check Result
Redis PING host.docker.internal not resolvable / connection timed out
PostgreSQL pg_isready ❌ no response on port 5432
PostgreSQL SELECT 1 ❌ connection failed

Overall: FAILhost.docker.internal does not resolve in this environment; service containers appear unreachable from the runner host (outside AWF sandbox).

🔌 Service connectivity validated by Smoke Services

@lpcox lpcox merged commit 513e86f into main May 12, 2026
68 of 72 checks passed
@lpcox lpcox deleted the fix/export-audit-cleanup branch May 12, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants