# REF-TASK-017 — Remove accidental exports and reviewed compatibility aliases

**Status:** Implemented  
**Kind:** Production/API hygiene  
**Depends on:** REF-TASK-008 through REF-TASK-016

## Problem and evidence

Incremental work has left exports whose audience is unclear: page-local helpers such as
`requiredProductIssues`/`mapProductIssues`, `safeReturnDestination`, constants exposed primarily for
tests, and the backend `FinalizeNonCommercialOrderInput` alias explicitly labelled backward-
compatible. Mechanical module splits may add temporary barrels/re-exports. TypeDoc treats configured
entry points as intentional public TypeScript API, so accidental exports increase documentation and
coupling even inside application packages.

## Proposed change

Inventory exports and actual imports after prior restructuring. Classify each as runtime entry
point, cross-module application contract, test seam, or accidental. Make accidental symbols private
or move pure logic to an intentionally named module; remove temporary re-exports. For compatibility
aliases, identify a real consumer and migration need before retaining or deleting them. Keep package
exports minimal and explicit.

## Constraints and sequence

Generate an import/export usage report, remove unused/accidental exports in small batches, validate,
then review compatibility aliases separately. Do not alter HTTP/OpenAPI names, scenario IDs,
documented external identifiers, or remove an alias based only on its label. Avoid barrel files that
create cycles or obscure dependency direction.

## Validation

Run affected unit tests after each batch, all-workspace typecheck, TypeDoc check/generation,
production builds, architecture/repository checks, coverage where production logic moved, and
`pnpm quality`.

## Guidance / ADR

REF-TASK-018 should define intentional export/test-seam rules. No ADR unless a package's supported
public surface changes for external consumers.
