Repository navigation
test: control ACP disconnect fixture timing - #2002
Merged
Merged
Conversation
Model: gpt-6
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 issue
Problem / pressure
The first CLI attempt of run 40630618794 timed out in the disconnected
tool_call_updatecase; rerunning the job passed. The fixture froze timeout timers whileloro-repo0.25.0 measured persistence work with realperformance.now(). A persistence yield could be captured by the fake clock, then discarded when cleanup switched clocks, strandingrepo.destroy().Summary
Keep one real timer clock for these repository lifetimes. Use explicit prompt/disconnect signals, synchronously cancel the scheduled batch flush, and exercise both buffered and explicitly persisted notifications before disconnecting. Preserve all existing assertions and the 30-second timeout; no retry or product-code changes. Add a bilingual testing note and correct the fixture clock comment.
Visual explanation
Before / after
Test plan
Entire file: 20 consecutive independent Vitest processes, 74 cases each (1,480 passed), with
GIT_EXEC_PATHcleared for synthetic Git fixtures.Controlled slow branch: temporarily install a hoisted monotonic clock advancing 10ms per read before the SDK captures it. All six disconnect variants passed in five independent processes (30 cases); timer stacks confirmed
DocManager.drainDirtyDocsyielded.Ablation: remove only the real-timer fix under that injected clock. Execution, drain and assertions complete, then cleanup reproduces the original 30-second timeout.
The original CI log establishes a timeout, not its exact blocked await; the controlled reproduction establishes the fixture defect.
pnpm format, changed-file Oxfmt check,pnpm run docs check, workspace typechecking, both lint passes, i18n and all repository boundary guards passed.pnpm checkreached script tests, where the sandbox deniedlisten 127.0.0.1(EPERM). Re-runningpnpm test:ciwith local-port access passed scripts and 6,405 component cases; CLI reported 5,006 passed, 4 skipped and one failure in the unchangedgithub-git-transport.test.tsrecursive SSH fixture (context_unreadable). The changed batching file passed in that full CLI run. Direct Node execution withGIT_EXEC_PATHremoved passed that Git fixture on both unmodified main9fec3a21and this head. Fullpnpm checkis therefore not claimed green; downstream package tests after the recursive-run failure did not finish.Context handoff
Same-repository maintainer branch. Fixture-only change; no live-provider or packaged-desktop acceptance is claimed.