Part of #798.
Verified against 2a6073d5f.
Observation
Three exports in packages/cli/src/helpers/delegation-completion.ts have no consumer outside their own module:
| export |
site |
callers |
advanceParentForInlineChild |
:410 |
:657 only (same file) |
reportTerminalToDelegatingRun |
:345 |
:666 only (same file) |
buildInlineParentAdvanceDeps |
:300 |
:355, :426, :495 — all same file |
Each is reachable only through propagateChildTerminal, which is the module's real entry point. The export keyword on all three widens the module's public surface for no consumer.
Correction to the source review
The architecture review that produced this finding listed four such exports and called them all "zero-caller … pass-throughs by the deletion test". Both halves are wrong:
extractParentLinkage (:71) has a genuine external production consumer — packages/cli/src/helpers/terminal-command.ts:49 imports it and calls it at :373. It stays exported.
- None of the three are zero-caller. They are single-module-caller, which is a smaller finding: the fix is dropping
export, not deleting code.
Fix
Drop export from the three. Tests that reach them directly should go through propagateChildTerminal, or the module should keep them exported deliberately with a note saying tests are the reason.
Low value, filed for completeness. Worth doing only when the file is open for something else.
Part of #798.
Verified against
2a6073d5f.Observation
Three exports in
packages/cli/src/helpers/delegation-completion.tshave no consumer outside their own module:advanceParentForInlineChild:410:657only (same file)reportTerminalToDelegatingRun:345:666only (same file)buildInlineParentAdvanceDeps:300:355,:426,:495— all same fileEach is reachable only through
propagateChildTerminal, which is the module's real entry point. Theexportkeyword on all three widens the module's public surface for no consumer.Correction to the source review
The architecture review that produced this finding listed four such exports and called them all "zero-caller … pass-throughs by the deletion test". Both halves are wrong:
extractParentLinkage(:71) has a genuine external production consumer —packages/cli/src/helpers/terminal-command.ts:49imports it and calls it at:373. It stays exported.export, not deleting code.Fix
Drop
exportfrom the three. Tests that reach them directly should go throughpropagateChildTerminal, or the module should keep them exported deliberately with a note saying tests are the reason.Low value, filed for completeness. Worth doing only when the file is open for something else.