Skip to content

Repair generated-client output closure and enforce regeneration drift #870

Description

@chrisdoc

Outcome

The checked-in Hevy client is reproducibly generated into packages/hevy-client/src/generated, and every local/CI regeneration proves the tracked tree is current without recreating a root runtime src/ tree.

Ownership seam

The generated-artifact pipeline owns spec normalization, Kubb destination, formatting, curated barrels, and freshness checks. Generated files remain outputs and are never edited manually.

Scope

  • Correct Kubb path resolution so the configured output is the tracked package tree.
  • Add one hermetic regeneration check covering spec → normalization → Kubb → formatting → public barrels.
  • Fail when regeneration changes tracked files or creates retired root src/ output.
  • Keep upstream OpenAPI refresh a reviewed manual/scheduled drift workflow rather than an implicit build step.

Non-goals

  • Refreshing the upstream Hevy specification in this issue.
  • Changing generated runtime behavior beyond correcting ownership.
  • Manually reconciling generated files.

Portfolio placement

Wave 1 — correctness closure

Primary priority: Maintainer leverage

Dependencies

  • None. This issue is an immediate start within its wave.

Migration and release policy

Internal correctness repair. Preserve public package behavior and include the required empty Changeset unless a runtime-visible generated diff is intentionally accepted.

Acceptance criteria

  • npm run build:client from a clean checkout writes only the tracked generated tree and leaves no diff on the current spec.
  • A stale generated fixture is detected by the required regeneration gate.
  • The gate fails if root src/ is created.
  • Existing OpenAPI compatibility and package-boundary invariants remain enforced.

Validation

  • npm run build:client
  • npm run check:openapi
  • npm run check:boundaries
  • npm run build
  • npx vitest run --exclude tests/integration/**
  • npm run check
  • npm run check:types
  • npm run check:changeset

Stopping conditions

  • Do not fetch or accept upstream spec drift without a reviewed semantic diff.
  • Stop if Kubb cannot target the package tree without changing generated public behavior; document the blocker rather than hand-editing output.

Roadmap source

Portfolio decision: Choose the improvement portfolio and breaking-change migration policy

Architecture source: Synthesize deep-module boundaries and cross-cutting opportunities

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions