Skip to content

BAD CODE™: stop release preflight from rerunning the full test corpus through prepack #826

Description

@flyingrobots

Problem

scripts/release-preflight.sh runs the coverage suite explicitly and then calls npm pack --dry-run. npm invokes the package prepack lifecycle for that dry-run, and prepack currently reruns build, lint, test:local, and consumer typechecking. A successful release preflight therefore repeats expensive gates that already ran in the same command and in CI.

Evidence

  • scripts/release-preflight.sh runs npm run test:coverage:ci before its pack phase.
  • The pack phase calls npm pack --dry-run without suppressing lifecycle scripts.
  • package.json defines prepack as build + lint + test:local + consumer typechecking.
  • PR Make v18-to-v19 migration safe and observable #825's release preflight took about ten minutes and visibly reran the unit corpus during packaging.

Desired outcome

  • Preserve a safe npm publish and manual npm pack lifecycle gate.
  • Give the release preflight an explicit artifact-build path that does not rerun gates already proven in the same invocation.
  • Keep the packed-artifact smoke and package-content verification intact.
  • Add executable coverage that proves release preflight invokes each expensive gate at most once.
  • Document which command owns validation versus artifact construction so future lifecycle changes cannot reintroduce the duplication.

Dependency posture

This is follow-up release-tooling debt, not a v19.0.1 migration blocker. Schedule it after the current migration-guidance milestone closes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:releasePrimary work area: release.area:toolingPrimary work area: tooling.priority:laterDeferred or speculative work.priority:nextNext in line after active work.status:availableOpen and available for prioritization; not blocked or actively in progress.type:debtDebt, rot, or structural risk.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions