fix(.fern/replay.lock): re-anchor on reachable [fern-replay] init commit#840
Merged
developerkunal merged 1 commit intoMay 18, 2026
Conversation
`current_generation`, the second `generations[]` entry, and `patch-4894603d.base_generation` all referenced `b61c6fa84f61d6c77d9f4ab0fa6c2bf512c8680d` — a commit that doesn't exist in this repo's git history (verified with `git cat-file` and `git merge-base --is-ancestor` after a full unshallow fetch). Its recorded `tree_hash` (`063654dc...`) is also gone from the object database. Likely origin: a past fern-bot PR landed via squash-merge, which produces a new SHA on `master` distinct from the SHA recorded in the `[fern-replay]` commit's lockfile. That recorded SHA then orphans. Customer-visible effect: every `fern generate` loads this lockfile, can't resolve `b61c6fa`, falls into the deepest detection fallback, captures ~200 pre-Fern commits as orphan patches, and fails when the resulting PR body exceeds GitHub's 65,536-char limit. This change re-anchors all three references on `ffe61f6a098cb25a875019a37f2615045b97344e` — the original `[fern-replay] Initialize Replay for SDK customizations (auth0#833)` commit by fern-api[bot], which is reachable on master. The generation entry's `tree_hash`, `timestamp`, and `base_branch_head` all use the real values from that commit. `patch-4894603d`'s `patch_content` and `theirs_snapshot` are kept untouched. The 8208-line `theirs_snapshot` is the safety net that lets the applicator reconstruct the customer's intended `src/auth0/management/__init__.py` content on the next regeneration even if the line-anchored diff's context has drifted against the new anchor's tree.
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.
Why this PR exists
.fern/replay.lockon master references the commit SHAb61c6fa84f61d6c77d9f4ab0fa6c2bf512c8680din three fields:current_generation, the second entry ingenerations[], andpatch-4894603d.base_generation. That SHA exists on the abandoned bot branchfern-bot/2026-05-01_07-46-04_377but is unreachable frommaster's first-parent history, because PR #836 ("SDK regeneration", merged 2026-05-01) was squash-merged — squash created a new merge commit9398d1da…on master and discarded the original bot-branch SHAs.The result is that every subsequent
fern generateloads this lockfile, can't resolveb61c6fafrom a master-only clone, falls into the deepest detection fallback path, and (until the engine fix linked below also lands) captures up to 200 pre-Fern commits as orphan patches — overflowing GitHub's 65,536-character PR body limit and failing PR creation outright.What this PR changes
Three references on
.fern/replay.lock, no other lines touched:```diff
-current_generation: b61c6fa
+current_generation: ffe61f6
```
```diff
```
ffe61f6a098cb25a875019a37f2615045b97344eis the merge commit on master for PR #833 ("[fern-replay] Initialize Replay for SDK customizations"), authored byfern-api[bot]. Unlikeb61c6fa…, it sits on master's first-parent history and is reachable from any clone of master.patch_contentand the ~8,200-linetheirs_snapshot(which contains the full intended content ofsrc/auth0/management/__init__.py) are untouched — they're the safety net that lets the replay applicator reconstruct the customer-intended file content on the next regeneration even if the line-anchored diff's context has drifted against the new anchor's tree.Effect after merge
fern generateloads the lockfile, findscurrent_generation: ffe61f6…reachable from masterbase_generationanchorspatch-4894603dreapplies, preserving the custom wiring insrc/auth0/management/__init__.py