Repository navigation
Keep the in-flight guard on the current timeline poll - #622
Merged
Merged
Conversation
The timeline poller's finally cleared `inFlight` unconditionally, so a request the window change superseded cleared the flag while the request that replaced it was still in flight. Coming back to the tab then started a third request, breaking the one-request-in-flight rule. Clear the flag only when the request still owns the generation.
Collaborator
|
Verdict: PASS at eb034e5 Ran at this tip: Gate ③, source change reverted ( Exactly the one new test goes red. The mechanism checks out: Entering the merge queue now. |
Collaborator
|
Post-merge record: |
This was referenced Oct 21, 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.
Keep the in-flight guard on the current timeline poll
The timeline panel's poller (
plugins/timeline/client.js) clearedinFlightin afinallythat ran even for a request the window change had superseded.restart()(a window change,refresh, or coming back to the tab) bumpsgeneration, clearsinFlightand starts the replacement, so when the superseded answer landed it cleared the flag of the request that had replaced it. With the guard reading false while a request was genuinely in flight, the visibility watcher (if (... && !inFlight) restart()) started a third request — the "one request in flight" rule oftimeline.mdinvariant 7 was broken and the host could be polled twice over.inFlightis now cleared only when the request still owns itsgeneration, so a superseded answer leaves the replacement's guard alone.plugins/timeline/test/client.test.jsopens a panel, refreshes (superseding the first request), lets the superseded answer arrive, fires the visibility watcher and asserts no third request is issued — it fails without the change (the count reaches 3).Ran at the tip:
npm run verify(green,TZ=UTC). Not run: smoke (this macOS box has nosetsid, sodev/bench.shcannot startdsh web), Desktop, real-model steward.