Skip to content

Three delegation-completion.ts exports have no consumer outside their own module #814

Description

@tobyhede

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: lowDeferrable; mitigation already in placeenhancementNew feature or requestneeds-triageMaintainer needs to evaluate this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions