feat(repair): --rebuild-since cutoff for rebuild mode - #127
Merged
Merged
Conversation
Crossed summaries whose span starts at or after the cutoff (a message id, or an ISO date resolved to the first message at or after it) are dissolved for the ladder to re-fold; older ones get the compact treatment. Regions that were repaired by hand are never re-summarized. The plan reports where the cutoff landed and how the crossed set split. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A hole owned by a root two or more levels below the crossed summary could not be adopted (adoption only knew one level down), so the summary's children were detached and, when they had no home, every ancestor unravelled — a 69-leaf hole took an L5 of 26k leaves apart. The owner is now adopted into the descendant one level above it whose span is adjacent (the crossed summary itself when the owner is one level down). Fleet dry runs: depth loss under compact drops to 0 on most stores. Co-Authored-By: Claude Fable 5.1 <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.
Rebuild mode re-summarizes the regions it dissolves. On stores whose older eras were repaired by hand (ownership surgery, refusal quarantines resolved by fallback, restored lineages), re-folding those eras would surface the same problems again and spend summarizer calls rediscovering them.
--rebuild-since <messageId|ISO date>: only crossed summaries whose span starts at or after the cutoff are dissolved for the ladder to re-fold; older ones get the compact treatment (adoption / re-homing, no model calls). An ISO date resolves to the first message at or after it. The plan reports where the cutoff landed and how the crossed set split (rebuildSince: {id, position, rebuilt, compacted}).Tests: cutoff by id and by date, unmatched cutoff throws; downward adoption closes a deep hole with no detachment. Suite 888/888. Dry-run on eleven production store copies: every plan reaches a clean store; depth loss under compact is now 0 on eight of them.
🤖 Generated with Claude Code