Skip to content

Prune dead host-env compatibility re-exports after module split#3426

Merged
lpcox merged 3 commits into
mainfrom
copilot/export-audit-remove-dead-exports
May 19, 2026
Merged

Prune dead host-env compatibility re-exports after module split#3426
lpcox merged 3 commits into
mainfrom
copilot/export-audit-remove-dead-exports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

After the host-env module split, src/host-env.ts still re-exported 18 symbols that no production code consumes through that barrel path. This PR removes those dead compatibility exports and aligns remaining test callers with canonical module import paths.

  • API surface cleanup (src/host-env.ts)

    • Removed dead re-exports from:
      • ./constants (container names + env size constants)
      • ./host-identity (ACT_PRESET_BASE_IMAGE, MIN_REGULAR_UID, validateIdNotInSystemRange)
      • ./github-env (GitHub env/path parsing helpers + toolchain vars)
    • Kept active production-consumed exports (SQUID_PORT, host UID/GID/home helpers, etc.).
  • Test import realignment (canonical ownership)

    • Updated tests that previously imported these symbols via ./host-env to import from their source modules:
      • src/docker-manager-utils.test.ts
      • src/docker-manager-lifecycle.test.ts
      • src/compose-generator.test.ts
  • Representative change

    // before
    import { AGENT_CONTAINER_NAME } from './host-env';
    import { ACT_PRESET_BASE_IMAGE } from './host-env';
    
    // after
    import { AGENT_CONTAINER_NAME } from './constants';
    import { ACT_PRESET_BASE_IMAGE } from './host-identity';

Copilot AI changed the title [WIP] Remove dead backward-compat re-exports in src/host-env.ts Prune dead host-env compatibility re-exports after module split May 19, 2026
Copilot finished work on behalf of lpcox May 19, 2026 15:41
Copilot AI requested a review from lpcox May 19, 2026 15:41
@lpcox lpcox marked this pull request as ready for review May 19, 2026 21:34
Copilot AI review requested due to automatic review settings May 19, 2026 21:34
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 95.57% 95.62% 📈 +0.05%
Statements 95.40% 95.45% 📈 +0.05%
Functions 96.55% 96.41% 📉 -0.14%
Branches 87.91% 87.95% 📈 +0.04%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/host-env.ts 97.0% → 95.9% (-1.14%) 95.7% → 94.1% (-1.60%)
src/config-writer.ts 83.0% → 85.6% (+2.54%) 83.0% → 85.6% (+2.54%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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

Cleans up the src/host-env.ts backward-compat barrel after the host-env module split by removing re-exports that are no longer consumed via that path, and updates tests to import those symbols from their canonical modules.

Changes:

  • Removed dead compatibility re-exports from src/host-env.ts (constants, host-identity, github-env symbols).
  • Updated tests to import the affected symbols from ./constants, ./host-identity, and ./github-env instead of ./host-env.
  • Kept src/host-env.ts focused on the small set of production-consumed exports.
Show a summary per file
File Description
src/host-env.ts Removes unused barrel re-exports and narrows exported surface to production-consumed symbols.
src/docker-manager-utils.test.ts Re-aligns imports to canonical modules (host-identity + github-env) while keeping host-env-only helpers.
src/docker-manager-lifecycle.test.ts Switches AGENT_CONTAINER_NAME import to ./constants.
src/compose-generator.test.ts Switches ACT_PRESET_BASE_IMAGE import to ./host-identity.

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

Comment thread src/host-env.ts Outdated
@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.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 95.57% 95.60% 📈 +0.03%
Statements 95.40% 95.44% 📈 +0.04%
Functions 96.55% 96.41% 📉 -0.14%
Branches 87.91% 87.95% 📈 +0.04%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/host-env.ts 97.0% → 95.9% (-1.14%) 95.7% → 94.1% (-1.60%)
src/option-parsers.ts 99.0% → 98.8% (-0.20%) 99.0% → 98.9% (-0.15%)
src/config-writer.ts 83.0% → 85.6% (+2.54%) 83.0% → 85.6% (+2.54%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

GitHub API: Confirmed 2 PR entries in recent-prs.json
Playwright: GitHub page title contains "GitHub"
File Verify: File exists at /tmp/gh-aw/agent/smoke-test-claude-26130239877.txt

Result: PASS

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Offline Mode)

  • ✅ GitHub MCP connectivity — PR list fetched successfully
  • ✅ GitHub.com connectivity — pre-step data unavailable (template vars not substituted), skipped
  • ✅ File write/read — pre-step data unavailable, skipped
  • ✅ BYOK inference — responding now via api-proxy → api.githubcopilot.com

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

PR author: @Copilot · Assignees: @lpcox, @Copilot

Overall: PASS

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Status
GitHub MCP connectivity
GitHub.com HTTP connectivity ⚠️ N/A (pre-step data not available)
File write/read ⚠️ N/A (pre-step data not available)

PR: Prune dead host-env compatibility re-exports after module split
Author: @Copilot | Assignees: @lpcox, @Copilot

Overall: PARTIAL — MCP ✅, pre-step smoke data outputs were not substituted (template variables unexpanded).

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

PRs: Refactor option parser facade to direct re-exports and unify flag validation type; fix: switch doc-maintainer from copilot to claude engine; tests: replace host-env barrel imports with canonical host-env split modules; Prune dead host-env compatibility re-exports after module split
✅ Merged PR review; ❌ SafeInputs GH CLI; ✅ Playwright title; ❌ Tavily search
✅ File write/read; ✅ Discussion interaction; ✅ npm ci/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

Chroot Smoke Test Results

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

Overall: ❌ FAILED — Python and Node.js versions differ between host and chroot environment.

Tested by Smoke Chroot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results: Gemini

  • GitHub MCP Testing: ❌ (mcpscripts tool not found)
  • GitHub.com Connectivity: ❌ (SSL error 35, requires explicit proxy)
  • File Writing Testing: ✅
  • Bash Tool Testing: ✅

Last 2 merged PRs:

Overall status: FAIL

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

Smoke Test Results

  • Redis PING: ❌ (no response / timeout)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (no response / timeout)

Overall: FAILhost.docker.internal services are not reachable from this runner.

🔌 Service connectivity validated by Smoke Services

@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

Generated by Build Test Suite for issue #3426 · ● 7.6M ·

@lpcox lpcox merged commit cbd922c into main May 19, 2026
64 of 68 checks passed
@lpcox lpcox deleted the copilot/export-audit-remove-dead-exports branch May 19, 2026 23:29
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] Dead backward-compat re-exports in src/host-env.ts after module split

3 participants