Commit Graph

13 Commits

Author SHA1 Message Date
Aiden Bai bea01b8cf5 feat(r3f): add material rendering diagnostics (#1633) 2026-08-12 15:40:07 -07:00
Aiden Bai c1611428d2 test(fuzz): complete React Bench audit corpus (#1619) 2026-08-09 02:04:45 -07:00
Aiden Bai 27a39dede7 fix(rules): recognize retained cleanup ownership (#1615)
* fix(rules): recognize retained cleanup ownership

* fix(types): normalize optional AST parents

* test: store imported corpus as source text fixtures
2026-08-08 21:50:44 -07:00
Aiden Bai 7f028ea904 fix(rules): accept compound unmount guards (#1606) 2026-08-08 06:23:37 -07:00
Aiden Bai f27fd5d136 fix(rules): close exhaustive React Bench audit gaps (#1605)
* fix(rules): close exhaustive React Bench audit gaps

* fix(core): fingerprint effect helper imports

* test(fuzz): preserve audit corpus bytes
2026-08-08 04:49:52 -07:00
Skosh afd60dbe69 fix(effect-needs-cleanup): prove effect-owned cleanup (#1559)
* fix(effect-needs-cleanup): handle returned identifiers for addEventListener/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>

* docs: add changeset for addEventListener cleanup fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(effect-needs-cleanup): prove resource ownership

* fix(effect-needs-cleanup): harden ownership proofs

* fix(effect-needs-cleanup): isolate deferred ownership

* fix(effect-needs-cleanup): prove deferred timer ownership

* fix(effect-needs-cleanup): narrow invocation owners

* fix(effect-needs-cleanup): track helper collection mutations

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-03 13:29:06 -07:00
Aiden Bai 95f99372c0 fix(rules): gate chain updates below React 18 (#1336)
* fix(rules): gate chain updates below React 18

* test(rules): pin chain parity to React 17
2026-07-17 01:54:13 -07:00
Aiden Bai 55dcb937fb fix(zod): recognize the official v4 export (#1201)
* chore: scaffold zod v4 subpath fix

* fix(zod): recognize the official v4 export

* test(zod): harden v4 subpath coverage
2026-07-13 05:55:12 -05:00
Aiden Bai f10f9ca8a6 fix(rules): three false-positive fixes from the adversarial FP hunt (#1106) 2026-07-09 05:20:49 -07:00
Aiden Bai e872767965 Revert "fix(rules): three false-positive fixes from the fuzz FP hunt"
This reverts commit 6ae8e46b10.
2026-07-09 04:37:10 -07:00
Aiden Bai 6ae8e46b10 fix(rules): three false-positive fixes from the fuzz FP hunt
Hunt: hunt-false-positives over the 73-seed regression corpus + the
pinned 47-repo OSS sample, plus strict per-rule fuzz (500 iterations)
over every rule changed in the RB-COMP-FIX batch and the two new rules
— all fire under fuzz and pass the crash/slow/verdict oracles.

Fixes:
- exhaustive-deps: the effect-event dep message no longer fires on a
  same-named useEffectEvent polyfill imported from a non-React package
  or defined locally. The origin resolution that already guarded
  rules-of-hooks and no-effect-event-in-deps is extracted into the
  shared isNonReactEffectEventCallee util and applied to the dep check.
- no-direct-state-mutation: null-initialized state is no longer plain
  React data when every observed setter call feeds it an opaque
  instance (new X(), receiver.createGain()) — field writes there are
  the instance's imperative API. Bare helper calls stay unclassified so
  the wangeditor-class lost-update detection keeps firing.
- only-export-components: a default-exported unknown factory fed only
  config objects/literals (defineFrontComponent({...})) is a library
  definition counted as a plain non-component export, not an "unnamed
  component"; known-HOC anonymous wrappers and curried HOCs keep their
  reports.

Corpus: seed headers extended so the polyfill and disposed-resource
seeds also pin exhaustive-deps / no-direct-state-mutation; new
config-factory seed; the two no-array-index-as-key seeds trimmed to
their still-ground-truth shapes (split-output rows and same-item
composite keys were reclassified as true positives by the fn-hunt
sweep, so those sections contradicted the corpus contract). Hunt now
reports 0 regressions.
2026-07-09 04:36:04 -07:00
Aiden Bai 9b59d96f06 feat(fuzz): verdict-preserving mutation oracle + two new rules + detection robustness sweep
Fuzz: add the verdict-drop oracle — semantics-preserving source rewrites
(parenthesized/cast/non-null receivers, concise-arrow-to-block returns,
no-op prologues, optional-chain and computed-member spellings) applied to
firing programs; a rule that goes silent under one keys on incidental
token shape. Wired into fuzz-rule as an advisory finding kind, a strict
per-rule robustness suite over the audited liveness fixtures, a
registry-wide census script, and new regression-corpus entries.

Rules: add no-locale-format-in-render (locale/timezone-dependent
formatting during render in SSR-capable projects → hydration mismatch,
gated off client-only frameworks) and extend
prefer-use-sync-external-store to detect hand-rolled module-scope stores
(let + listener set + subscribe fn consumed via useState snapshot +
useEffect subscription).

Robustness sweep: shared is-no-op-statement / is-global-method-call /
executes-during-render utilities and cast-wrapper unwrapping across the
rule registry so detection survives the rewrites above; census is 0
drops across all fixture-covered rules.
2026-07-09 03:37:39 -07:00
devin-ai-integration[bot] 0748a4ba19 test: adversarial fuzzing harness for every rule (@react-doctor/fuzz) (#1022)
Co-authored-by: Aiden Bai <aiden.bai05@gmail.com>
2026-07-02 15:09:02 -07:00