Skip to content

[Export Audit] Multiple log-commands modules export symbols that are only used internally #2488

Description

@github-actions

API Surface Issue

Category

Unused export — log command module internal types and helpers

Summary

  • Files: src/commands/logs-stats.ts, src/commands/logs-summary.ts, src/commands/logs-command-helpers.ts, src/logs/log-formatter.ts, src/logs/log-streamer.ts
  • Symbols: StatsFormat, SummaryFormat, LoggingOptions, LogsCommandOptions, discoverAndSelectSource, findPolicyManifestForSource, loadLogsWithErrorHandling, LogFormatterOptions, StreamOptions
  • Issue: These types and helpers are exported but show 0 external imports. They are consumed only within their own file or through indirect call chains within the same subsystem.

Evidence

# All show 0 external imports (checked across src/ and tests/):
0  StatsFormat            src/commands/logs-stats.ts:11
0  SummaryFormat          src/commands/logs-summary.ts:14
0  LoggingOptions         src/commands/logs-command-helpers.ts:22
0  LogsCommandOptions     src/commands/logs.ts:19
0  discoverAndSelectSource src/commands/logs-command-helpers.ts:37
0  findPolicyManifestForSource src/commands/logs-command-helpers.ts:90
0  loadLogsWithErrorHandling   src/commands/logs-command-helpers.ts:127
0  LogFormatterOptions    src/logs/log-formatter.ts:11
0  StreamOptions          src/logs/log-streamer.ts:18

Note: LogFormatterOptions is re-exported via src/logs/index.ts but src/logs/index.ts itself has no external consumers that use this symbol.

Recommended Fix

For each symbol, remove export if it is only used within the module that defines it. For types re-exported via src/logs/index.ts, assess whether the barrel export is intended as a public API or convenience re-export that can be trimmed.

Impact

  • Dead code risk: Medium — clutters the logs subsystem's public surface area
  • Maintenance burden: Medium — unintentionally exported types create implied stability guarantees

Detected by Export Audit workflow. Triggered by push to main on 2026-05-04

Generated by API Surface & Export Audit · ● 292.5K ·

  • expires on Jun 3, 2026, 2:41 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions