Repository navigation
Conversation
Use one idle-driven clock for the mock exchange timers and owned close. Keep the six cases and their bounds, with a private-loop task census at teardown. Signed-off-by: zlareb1 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Nov 20, 2026
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: #1019
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):
Not applicable.
Why
The placement exchange fixture mixes a frozen close clock with real event-loop timers. Its simulated reply takes 40 ms against a 75 ms work timer, so scheduling delays can expire a reply that the test models as timely. The current fixture failed both a timely refusal and the wait for response cancellation in a main CI run. The exact source of the elapsed scheduling delay is unmeasured.
The fixture gives each case a private event loop and one manual clock for its timers and owned close. The selector advances that clock by its idle timeout, then polls without waiting. The simulated reply, streaming reads, work timeout and cancellation waiter keep their existing durations and ordering. CPU scheduling does not spend their simulated allowance.
Scope and risk
One unit fixture changes. The six cases and both complete test functions retain their assertions and literal bounds. Response parsing and client exit still use the existing inert transport. The real elapsed-time assertion remains. A teardown census cancels and joins any task left on the private loop and fails if it finds one; the shared session-loop cleanup guard is unchanged.
The fixture uses the selector interface of its private event loop. Independent review and hosted execution must verify timer ordering and teardown. This change does not establish a production performance improvement or a cause for other acceptance failures.
Compatibility, rollout and rollback
Tests
git diff --checkpass. All six parameter cases remain.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex wrote the fixture change and checked its scope against the original cases and failure evidence.
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.