fix(effect-needs-cleanup): prove effect-owned cleanup - #1559
Open
skoshx wants to merge 11 commits into
Open
Conversation
…stener/addListener Fixes #1558 - Part 1 - Allow returning identifiers bound to addEventListener/addListener results as valid cleanup - Recognize calling such identifiers (e.g., ) as cleanup - This fixes false positives for React Native's NetInfo.addEventListener and similar APIs Remaining work: helper function cleanup and array collection cleanup Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
commit: |
Contributor
Interactive terminal E2ERecorded from the built CLI at |
aidenybai
marked this pull request as ready for review
August 3, 2026 03:01
Member
|
Superseded by #1564, which carries the current implementation on top of main, includes the cleanup path-coverage review fix, and has the focused/fuzz validation. Closing this older failing-CI branch to avoid merging duplicate detector changes. |
Member
|
Superseded by #1564, which landed the cleanup-ownership fix with focused regression coverage and the FPFNFIX82 ship checks. |
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.

Why
effect-needs-cleanupstill reports safe effects and accepts unsafe effects when cleanup ownership is expressed through returned listener disposers, mapped subscription collections, or guarded effect-local timer helpers. This builds on #1564 with the adversarial ownership cases that were not covered there.The need remains reproducible on current
main: its copied adversarial suite fails 70 of 160 cases.What changed
addEventListenerandaddListenerAPIs while preserving DOM, legacy media-query, and React Native subscription-object diagnostics.forEachorfor...of, rejecting conditional cleanup, the wrong collection, escaped collections, and dropped or overwritten entries.Validation
14136e860Test plan
nr testnr lintnr typechecknr format:checknr smoke:json-reportnr -C packages/oxlint-plugin-react-doctor test effect-needs-cleanup.issue-1558.test.tsFUZZ_RULE=effect-needs-cleanup FUZZ_ITERATIONS=25000 FUZZ_SEED=8675309 FUZZ_INVARIANTS=1 FUZZ_STRICT=1 nr fuzz