Repository navigation
Check source and absent-target leases for flat-tree commits - #21
Merged
Merged
Conversation
ctoth
marked this pull request as ready for review
October 20, 2026 06:57
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.
A consumer planning a flat-tree merge could not require an absent target to remain absent, or require its source branches to retain their captured heads. Add named
expected_headschecks tocommit_flat_tree, where an explicitNonemeans expected absence. Reuse the existing mutation guard, typed mismatch error and target CAS; reject stale expectations before building the commit. Existingexpected_headcallers use the same validation path.Allow
merge_baseto consume full immutable commit IDs, taking precedence over same-named branches, so consumers can calculate the base from the exact parents used by their write plan.Validation: 16 focused tests pass across memory and disk stores, covering moved/deleted sources, absent targets, normalization and target-CAS interleavings, conflicting expectations, exact successful trees/parents, and commit-ID resolution. The Propstore consumer regressions reproduce the motivating authoring races in propstore/propstore#303. This PR supplies the storage mechanics; Propstore chooses its source and target expectations.