Skip to content

Reset Fern Replay so the v4 SDK generates clean - #338

Merged
paul-paliychuk merged 2 commits into
v4from
fix/v4-ci-and-replay
Aug 24, 2026
Merged

Reset Fern Replay so the v4 SDK generates clean#338
paul-paliychuk merged 2 commits into
v4from
fix/v4-ci-and-replay

Conversation

@paul-paliychuk

Copy link
Copy Markdown
Contributor

Unfreezing .fernignore was not enough.

Fern Replay records each generation's tree hash in .fern/replay.lock and re-applies everything that has diverged since as a customization — independently of .fernignore. The lock on this branch is v3's history, so every v3 hand-written file still read as a customization and was re-applied on top of the generated v4 client.

Evidence: the last generation PR (#337) carries a [fern-replay] Applied customizations commit that restored src/zep_cloud/client.py, and mypy then failed on it.

This removes the lock so v4 starts with no recorded customizations, and stops freezing it — it is Fern's own state, and pinning it is what let a v3 history outlive the line it described.

No CI change is needed here: this repo's failure was Replay, not the workflow.

Unfreezing .fernignore was not enough. Fern Replay records each generation's
tree hash in .fern/replay.lock and re-applies everything that has diverged
since as a customization, independent of .fernignore. The lock on this branch
is v3's history, so every v3 hand-written file still looked like a
customization and came back on top of the generated v4 client -- the last
generation failed mypy on a client.py that Replay had restored.

Removes the lock so v4 starts with no recorded customizations, and stops
freezing it: the file is Fern's own state, and pinning it is what made the
history outlive the line it described.

Anything worth carrying forward from v3 is re-added deliberately, which
Replay will then track from a v4 baseline.
The earlier port rewrote client.py, external_clients, graph/utils.py and
their tests against v4 type names, while the checked-in generated code is
still v3's. The branch could not typecheck, so nothing on it could be
verified, and the port itself is now moot: these files are unfrozen and
Replay is reset, so the next generation writes them.

Restores them to the v3 state the branch was cut from. Unlike Go, they cannot
simply be deleted: __init__.py is generated and imports client.py, so removing
it breaks the package before a generation can replace it.

The Pydantic ontology DSL is the one piece here Fern will not regenerate. It
stays in history and is re-added deliberately if it earns its place on v4.
@paul-paliychuk
paul-paliychuk merged commit 3878685 into v4 Aug 24, 2026
4 checks passed
@paul-paliychuk
paul-paliychuk deleted the fix/v4-ci-and-replay branch August 24, 2026 23:24
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.

1 participant