Skip to content

chore: clean up Fern Replay state before the next regeneration - #183

Merged
kraenhansen merged 3 commits into
mainfrom
fernignore-hand-written-config
Oct 28, 2026
Merged

kraenhansen merged 3 commits into
mainfrom
fernignore-hand-written-config

Conversation

@kraenhansen

@kraenhansen kraenhansen commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Every regeneration has to hand-restore files Fern overwrites (#166, #182): the RUSTSEC-patched Cargo.lock, publish-prereleases = false, and the Windows smoke workflow. The cause is stale Fern Replay state: one patch replays the alpha-era publish-prereleases = true, and 10 of the 14 tracked customizations were stuck unresolved, so Replay skipped them.

Merging this PR will:

  • Forget patch-3324bcc8, which re-enabled prerelease publishing on every regeneration.
  • Resolve the 10 unresolved patches against the current generation, so Replay carries the patched Cargo.lock, Cargo.toml and windows-smoke.yml forward. Three byte-identical patches were consolidated, leaving 10 tracked.
  • Add .github/workflows/windows-smoke.yml to .fernignore, since it has no generated counterpart.

Additional context intended for coding agents and bots

Root cause

  • The generator's dist-workspace.toml template has never contained publish-prereleases, so cargo-dist's default of false applies. In SDK regeneration #182 the [fern-generated] commit removed the key and the [fern-replay] Applied customizations commit re-added true from patch-3324bcc8. No setting in elevenlabs-dx's fern/apis/cli/generators.yml controls this.
  • fern replay status on main reported 10 [unresolved] patches, including patch-c6e92222 (rustls-webpki 0.103.16, RUSTSEC-2026-0382) and patch-ef424569 (windows-smoke). Replay skips unresolved patches, so the regenerated Cargo.lock and the deleted workflow landed as-is.

How the resolve was done

  • fern replay forget patch-3324bcc8 -y, then fern replay resolve. The only conflicts were stacked historical version lines in Cargo.toml and Cargo.lock. Both were resolved to main, which is the state verified in SDK regeneration #182 (cargo test, CI audit).
  • The second resolve pass needs the generation commits in replay.lock to be present locally. Four had been squash-merged away and were fetched by SHA from GitHub. Without them, every patch is skipped with "cumulative-diff fallback failed for unlocatable files".
  • The resolved patches share identical Cargo.lock/Cargo.toml hunks (cumulative-diff fallback). They merge cleanly in the simulation below.

Test plan and verification

  • Simulated the next regeneration with @fern-api/replay 0.19.3: laid down the 07f8471 generator output (respecting .fernignore), then ran ReplayService.prepareReplay + applyPreparedReplay with stageOnly. Result: 10 patches applied, 0 conflicts. Cargo.lock, Cargo.toml and dist-workspace.toml match this branch exactly, with rustls-webpki 0.103.16 and publish-prereleases = false.
  • Same simulation against main's replay.lock: Cargo.lock regresses to rustls-webpki 0.103.13, reproducing SDK regeneration #182.
  • Known difference in both simulations: src/openapi/executor.rs mis-merges two adjacent tests from patch-0d14627a (fix: don't send Authorization alongside an explicit API key #153), which this PR does not touch. The real SDK regeneration #182 regeneration produced a correct file, so this is likely a local @fern-api/replay version difference. Check executor.rs in the next regeneration PR.
  • The next regeneration PR should leave Cargo.lock, dist-workspace.toml and windows-smoke.yml untouched.

🤖 Generated with Claude Code

kraenhansen and others added 3 commits October 28, 2026 10:44
windows-smoke.yml has no generated counterpart, so a regeneration deletes it
(#182).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
patch-3324bcc8 replayed the alpha-era publish-prereleases = true onto every
regeneration (#166, #182). The generator's template omits the key, so
cargo-dist's default of false applies once the patch is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Patches replayed:
  - patch-809b383f: fix(deps): patch two advisories; keep the verification script
  - patch-composite-7dd8e976: Customer customizations (composite)
  - patch-3acf25c9: feat: Adds new say command (#143)
  - patch-3866acd2: Make intent optional (#150)
  - patch-0d14627a: fix: don't send Authorization alongside an explicit API key (#153)
  - patch-68caee9a: feat: add onboard init, connect, check and test for agent-led setup (#154)
  - patch-d0001ac9: fix: onboard flags that survive npx, and check that the app loads the key (1.5.1) (#159)
  - patch-ab3cae7d: fix: onboard check finds the key file by name in a monorepo package (1.5.2) (#160)
  - patch-c6e92222: fix: bump rustls-webpki to 0.103.16 for RUSTSEC-2026-0382 (#174)
  - patch-ef424569: fix: the browser's approval reaches onboard on Windows (1.7.1) (#167)
@kraenhansen
kraenhansen force-pushed the fernignore-hand-written-config branch from c658b05 to 35398f2 Compare October 28, 2026 09:49
@kraenhansen kraenhansen changed the title fix: keep regeneration from deleting windows-smoke.yml and resetting dist config chore: clean up Fern Replay state before the next regeneration Oct 28, 2026
@kraenhansen
kraenhansen requested a review from PaulAsjes October 28, 2026 09:53
@kraenhansen
kraenhansen marked this pull request as ready for review October 28, 2026 09:53
@kraenhansen
kraenhansen merged commit ff5ad20 into main Oct 28, 2026
16 checks passed
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