fix(replay): make bundled-openapi.json patch include-only#173
Merged
Conversation
The replay patch that preserves the Poetry include block for the bundled openapi.json (patch-6516695e, from #169) also carried version-string edits anchored to the generator placeholder (0.0.0.dev0). Fern now auto-versions on generation, so those hunks never match and conflict on every regen, flagging pyproject.toml + client_wrapper.py as unresolved customizations. Rewrite the patch to carry only the pyproject.toml include hunk: drop the two version hunks, drop client_wrapper.py from files, recompute content_hash, and remove the stale theirs_snapshot/status fields. No packaging or code change; version stays 15.1.0 so this does not publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kerbearasaurus
approved these changes
Jun 9, 2026
gavinsharp
added a commit
that referenced
this pull request
Jun 9, 2026
…oding (#177) The 2026-06-09 snapshot-encoding migration (regen #175) re-entangled the [tool.poetry] version line that #173 had stripped: it captured theirs_snapshot at the autoversioned 15.1.1 while the base generation carries the 0.0.0.dev0 placeholder, so the 3-way merge derives a spurious version customization that conflicts on every subsequent version bump. Confirmed via trial regen #176 (applied=0 conflicts=1, the "unresolved customization conflicts" banner returned). Set theirs_snapshot's [tool.poetry] version to the base placeholder (0.0.0.dev0) so the customization delta is include-only — the merge then takes the generated (autoversioned) value with no conflict. Also revert patch_content to the include-only form (content_hash back to 29d85120). Lock-only; version stays at 15.2.0 (already published) so this does not republish. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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
Rewrites the Fern replay patch that preserves our bundled-
openapi.jsonpackaging so it is include-only, fixing the "unresolved customization conflict" that has shown up onpyproject.tomlandsrc/phenoml/core/client_wrapper.pyon every SDK regeneration.No code or packaging behavior changes — the
includeblock inpyproject.tomlis untouched and still ships the bundled spec. This only edits.fern/replay.lock. The package version is unchanged (15.1.0), so this does not publish.Background
The bundled
openapi.jsonpackaging can't be expressed in Fern's Python generator config (re-declaring[tool.poetry]to addincludeis a TOML error), so it's preserved across regenerations via a Fern replay patch. That patch (patch-6516695e) was originally captured from the #169 release commit, which bundled two unrelated things:include = [{ path = "src/phenoml/openapi/openapi.json", … }]block, andversion = "0.0.0.dev0" → "15.0.3"inpyproject.tomland the same in theUser-Agent/X-Fern-SDK-Versionheaders inclient_wrapper.py.Fern now auto-versions during generation (it emits a real version, not the
0.0.0.dev0placeholder), so the patch's0.0.0.dev0anchors never match and those hunks conflict on every regen — flagging both files as unresolved customizations even though the working tree ends up correct. Theincludehunk itself always applies cleanly; only the version hunks are the problem.What changed
In
.fern/replay.lock,patch-6516695eis rewritten to carry only thepyproject.tomlincludehunk:pyproject.tomlversion+ the twoclient_wrapper.pyheader strings),src/phenoml/core/client_wrapper.pyfrom the patch'sfiles,content_hashwith Fern's own algorithm (sha256 of the patch text minusFrom/index/Date:lines),theirs_snapshot/statusfields (Fern's own patch-creation writes neither).The version strings are owned by Fern's generator and should never have lived in a replay patch; leaving them out lets Fern manage versions while the patch only preserves the one thing the generator can't emit itself.
Verifying
After merge, an observe-only regen confirms it without publishing:
fern generate --group python-sdk --version auto # opens a PR; do NOT merge itExpected: no "unresolved customization" banner, the
includeblock present in the generatedpyproject.toml, and the replay patch still include-only. If Fern's reconciliation were to re-pollute it, this PR is trivially revertable (it only touches the lock file).Note
Low Risk
Lock-file-only change to Fern replay metadata; no application code or published package behavior is modified.
Overview
Narrows the Fern replay patch
patch-6516695ein.fern/replay.lockso it only re-applies the Poetryincludeblock that bundlessrc/phenoml/openapi/openapi.jsoninto wheels/sdists.The patch no longer touches
pyproject.tomlversion orclient_wrapper.pyUser-Agent / SDK version hunks (those were anchored to the old0.0.0.dev0placeholder and conflicted on every regen now that Fern emits real versions).client_wrapper.pyis dropped from the patch’sfileslist,content_hashis updated, andtheirs_snapshot/status: unresolvedmetadata is removed.No SDK packaging or runtime behavior changes — only how regenerations reconcile customizations.
Reviewed by Cursor Bugbot for commit b82a1ee. Bugbot is set up for automated code reviews on this repo. Configure here.