Skip to content

[Export Audit] Test-only export WorkflowDependencies interface in cli-workflow.ts #4180

@github-actions

Description

@github-actions

API Surface Issue

Category

Unused export (production-side dead code)

Summary

  • File: src/cli-workflow.ts
  • Symbol: WorkflowDependencies (line 6)
  • Issue: WorkflowDependencies is exported but never imported by any production module outside cli-workflow.ts. The interface is consumed internally as the parameter type of runMainWorkflow (line 42) and externally only from the co-located test file, which uses it ~23 times to shape its test fixtures.

Evidence

ts-prune flagged WorkflowDependencies as "used in module" (only referenced from within its defining file by production code). The only external reference in src/ is the test file:

src/cli-workflow.test.ts:1:  import { runMainWorkflow, WorkflowDependencies } from './cli-workflow';
src/cli-workflow.test.ts:25:    const dependencies: WorkflowDependencies = { ... };
   [... 22 more test fixture sites ...]

Production consumption is entirely internal:

src/cli-workflow.ts:6:  export interface WorkflowDependencies {
src/cli-workflow.ts:42:    dependencies: WorkflowDependencies,

This matches the pattern of #3828, #4173, #4174 — internal helpers exported solely so co-located tests can import them directly.

Recommended Fix

  1. Drop the export keyword from WorkflowDependencies in src/cli-workflow.ts, making it module-private.
  2. Update src/cli-workflow.test.ts to either rely on TypeScript inference of the parameter shape (no explicit annotation) or import the type as a type-only re-export from a dedicated test-utils file if the explicit annotation is needed for readability.

Impact

  • Dead code risk: Low (purely a compile-time type, no runtime behavior)
  • Maintenance burden: Medium (~23 test sites pin a type that is otherwise an internal implementation detail; refactors to the dependency injection shape can silently break tests that bypass the public entrypoint)

Detected by Export Audit workflow. Triggered by push to main on 2026-06-02

Generated by API Surface & Export Audit · opus47 5.5M ·

  • expires on Jul 2, 2026, 12:58 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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