Skip to content

fix: Improve HULC timestamp counter with overflow detection and clock drift protection#196

Merged
bvanelli merged 1 commit into
mainfrom
fix/hulc-timestamp-overflow
Apr 10, 2026
Merged

fix: Improve HULC timestamp counter with overflow detection and clock drift protection#196
bvanelli merged 1 commit into
mainfrom
fix/hulc-timestamp-overflow

Conversation

@bvanelli
Copy link
Copy Markdown
Owner

@bvanelli bvanelli commented Apr 7, 2026

Summary

  • Add ActualOverflowError for when the HULC counter exceeds 0xFFFF within the same millisecond
  • Protect against clock drift by ensuring logical time never goes backward
  • Truncate timestamps to millisecond precision to match Node.js behavior
  • Refactor MessageEnvelope to expose a .message() helper, reducing duplication in SyncResponse.get_messages()

Closes #194

… drift protection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.64%. Comparing base (88d5780) to head (9102b61).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #196   +/-   ##
=======================================
  Coverage   97.64%   97.64%           
=======================================
  Files          21       21           
  Lines        3222     3231    +9     
=======================================
+ Hits         3146     3155    +9     
  Misses         76       76           

☔ 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.

@bvanelli bvanelli merged commit 4e498f2 into main Apr 10, 2026
9 checks passed
@bvanelli bvanelli deleted the fix/hulc-timestamp-overflow branch April 10, 2026 05:12
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.

Fail commit after create transaction more then 7000

1 participant