Repository navigation
Conversation
Use one manual phase clock for the control owner and Postgres cleanup so elapsed scheduling time cannot consume the fake close allowance. Preserve the original failure, exact close assertions and real task cancellation. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
This branch has not been deployed
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: #735
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Native nonce-cleanup tests use an explicit phase clock while checking the original failure and exact session-close behavior.
Why
An expired cleanup allowance can legitimately terminate an owned session before public close starts. The nonce fixture requires exactly one public close but used the live clock for that allowance, so elapsed scheduling time could invalidate the assertion even when the original failure and write guards were preserved.
The fixture now supplies one manual clock to the control owner and Postgres cleanup. Both compare absolute deadlines in the same clock domain. The observed hosted failure's exact timing cause remains unknown; the controlled witness establishes the fixture's uncontrolled premise.
Scope and risk
The change adds the existing manual clock to one fixture. All 21 assertion expressions, the 0.5-second opening and exit allowances, and the real asynchronous waits and cancellation calls remain unchanged. The fixture's immediate fake close no longer depends on elapsed scheduling time. Deadline-specific sibling tests keep their existing clocks and behavior.
Compatibility, rollout and rollback
Tests
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex prepared the fixture change and checked the owner cleanup contract, unchanged assertions and controlled failing/passing cases. Fresh independent whole-concern review on the published head reports no source findings or nits. The remaining required actual-source CI must pass before merge.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist