Skip to content

chore: bring committed generated artifacts back in sync with their generators (1/2) - #466

Open
josecarneiro wants to merge 15 commits into
mainfrom
claude/build-artifacts-outdated-1zq6jq
Open

chore: bring committed generated artifacts back in sync with their generators (1/2)#466
josecarneiro wants to merge 15 commits into
mainfrom
claude/build-artifacts-outdated-1zq6jq

Conversation

@josecarneiro

@josecarneiro josecarneiro commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Part 1 of 2 — mechanical, 100% generator output. This PR only makes the committed generated files match what the generators produce. The CI gates that keep them that way are in the follow-up, #472.

Split this way deliberately: the gate PR cannot merge until this one lands, because gate 1 would reject the stale tree it inherits.

Why these were stale

packages/cli commits ~160 generated artifacts. CI regenerates them on every push, but the auto-release job stages only:

FILES_TO_ADD="$FILES_TO_ADD packages/cli/package.json packages/cli-wrapper/package.json"

It generates the files, publishes them to npm, and then the runner is destroyed — the regenerated output never gets staged back. Compare the SDK branch of the same script, which stages packages/epilot-sdk-v2/ wholesale; that is why the SDK artifacts stayed current and the CLI's did not.

npm was never affected — tarballs are packed from freshly generated code. Only the repo's copy was wrong.

Two symptoms this clears:

  • 31 of 51 definitions/*.json did not match the clients/*/src/openapi.json they are copied from. The CLI resolves operations at runtime from those files, so running it from source exposed a stale operation set: ai-agents advertised 12 operations against the spec's 21, missing executeAgentStream, getExecutionFeedback and seven others.
  • packages/cli/src/index.ts reported version 0.1.51 while package.json reached 0.1.143.

What's in the diff

Area What
14 × clients/*/src/openapi.d.ts Aligned with generator output. Entirely cosmetic — the whole substantive change set across all 14 files is 10 removals of a line-1 /* eslint-disable */ banner plus blank-line placement. No type changed. See the note below.
14 × packages/epilot-sdk-v2/src/types/*.d.ts Downstream mirrors of the above.
packages/cli/{definitions,docs,src,README.md} Regenerated. 31 of 51 definitions → 0 stale; src/index.ts now reports the real version.

On the /* eslint-disable */ removals

The current typegen (openapicmd@2.9.2) does not emit that banner — there is no occurrence of it anywhere in openapicmd or openapi-client-axios* under node_modules, and fresh typegen output begins directly at import type {. In all 10 files it sits at line 1, so it is a generator preamble, not a hand-added inline suppression.

This has been unwinding gradually for two months: each routine "update client X with new spec" PR drops the banner for that one client — 44c524c1 (notification-client, 2026-07-03), c33e0ed1 (validation-rules, 2026-08-19), b91e4b9e (entity-client via #467, 2026-08-31). 41 of 51 clients on main have already lost it; the 10 here are simply the clients nobody has regenerated since. This PR finishes that migration rather than starting one.

Note also that biome.json excludes **/*.d.ts, so nothing lints these files — the banner is inert and removing it cannot unsuppress a real rule.

Scope note

This PR originally also refreshed the journey-config spec to 1.4.3. #473 has since landed that same spec on main — including the JourneyActivationGuarantee change — so that work is fully superseded and has been dropped, along with its now-duplicate changeset. There is no spec change and no changeset left in this PR. It is purely regeneration.

Test plan

  • pnpm lint — clean (524 files)
  • Re-running both generators produces no diff — the tree is self-consistent
  • pnpm build — exit 0, and leaves the tree clean
  • packages/epilot-sdk-v2 compact definition tests — 206 passed (the suite that catches committed compact definitions diverging from the client specs)
  • All 51 packages/cli/definitions/*.json byte-identical to the clients/*/src/openapi.json they are copied from
  • CI green on the current head

Review notes

  • Large but mechanical. The meaningful check is that regenerating produces no diff — that is the whole claim.
  • Merge this before #472.
  • This branch has absorbed four rounds of the same drift while waiting for review, one per auto-release bump commit (@epilot/cli 0.1.140 → 0.1.143). Releases cut through changesets do not cause it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV

14 of 51 client typings differed from what `npm run typegen` produces, so the
documented CONTRIBUTING flow mixed unrelated churn into every client update.

All differences are cosmetic — a stale `/* eslint-disable */` header left over
from the pre-biome era, blank-line placement, and trailing whitespace. No type
changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
The committed spec was still 1.4.2 because the only thing refreshing it was
journey-client's own `build`, which rewrote the file locally and never got
committed. (A follow-up PR removes that network fetch from the build.)

Adds JourneyActivationGuarantee: responses that return a Journey now guarantee
an explicit `settings.isActive`, while the flag stays optional in request
bodies. Type-level only — no new paths or operations, so
src/openapi-runtime.json is unchanged.

Released via changeset, matching every other client spec update.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
packages/cli commits ~160 generated artifacts (definitions/, docs/,
src/commands/apis/, src/generated/api-list.ts, src/index.ts, README.md). CI
regenerates them on every push but the release job only stages
packages/cli/package.json, so they had not been updated since 2026-08-26.

Symptoms this clears:

- 31 of 51 definitions/*.json did not match the clients/*/src/openapi.json they
  are copied from. The CLI resolves operations at runtime from those files, so
  running it from source exposed a stale operation set — ai-agents advertised 12
  operations against the spec's 21, missing executeAgentStream,
  getExecutionFeedback and seven others.
- src/index.ts reported version 0.1.51 while package.json was at 0.1.141.

Published tarballs were never affected — CI regenerates before packing.

The epilot-sdk-v2 changes are the downstream mirrors of the two preceding
commits (client typings and journey-config 1.4.3).

A follow-up PR adds the CI gates that keep these from drifting again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
@josecarneiro
josecarneiro force-pushed the claude/build-artifacts-outdated-1zq6jq branch from fd7d7a2 to be9da70 Compare September 1, 2026 10:49
@josecarneiro josecarneiro changed the title fix: stop committed generated artifacts drifting from their generators chore: bring committed generated artifacts back in sync with their generators (1/2) Sep 1, 2026
Merging main brought in the environments spec reshape (#463), the entity/pricing
attribute-type allowlists (#469) and the @epilot/cli@0.1.142 release. That
release again staged only packages/cli/package.json, so main had
definitions/environments.json stale against the spec it is copied from and
src/index.ts reporting 0.1.51 against a package.json at 0.1.142.

Regenerating brings both in line: all 51 definitions match their client specs
and src/index.ts reports 0.1.142.

Third occurrence of this drift since the PR was opened — once per release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
…s-outdated-1zq6jq

# Conflicts:
#	clients/journey-client/src/openapi.d.ts
#	packages/epilot-sdk-v2/docs/journey.md
#	packages/epilot-sdk-v2/src/docs/journey.json
#	packages/epilot-sdk-v2/src/types/journey.d.ts
The @epilot/cli@0.1.143 release again staged only packages/cli/package.json,
leaving src/index.ts reporting 0.1.51 against a package.json at 0.1.143.

Fourth occurrence since this PR was opened — once per release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
The @epilot/cli@0.1.144 release again staged only packages/cli/package.json, so
main had definitions/app.json and definitions/validation-rules.json stale
against the specs they are copied from (the external-values work in #480) and
src/index.ts reporting 0.1.51 against a package.json at 0.1.144.

Fifth occurrence since this PR was opened — once per auto-release bump commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
Two auto-release bumps landed since the last sync (@epilot/cli@0.1.145 and
0.1.146), each staging only packages/cli/package.json. main was left with
definitions/automation.json, event-catalog.json and journey.json stale against
the specs they are copied from — the event-catalog custom event lifecycle work
(#482) and the journey environment-variable data source (#474) — plus
api-list.ts missing their new operations and src/index.ts reporting 0.1.51
against a package.json at 0.1.146.

Sixth and seventh occurrences since this PR was opened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MhYbcfHQfe7bk2R37P75zV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants