Skip to content

Comments

IsolatedHive checksum cipher fix#279

Merged
Rexios80 merged 18 commits intomainfrom
feature/isolated-hive-checksum-cipher-fix
Jan 16, 2026
Merged

IsolatedHive checksum cipher fix#279
Rexios80 merged 18 commits intomainfrom
feature/isolated-hive-checksum-cipher-fix

Conversation

@Rexios80
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue with checksum cipher handling in IsolatedHive by introducing explicit keyCrc tracking. Previously, IsolatedHive did not properly pass the cipher's key CRC through to the frame reading/writing process, causing compatibility issues with encrypted data.

Changes:

  • Added keyCrc parameter throughout the storage backend and frame I/O infrastructure to properly track cipher key CRCs
  • Consolidated warning messages into a centralized HiveWarning class for better maintainability
  • Added backwards compatibility logic to read frames written before keyCrc was properly handled
  • Added comprehensive integration tests for encrypted IsolatedHive data compatibility

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
hive/lib/src/util/logger.dart Added HiveWarning class to centralize warning messages and added bigIntWarning and crcRecalculationWarning toggles
hive/lib/src/binary/binary_writer_impl.dart Updated to use centralized warnings and accept keyCrc parameter in writeFrame
hive/lib/src/binary/binary_reader_impl.dart Added keyCrc parameter to readFrame with backwards compatibility fallback
hive/lib/src/hive_impl.dart Moved warning message to HiveWarning class and added keyCrc parameter to box opening methods
hive/lib/src/isolate/isolated_hive_impl/impl/isolated_hive_impl_vm.dart Added keyCrc calculation and passing to isolate handler
hive/lib/src/isolate/handler/isolated_hive_handler.dart Consolidated openBox/openLazyBox handling and added keyCrc parameter passing
hive/lib/src/backend/vm/storage_backend_vm.dart Added keyCrc field and parameter throughout read/write operations
hive/lib/src/backend/storage_backend_memory.dart Added keyCrc parameter to constructor and operations
hive/lib/src/io/frame_io_helper.dart Added keyCrc parameter to frame reading methods
hive/test/integration/isolate_test.dart Added integration tests for encrypted data compatibility and backwards compatibility
hive/test/tests/* Updated test calls to match new signatures with additional null parameters
Comments suppressed due to low confidence (1)

hive/test/integration/isolate_test.dart:219

  • Corrected spelling of 'compatable' to 'compatible'.
      test('IsolatedHive data compatable with Hive', () async {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 98.07692% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.61%. Comparing base (d57d4e5) to head (082aa10).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...lib/src/isolate/handler/isolated_hive_handler.dart 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
+ Coverage   93.60%   93.61%   +0.01%     
==========================================
  Files          64       64              
  Lines        2612     2617       +5     
==========================================
+ Hits         2445     2450       +5     
  Misses        167      167              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rexios80 Rexios80 merged commit 3a37ed8 into main Jan 16, 2026
25 of 26 checks passed
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.

1 participant