review revision - #547
Merged
Merged
Conversation
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 of Work
I have resolved issue #534 on the review-revision branch:
Root Cause:
append_review_revision previously did not enforce pruning when revision_count >= MAX_REVIEW_REVISIONS (50). Instead, it entered an else block returning revision_count.saturating_sub(1) without writing new revisions or pruning old ones.
Changes Made:
Updated append_review_revision in
storage.rs
and
review_registry.rs
to implement FIFO pruning:
Shifts existing stored revisions down by 1 position (overwriting index 0).
Appends the new revision at index MAX_REVIEW_REVISIONS - 1 (49).
Caps ReviewRevisionCount at 50 and removes any excess legacy keys.
Added unit test test_review_revision_history_pruning_at_max_limit in
review_history.rs
to verify cap enforcement and history bounds after 50+ edits.
close #534