API Surface Issue
Category
Test importing from wrong location
Summary
- Files:
src/docker-manager-utils.test.ts, src/docker-manager-cleanup.test.ts, src/docker-manager-lifecycle.test.ts
- Issue: Three test files import from the
docker-manager barrel, violating the explicit comment at the top of that file which states: "Only production-consumed symbols are re-exported here. Test files should import directly from the source modules."
This issue re-introduces the pattern fixed in #2958 and #3166 (both closed as completed), indicating the fix was incomplete or subsequently reverted.
Evidence
src/docker-manager-utils.test.ts:21: import { parseDifcProxyHost } from './docker-manager';
→ should import from './host-env'
src/docker-manager-cleanup.test.ts:1: import { writeConfigs, cleanup, collectDiagnosticLogs, preserveIptablesAudit } from './docker-manager';
→ should import from './config-writer' (writeConfigs) and './container-cleanup' (cleanup, collectDiagnosticLogs, preserveIptablesAudit)
src/docker-manager-lifecycle.test.ts:1: import { startContainers, runAgentCommand, fastKillAgentContainer, setAwfDockerHost, stopContainers, getLocalDockerEnv } from './docker-manager';
→ should import from './container-lifecycle' (startContainers, runAgentCommand, fastKillAgentContainer, stopContainers) and './docker-host' (setAwfDockerHost, getLocalDockerEnv)
Barrel comment in src/docker-manager.ts line 1–3:
// Re-export public API for backwards compatibility.
// Only production-consumed symbols are re-exported here. Test files should
// import directly from the source modules (host-env, compose-generator, etc.).
Recommended Fix
Update each test file to import directly from its respective source module:
docker-manager-utils.test.ts: change from './docker-manager' → from './host-env' for parseDifcProxyHost
docker-manager-cleanup.test.ts: change to import writeConfigs from './config-writer' and the rest from './container-cleanup'
docker-manager-lifecycle.test.ts: change to import lifecycle functions from './container-lifecycle' and setAwfDockerHost/getLocalDockerEnv from './docker-host'
Impact
- Dead code risk: Low
- Maintenance burden: Medium — tests that import via the barrel bypass the explicit layering contract, making future refactors of
docker-manager.ts harder and obscuring which modules each test actually exercises
Detected by Export Audit workflow. Triggered by push to main on 2026-05-27. Prior related issues: #2958, #3166.
Generated by API Surface & Export Audit · sonnet46 1.5M · ◷
API Surface Issue
Category
Test importing from wrong location
Summary
src/docker-manager-utils.test.ts,src/docker-manager-cleanup.test.ts,src/docker-manager-lifecycle.test.tsdocker-managerbarrel, violating the explicit comment at the top of that file which states: "Only production-consumed symbols are re-exported here. Test files should import directly from the source modules."This issue re-introduces the pattern fixed in #2958 and #3166 (both closed as completed), indicating the fix was incomplete or subsequently reverted.
Evidence
Barrel comment in
src/docker-manager.tsline 1–3:Recommended Fix
Update each test file to import directly from its respective source module:
docker-manager-utils.test.ts: changefrom './docker-manager'→from './host-env'forparseDifcProxyHostdocker-manager-cleanup.test.ts: change to importwriteConfigsfrom'./config-writer'and the rest from'./container-cleanup'docker-manager-lifecycle.test.ts: change to import lifecycle functions from'./container-lifecycle'andsetAwfDockerHost/getLocalDockerEnvfrom'./docker-host'Impact
docker-manager.tsharder and obscuring which modules each test actually exercisesDetected by Export Audit workflow. Triggered by push to main on 2026-05-27. Prior related issues: #2958, #3166.