Repository navigation
Ordered set fixtures control their batching window - #871
Merged
Merged
Conversation
Signed-off-by: zlareb1 <[email protected]>
8 tasks done
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.
Related: #864
Changelog category (leave one):
Why
The ordered-set helper promises two point writes followed by one batch, but its real loop clock allows the submissions to cross the coalescer window. A failing run records four point writes and no batch, so it never exercises the intended ordered retry path. Establish the helper's promised window with the existing manual clock and public flush.
Scope and risk
Only
_sets_of_one_keychanges. Its clock patch lasts for the helper call and is restored on exit. Both callers' inputs, verdicts, refusal object and assertions are identical, as is every other test node. The SDK implementation, window, byte budget, batch limits and retry rules are unchanged. Tests that exercise real expiry do not use this helper.Compatibility, rollout and rollback
Tests
git diff --checkpass.python -m pytest -qand these nodes fromtests/unit/test_sdk_set_coalescer.py:test_an_unchecked_set_and_the_later_sets_of_its_key_go_out_again_in_order,test_an_unchecked_set_is_written_when_the_later_one_of_its_key_is_refused_alone,test_unchecked_sets_go_out_again_in_batches_the_size_the_budget_checked,test_third_set_inside_the_window_starts_a_bulk.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (Codex wrote the diff); the helper lifetime, flush and unchanged caller contracts were checked.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.