FP104: accept shared browser timer cleanup APIs - #1876
Merged
Merged
Conversation
commit: |
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
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.
Browser timeouts and intervals share a handle pool. React Doctor rejected
clearTimeout(interval)andclearInterval(timeout)even when they released the correct handle. This change accepts both browser cleanup APIs, including retained timer collections.The rule still rejects wrong handles and shadowed clear functions. A new control also checks that an unconditional timer has cleanup on every return path; this closes a conditional-cleanup gap found while validating the FP.
Confirmed audit case: 48 — pmndrs/react-three-fiber. The exact pinned source no longer reports this case.
Validation: 1,053 cleanup tests passed. Build, lint, typecheck, format check, and JSON report smoke check passed. The full suite reached 1,093 passing plugin files and failed an unrelated mutation-rule timing assertion (409.94 ms versus a 409.28 ms bound). Includes synthetic regression controls, a fuzz seed, and patch changesets for the three published packages.
Pushed-head corpus comparison
All 49 repository roots completed. Added reports: 0. Removed reports: 2. The removed reports cover the audited interval cleared by clearTimeout and a timeout whose previous handle is cleared by clearInterval before replacement. Both have unmount cleanup. Each removed location was checked against the pinned remote source. Evaluation sandboxes and snapshots were verified deleted.
CI correction
The new direct-handle path check initially rejected timer arrays released through reduce and Array.from callbacks. Limit that check to direct timer bindings so the existing collection cleanup analysis remains active. Both callbacks now have focused regression coverage, including cross-paired timer APIs. All 1,055 cleanup tests and the full workspace suite passed, followed by lint, typecheck, formatting, and JSON-report smoke checks. The earlier corpus comparison above covers the initial head; the final comparison for e6114f1 completed all 49 repositories and 49 roots with zero skips. It removed the same two reviewed false reports and added none. Exact run sandboxes and the snapshot were verified deleted.