Skip to content

fix: process catch-up frames in sequence order to prevent tariff misapplication#96

Open
ComputerOracle wants to merge 1 commit into
IoT-Billing-Service:mainfrom
ComputerOracle:fix/catchup-frame-ordering
Open

fix: process catch-up frames in sequence order to prevent tariff misapplication#96
ComputerOracle wants to merge 1 commit into
IoT-Billing-Service:mainfrom
ComputerOracle:fix/catchup-frame-ordering

Conversation

@ComputerOracle

Copy link
Copy Markdown

Replace Promise.all() with sorted async for-of in processCatchUp()
Batch frames by CATCH_UP_BATCH_SIZE=10, process sequentially within each batch
Add sequence validation gate in tariffEvaluator before rate lookup
Throw SequenceGapError (5s timeout) when frame.sequence != lastProcessed + 1
Add 5-test suite with 200-frame shuffled burst verifying order and tariff zones

closes #45

…pplication

- Replace Promise.all() with sorted async for-of in processCatchUp()
- Batch frames by CATCH_UP_BATCH_SIZE=10, process sequentially within each batch
- Add sequence validation gate in tariffEvaluator before rate lookup
- Throw SequenceGapError (5s timeout) when frame.sequence != lastProcessed + 1
- Add 5-test suite with 200-frame shuffled burst verifying order and tariff zones
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.

WebSocket Telemetry Frame Processing Order Violation During Reconnection Catch-Up

1 participant