Skip to content

FP104: accept shared browser timer cleanup APIs - #1876

Merged
aidenybai merged 2 commits into
mainfrom
codex/fp104-timer-cleanup-pairing
Oct 5, 2026
Merged

aidenybai merged 2 commits into
mainfrom
codex/fp104-timer-cleanup-pairing

Conversation

@aidenybai

@aidenybai aidenybai commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Browser timeouts and intervals share a handle pool. React Doctor rejected clearTimeout(interval) and clearInterval(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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1876
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1876
npm i https://pkg.pr.new/react-doctor@1876

commit: e6114f1

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at e6114f1 in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@aidenybai
aidenybai marked this pull request as ready for review October 5, 2026 06:36
@aidenybai
aidenybai merged commit 1b149ba into main Oct 5, 2026
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant