Skip to content

Trim unused exports from option-parsers barrel#3760

Merged
lpcox merged 4 commits into
mainfrom
copilot/export-audit-remove-unused-re-exports
May 25, 2026
Merged

Trim unused exports from option-parsers barrel#3760
lpcox merged 4 commits into
mainfrom
copilot/export-audit-remove-unused-re-exports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 25, 2026

The src/option-parsers.ts facade was exporting two symbols that had no external barrel consumers: validateAllowHostServicePorts and escapeShellArg. This PR narrows the barrel API to currently used exports while preserving direct imports from source parser modules.

  • Barrel API surface cleanup

    • Removed validateAllowHostServicePorts from the host-port-parsers re-export block.
    • Removed escapeShellArg from the shell-utils re-export block.
  • Facade contract test alignment

    • Updated src/option-parsers-reexports.test.ts to stop asserting re-exports for the removed symbols.
    • Kept assertions for remaining re-exports (e.g., applyHostServicePortsConfig, joinShellArgs) intact.
// src/option-parsers.ts
export {
  validateAllowHostPorts,
  applyHostServicePortsConfig,
} from './parsers/host-port-parsers';

export {
  joinShellArgs,
} from './parsers/shell-utils';

Copilot AI changed the title [WIP] Remove unused barrel re-exports in option-parsers module Trim unused exports from option-parsers barrel May 25, 2026
Copilot finished work on behalf of lpcox May 25, 2026 14:55
Copilot AI requested a review from lpcox May 25, 2026 14:55
@lpcox lpcox marked this pull request as ready for review May 25, 2026 15:08
Copilot AI review requested due to automatic review settings May 25, 2026 15:08
@github-actions

This comment has been minimized.

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 narrows the src/option-parsers.ts facade (barrel) API by removing two re-exports (validateAllowHostServicePorts, escapeShellArg) that are intended to be consumed via direct imports from their underlying parser modules instead of the facade.

Changes:

  • Removed validateAllowHostServicePorts and escapeShellArg from the src/option-parsers.ts re-export surface.
  • Updated the facade contract test (src/option-parsers-reexports.test.ts) to stop asserting those two re-exports.
Show a summary per file
File Description
src/option-parsers.ts Removes two symbols from the barrel’s public re-export list to reduce facade surface area.
src/option-parsers-reexports.test.ts Aligns re-export assertions with the reduced barrel exports.

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: 2

Comment thread src/option-parsers.ts
Comment thread src/option-parsers.ts
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed

💥 [THE END] — Illustrated by Smoke Claude

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

lpcox and others added 2 commits May 25, 2026 08:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

GitHub MCP: Fetched PR #3766 "fix: use module-level mock for fs.existsSync in config-writer test"
File Test: File not found at expected path
GitHub.com: Pre-step HTTP status not available in context

Status: PARTIAL PASS (MCP verified, file test failed)

cc: @lpcox @Copilot

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Offline)

GitHub MCP — Latest PR: #3766 (fix: use module-level mock for fs.existsSync in config-writer test)
File Test — Pre-step file not found
GitHub.com HTTP — Pre-step variable not populated
BYOK Inference — Response generated via api-proxy → api.githubcopilot.com

Mode: BYOK offline (COPILOT_OFFLINE=true) via api-proxy sidecar
Status: PARTIAL (inference working, file test failed)

@lpcox @Copilot — BYOK path validated

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

Smoke test Codex: FAIL
PRs reviewed: fix: use module-level mock for fs.existsSync in config-writer test; Increase security-guard max-turns from 3 to 10
✅ GitHub PR review
❌ safeinputs-gh PR query
✅ Playwright GitHub title
❌ Tavily web search
✅ File write/read, discussion comment, and build
Overall status: FAIL

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

Smoke Test Results (Gemini)

  • GitHub MCP Testing: ❌ (Tool mcpscripts missing)
  • GitHub.com Connectivity: ❌ (Status 000, Exit 35)
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅

Overall Status: FAIL

PR Titles:

Warning

Firewall blocked 1 domain

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

  • localhost

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

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

💎 Faceted by Smoke Gemini

@github-actions
Copy link
Copy Markdown
Contributor

Service Connectivity Test Results

❌ Redis: Connection timeout/error
❌ PostgreSQL pg_isready: No response
❌ PostgreSQL SELECT 1: Not tested (pg_isready failed)

Overall: FAIL — Services on host.docker.internal are not reachable from AWF sandbox

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

Chroot Version Comparison Test Results

The chroot environment test has been executed. Here are the runtime version comparisons:

Runtime Host Version Chroot Version Match?
Python 3.12.13 3.12.3 ❌ NO
Node.js v24.15.0 v22.22.3 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result:FAILED - Not all runtimes match between host and chroot environments.

Analysis

  • Python: Minor version mismatch (3.12.13 vs 3.12.3) - the chroot has an older patch version
  • Node.js: Major version mismatch (v24 vs v22) - significant difference that could affect compatibility
  • Go: ✅ Versions match exactly

The test suite expects all runtime versions to match exactly between the host and chroot environments to ensure consistent behavior. The Python and Node.js mismatches indicate that the chroot environment is not properly mirroring the host system runtimes.

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

All build tests completed successfully across all ecosystems!

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


Summary:

  • Bun (2/2 projects)
  • C++ (2/2 projects)
  • Deno (2/2 projects)
  • .NET (2/2 projects)
  • Go (3/3 projects)
  • Java (2/2 projects)
  • Node.js (3/3 projects)
  • Rust (2/2 projects)

All 18 test projects built and passed tests successfully.

Generated by Build Test Suite for issue #3760 · ● 16.3M ·

@lpcox lpcox merged commit 2329aa0 into main May 25, 2026
60 of 64 checks passed
@lpcox lpcox deleted the copilot/export-audit-remove-unused-re-exports branch May 25, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Export Audit] Unused barrel re-exports in option-parsers module

3 participants