API Surface Issue
Category
Unused export
Summary
- File:
src/container-lifecycle.ts
- Symbols:
isAgentExternallyKilled (line 462), resetAgentExternallyKilled (line 470)
- Issue: Both functions are exported from
container-lifecycle.ts but are only consumed by the test file src/docker-manager-lifecycle.test.ts. Neither symbol is re-exported from the barrel src/docker-manager.ts, meaning they are not part of the intended public API surface yet are still export-ed.
Evidence
$ npx ts-prune
src/container-lifecycle.ts:462 - isAgentExternallyKilled
src/container-lifecycle.ts:470 - resetAgentExternallyKilled
$ grep -rn "isAgentExternallyKilled\|resetAgentExternallyKilled" src/ --include="*.ts" | grep -v ".test.ts"
src/container-lifecycle.ts:462:export function isAgentExternallyKilled(): boolean {
src/container-lifecycle.ts:470:export function resetAgentExternallyKilled(): void {
Only import site:
src/docker-manager-lifecycle.test.ts:
import { isAgentExternallyKilled, resetAgentExternallyKilled } from './container-lifecycle';
Recommended Fix
- If these functions are only needed for testing, remove the
export keyword and expose them via a _testing named export (consistent with the pattern used elsewhere in this codebase, e.g. host-iptables-shared.ts).
- If they are genuinely needed as part of the public API, add them to the
src/docker-manager.ts barrel re-export and document their intended usage.
Impact
- Dead code risk: Medium
- Maintenance burden: Low — test-only exports pollute the public module interface and can mislead consumers about the intended API surface.
Detected by Export Audit workflow. Triggered by push to main on 2026-05-15
Generated by API Surface & Export Audit · ● 6.2M · ◷
API Surface Issue
Category
Unused export
Summary
src/container-lifecycle.tsisAgentExternallyKilled(line 462),resetAgentExternallyKilled(line 470)container-lifecycle.tsbut are only consumed by the test filesrc/docker-manager-lifecycle.test.ts. Neither symbol is re-exported from the barrelsrc/docker-manager.ts, meaning they are not part of the intended public API surface yet are stillexport-ed.Evidence
Only import site:
Recommended Fix
exportkeyword and expose them via a_testingnamed export (consistent with the pattern used elsewhere in this codebase, e.g.host-iptables-shared.ts).src/docker-manager.tsbarrel re-export and document their intended usage.Impact
Detected by Export Audit workflow. Triggered by push to main on 2026-05-15