Conversation
Four cases of false positives where cleanup happens through indirection: 1. Cleanup function stored in variable and called 2. Callback ref with React's null-on-unmount contract 3. Observer.observe() in forEach, disconnect() at top level 4. Timer in event handler, cleared in cleanup All four should pass but currently fail. Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Investigation reveals 4 distinct issues, not one unified dataflow problem: 1. Closure-held cleanup (complex dataflow through mutable vars) 2. Callback ref disposal (React contract recognition) 3. Observer forEach (clear semantic, lowest risk) 4. Handler allocations (architectural ownership model) Recommend focused PRs per case rather than unified fix to avoid false negatives. Case 3 (forEach) most tractable for initial fix. Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
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.
Investigation Summary
Deep analysis (110k+ tokens) reveals issue #1736 encompasses 4 distinct root causes, each requiring different fix approaches:
Files Added
ISSUE-1736-ANALYSIS.md- Technical deep-dive on all 4 casesTRIAGE-1736-RECOMMENDATION.md- Prioritization and rationaleeffect-needs-cleanup-issue-1736.test.ts- Failing reproduction testsRecommendation
Rather than attempting a unified fix that risks false negatives:
Why Not Fix All 4 Now?
effect-needs-cleanup.tsneeds careful changesNext Steps
Seeking maintainer input on:
See linked files for full technical analysis.
Closes #1736