proposal: an expansion reconciles its child set instead of rebuilding it - #45
Open
delchev wants to merge 1 commit into
Open
proposal: an expansion reconciles its child set instead of rebuilding it#45delchev wants to merge 1 commit into
delchev wants to merge 1 commit into
Conversation
1.5 says only that a span change "replaces the generated child set", which permits deleting every row and recreating the set. The reaction's writes are not one atomic step, so an interrupted recreation destroys committed rows. The proposal makes the change a diff: add the missing periods, delete the periods the span no longer covers, keep the rest - with their identifiers. Co-Authored-By: Claude Opus 5 <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.
Proposal
0023(renumber freely — several in-flight branches claim0021).The gap. 1.5 says of
expansionsonly that "a span change replaces the generated child set". Read literally that permits the simplest implementation: delete every row pointing at the master, then create the set the new span calls for. But the reaction that maintains the set is an event handler whose writes each commit on their own — the same non-transactional consistency model the format already assumes for a posting, which 1.5 specifies as idempotent and resumable rather than atomic.So an interrupted recreation is not a retryable no-op. Ten day rows are deleted, the fifth of twelve new ones fails a validation on the child, and eight rows are simply gone — with a count field stating something else and every roll-up having consumed the phantom shrink. Nothing reads as inconsistent, because no individual write failed.
The proposal. No new keyword: a span change is reconciled as a diff — add the periods that are missing, delete the rows whose period the span no longer covers, keep the rest (same rows, same identifiers, edits intact); with
spread, recompute a kept row's share for the new row count. An interrupted reconciliation can then leave the set incomplete — repaired on the next one, which also resolves duplicates on one period down to one — but can never destroy a row the span still calls for. A reference to a generated row also survives an edit to the span's other end.The proposal carries its
Specification textsection with the anchor and the normative block, so a release folds it in mechanically.Implementation: eclipse-dirigible/dirigible#6817 (PR linked in the proposal), where the reconciliation is asserted both on the generated source and at runtime — an edited span must answer with the same row identifiers for the days it still covers.
🤖 Generated with Claude Code