Skip to content

review revision - #547

Merged
Naomi-Gift merged 1 commit into
HubDApp:mainfrom
Bamzy123:review-revision
Aug 20, 2026
Merged

review revision#547
Naomi-Gift merged 1 commit into
HubDApp:mainfrom
Bamzy123:review-revision

Conversation

@Bamzy123

Copy link
Copy Markdown
Contributor

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

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.

bug: review revision history can grow beyond MAX_REVIEW_REVISIONS without pruning

2 participants