API Surface Issue
Category
Dead export / Unused public API surface
Summary
- File:
src/docker-manager.ts
- Symbols:
AGENT_CONTAINER_NAME, ACT_PRESET_BASE_IMAGE, MIN_REGULAR_UID, validateIdNotInSystemRange, getSafeHostUid, getSafeHostGid, getRealUserHome, extractGhHostFromServerUrl, readGitHubPathEntries, readGitHubEnvEntries, parseGitHubEnvFile, mergeGitHubPathEntries, readEnvFile, subnetsOverlap, SslConfig, stripScheme, generateDockerCompose, isAgentExternallyKilled, resetAgentExternallyKilled
- Issue: The
docker-manager.ts barrel file re-exports these symbols from underlying source modules (host-env.ts, compose-generator.ts, container-lifecycle.ts), but none are ever imported from docker-manager.ts by production code. Only test files consume them from this barrel.
Evidence
src/docker-manager.ts comment states "Re-export public API for backwards compatibility", yet the backwards-compatibility consumers are all test files:
# Test file consumers:
src/docker-manager-utils.test.ts:1: import { subnetsOverlap, validateIdNotInSystemRange, ..., MIN_REGULAR_UID, ACT_PRESET_BASE_IMAGE, ... } from './docker-manager'
src/docker-manager-lifecycle.test.ts:1: import { ..., isAgentExternallyKilled, resetAgentExternallyKilled, AGENT_CONTAINER_NAME, ... } from './docker-manager'
src/compose-generator.test.ts:1: import { generateDockerCompose, ACT_PRESET_BASE_IMAGE } from './docker-manager'
# Production code imports directly from source modules (e.g., host-env.ts, container-lifecycle.ts)
ts-prune confirmed all 19 symbols as unused outside their source modules (no (used in module) qualifier).
Recommended Fix
- Update test files to import directly from real source modules:
docker-manager-utils.test.ts → ./host-env
docker-manager-lifecycle.test.ts → ./container-lifecycle and ./host-env
compose-generator.test.ts → ./compose-generator and ./host-env
- Remove the now-unused re-exports from
src/docker-manager.ts, keeping only symbols that production code actually imports.
Impact
- Dead code risk: Medium — barrel silently exposes internal symbols beyond its intended public interface
- Maintenance burden: Medium — changes to
host-env.ts symbol names require barrel updates even though no production code depends on them
Detected by Export Audit workflow. Triggered by push to main on 2026-05-14
Generated by API Surface & Export Audit · ● 22.1M · ◷
API Surface Issue
Category
Dead export / Unused public API surface
Summary
src/docker-manager.tsAGENT_CONTAINER_NAME,ACT_PRESET_BASE_IMAGE,MIN_REGULAR_UID,validateIdNotInSystemRange,getSafeHostUid,getSafeHostGid,getRealUserHome,extractGhHostFromServerUrl,readGitHubPathEntries,readGitHubEnvEntries,parseGitHubEnvFile,mergeGitHubPathEntries,readEnvFile,subnetsOverlap,SslConfig,stripScheme,generateDockerCompose,isAgentExternallyKilled,resetAgentExternallyKilleddocker-manager.tsbarrel file re-exports these symbols from underlying source modules (host-env.ts,compose-generator.ts,container-lifecycle.ts), but none are ever imported fromdocker-manager.tsby production code. Only test files consume them from this barrel.Evidence
src/docker-manager.tscomment states "Re-export public API for backwards compatibility", yet the backwards-compatibility consumers are all test files:ts-prune confirmed all 19 symbols as unused outside their source modules (no
(used in module)qualifier).Recommended Fix
docker-manager-utils.test.ts→./host-envdocker-manager-lifecycle.test.ts→./container-lifecycleand./host-envcompose-generator.test.ts→./compose-generatorand./host-envsrc/docker-manager.ts, keeping only symbols that production code actually imports.Impact
host-env.tssymbol names require barrel updates even though no production code depends on themDetected by Export Audit workflow. Triggered by push to main on 2026-05-14