Repository navigation
feat: compact the checkpoint ledger in place and raise its bounds (A5) - #39
Open
James-Chapman wants to merge 2 commits into
Open
James-Chapman wants to merge 2 commits into
James-Chapman wants to merge 2 commits into
Conversation
The replacement ledger held at most 4,096 records and 8 MiB for an installation's lifetime, so about 580 applies with deletion exhausted checkpoints for good (Phase A5, ADR-0053). - Raise the ledger bounds to 65,536 records and 64 MiB and the store's aggregate quota to 128 MiB. - Add `compacted` and `checkpoint_carried` records. Replay rebuilds each carried entry through the ordinary transitions, requires it resolved, and keeps a revision floor for later starts. - Compact by trusted `file compact-checkpoints --discard-history`, and before an apply, restore, or deletion that would not fit. Refuse while work is unresolved; write nothing when nothing would be dropped. - Publish through a synced `ledger.compact` candidate and one handle-relative rename (`renameat` on Linux, a POSIX-semantics replace-if-exists rename on Windows) via a new `PrivateDirectory::replace_file`. Failures after the candidate exists are uncertain, poison the writer, and are not retried. - Validate appends incrementally and index operation IDs so replay of a full ledger is linear. - Add a filesystem and power-loss qualification plan; it has not run. - Bump the version to 0.35.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
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.



Summary
Phase A5: compact the checkpoint ledger in place and raise its bounds (ADR-0053). Version 0.35.0.
Stacked on
codex/plan-baseline-refresh.What changed
compactedandcheckpoint_carriedrecords. Replay rebuilds each carried entry through the normal transitions and requires it to be resolved. A revision floor is kept for later starts.file compact-checkpoints --discard-history, and automatically before an apply, restore or deletion that would not fit.ledger.compactcandidate and one handle-relative rename, using the newPrivateDirectory::replace_file.renameat.docs/filesystem-qualification.mdadds a filesystem and power-loss qualification plan. The plan has not been run.Why it changed
The ledger held at most 4,096 records and 8 MiB for the lifetime of an installation. About 580 applies with deletion used up checkpoints permanently.
Tests
Updated
crates/omgcode-core/src/files/replacement/tests.rs: the full-ledger padding helper now counts records incrementally, and the full-ledger test expects the trailing failed operation to be carried.crates/omgcode-core/tests/replacement_records.rs,crates/omgcode-core/tests/checkpoint_storage.rs: the new bounds and record kinds.crates/omgcode-cli/tests/checkpoint_lifecycle.rs: the CLI compaction workflow.crates/omgcode-platform/src/broker/windows/replacement/tests.rs:replace_fileon Windows.New
compaction_carries_retained_state_and_drops_deleted_historycompaction_is_refused_while_an_operation_or_deletion_is_unresolvedcompaction_faults_keep_a_valid_ledger_and_are_not_retrieda_full_ledger_is_compacted_before_apply_and_before_deletiona_compacted_ledger_replays_carried_state_and_keeps_the_revision_floorcompaction_and_carried_records_have_fixed_positionscarried_state_must_be_resolved_and_reachablecompaction_claims_have_strict_boundsaggregate_checkpoint_storage_refuses_before_exceeding_one_hundred_twenty_eight_mibcompacting_unused_storage_creates_nothingcompaction_drops_deleted_history_through_the_cli🤖 Generated with Claude Code