Skip to content

proposal: an expansion reconciles its child set instead of rebuilding it - #45

Open
delchev wants to merge 1 commit into
mainfrom
spec/expansion-reconcile
Open

proposal: an expansion reconciles its child set instead of rebuilding it#45
delchev wants to merge 1 commit into
mainfrom
spec/expansion-reconcile

Conversation

@delchev

@delchev delchev commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Proposal 0023 (renumber freely — several in-flight branches claim 0021).

The gap. 1.5 says of expansions only 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 text section 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant