Repository navigation
fix(oracle): use Math.trunc in bucketStartFor to prevent boundary drift - #632
Merged
nonsobethel0-dev merged 1 commit intoSep 25, 2026
Merged
Conversation
…ft (Parashield-Protocol#521) A float timestamp very close to a bucket boundary (e.g. 10:59:59.9999) could produce a ms value just above the boundary after multiplication, causing it to map to the next bucket instead of the current one. Truncating to whole seconds before conversion makes the result deterministic regardless of sub-second float noise. Adds two regression tests covering the just-before and at-boundary cases. Closes Parashield-Protocol#521 Closes Parashield-Protocol#522 Closes Parashield-Protocol#520 Closes Parashield-Protocol#519
|
@Chucks1093 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
nonsobethel0-dev
merged commit Sep 25, 2026
8dd25f3
into
Parashield-Protocol:main
0 of 3 checks passed
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.
Closes #521
Closes #522
Closes #520
Closes #519
Summary
OracleService.bucketStartFor, addedMath.truncbefore the* 1000conversion so that a float timestamp fractionally below a bucket boundary (e.g.10:59:59.9999) correctly maps to the earlier bucket instead of slipping into the next one due to floating-point multiplication noiseoracle.service.spec.ts: one verifying a float just below a boundary stays in the earlier bucket, and one confirming a timestamp exactly at a boundary opens the new bucket