fix(sdk-release-finalize): preserve Fern generation commits - #40
Merged
Conversation
gavinsharp
force-pushed
the
gavinsharp/preserve-fern-generation-tags
branch
3 times, most recently
from
July 10, 2026 17:20
b6d60e0 to
8855766
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8855766. Configure here.
gavinsharp
force-pushed
the
gavinsharp/preserve-fern-generation-tags
branch
from
July 10, 2026 17:24
8855766 to
afcaf25
Compare
gavinsharp
force-pushed
the
gavinsharp/preserve-fern-generation-tags
branch
from
July 10, 2026 17:26
afcaf25 to
3776a0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
SDK release finalization now preserves Fern's replay generation commit after a package publish succeeds. This works around Fern issue fern-api/fern#16314, where hosted autorelease can lose access to the prior
.fern/replay.lockcurrent_generationcommit and then fail auto-version withfatal: bad object.Changes & impact
SDK repos that call
sdk-release-finalizewill get an additional durablefern-generation/<sha>tag for the current Fern replay generation. The workflow remains idempotent for publish retries and continues to create the existing SDK version and Fern origin release tags.This is operationally important for Phenoml SDK releases: without a durable ref, Fern can open placeholder-version PRs such as
0.0.0-fern-placeholder/0.0.0.dev0even though generation otherwise succeeded. Preserving the replay generation commit keeps the next autorelease diff base reachable.Details
replay-lock-pathinput defaulting to.fern/replay.lock.current_generation, fetches that commit directly by SHA when needed, and creates/verifiesfern-generation/<sha>.fern_generation_tagandfern_generation_tag_createdoutputs for callers that want to inspect the preservation step.Testing
actionlint .github/workflows/sdk-release-finalize.ymlgit diff --check origin/main...HEADRelated
🤖 Generated with Claude Code
Note
Medium Risk
Adds git tag pushes and SHA fetches in a release workflow; failures or tag conflicts could block finalize, but behavior mirrors existing idempotent tagging and skips when replay is not configured.
Overview
sdk-release-finalizenow keeps Fern Replay’scurrent_generationcommit reachable after a successful registry publish, so the next hosted autorelease does not hit missing-object failures when the prior generation SHA is no longer on a ref.After the existing version and origin tags, the workflow reads
replay-lock-path(default.fern/replay.lock) from the release commit, validatescurrent_generation, fetches that commit by SHA if needed, and creates or verifies an idempotentfern-generation/<sha>tag. If the lock file is absent, the step is skipped. New workflow outputsfern_generation_tagandfern_generation_tag_createdexpose the result; the README documents the extra tag.Reviewed by Cursor Bugbot for commit 3776a0e. Bugbot is set up for automated code reviews on this repo. Configure here.