Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Config keys made every deleting cleanup commit a version. Store the rule
in per-branch _retention/{n}.json files written with put-if-not-exists,
make expiration monotonic, and pin restore targets while restoring.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wjones127
force-pushed
the
will/history-retention-impl
branch
from
November 11, 2026 22:43
c4e31cc to
187efa0
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wjones127
force-pushed
the
will/history-retention-impl
branch
from
November 11, 2026 22:57
187efa0 to
3ffd09e
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cleanup and expire_versions write a per-branch _retention/{n}.json rule
before deleting, then keep versions that tags, branches, or restore pins
started referencing during the run. Tag and branch creation check the
rule after writing the ref; restore pins its target while it commits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wjones127
force-pushed
the
will/history-retention-impl
branch
from
November 11, 2026 23:27
3ffd09e to
a1c4a63
Compare
This branch has not been deployed
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.
Stacked on #10924 (format spec); review only the last commit.
Summary
Cleanup reads tags and branches once, then deletes, so a tag, branch, or restore published mid-run can point at a deleted version (#10499). This implements the history retention rule from #10924.
_retentionis added to the reserved dataset directories, so a branch cannot be namedfoo/_retention.Not in this PR:
process_manifest_file, but nothing exercises it end to end yet.Evidence
New tests in
dataset::history_retention:tag_create_and_update_respect_rule,branch_create_rejects_expired_version: expired targets fail withVersionNotFoundand leave no ref behind.restore_respects_rule_and_keeps_its_pin_after_committing: restoring an expired version fails and removes its pin; a successful restore leaves its target pinned.a_new_reference_on_a_released_branch_root_is_unplanned: a new tag or branch on a released branch root counts as new.cleanup_writes_rule_without_committing: cleanup leaves the latest version unchanged and writes{expiredBefore: 4, retained: [2]}for a tagged v2.cleanup_keeps_pinned_versions_until_the_pin_is_stale,writes_merge_with_the_current_rule,malformed_current_file_expires_nothing.Merge Risk
Door: one-way. Writes new on-disk files (
_retention/,_refs/pins/) that later releases must keep reading.Blast Radius: format, concurrency (cleanup, expire_versions, tags, branches, restore).
Refs #10499
🤖 Generated with Claude Code