RDFPFN792026: trace hydration branches through rendered values - #1488
Merged
Conversation
commit: |
Contributor
Interactive terminal E2ERecorded from the built CLI at |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f5a3f62. Configure here.
aidenybai
force-pushed
the
codex/rdfpfn792026-hydration-browser
branch
from
July 29, 2026 14:56
f5a3f62 to
9cc9aeb
Compare
This was referenced Jul 30, 2026
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
ReactBench exposed browser-global hydration branches that the rule missed when the predicate flowed through mutable aliases, local helpers, memoized objects, hook state, or compiled
createElementoutput.What
ReactBench evidence
ivEkXud)The
ivEkXudhook initializer is intentionally not reported from its standalone source file. Its rendered consumer appears only in a separate patched file, so this file-local rule cannot prove the hydration mismatch.Test plan
nr testinpackages/oxlint-plugin-react-doctor: 958 files, 24,819 passed, 201 skippedFUZZ_RULE=no-hydration-branch-on-browser-global FUZZ_ITERATIONS=500 FUZZ_SEED=792026 nr fuzznr typecheckin the plugin and fuzz packagesnr lintnr format:checknr smoke:json-reportThe root test/typecheck orchestration was also attempted. Unrelated workers exhausted the shared runner after the affected packages had passed; the isolated affected-package gates are green.
Local RDE could not start because
AXIOM_DATASETis not configured.Note
Medium Risk
Large, intricate changes to a correctness lint rule’s static analysis; behavior shifts on many edge cases, though scope is limited to the plugin and tests.
Overview
Extends
no-hydration-branch-on-browser-globalso browser-global predicates are tracked through render-time helpers, mutable aliases,useState/useMemoflows, custom-hook return paths, and compiledcreateElementoutput—not only direct JSX conditionals.Predicate resolution now follows
let/varwrites guarded by browser checks (including nested helper invocations),useMemoobject properties, lazyuseStateinitializers, and equality/bitwise forms that still differ by runtime; reflexive or duplicated-predicate comparisons are suppressed.Reporting gates require a same-file rendered consumer for hook-returned browser state, treat locally invoked render helpers as in-output, and distinguish real React
createElementfrom lookalike factories via explicit runtimerequire/import provenance. Equivalence checks use binding-aware structural comparison so shadowed branch-local JSX and mount-gated orsuppressHydrationWarningconsumers stay quiet when output is effectively stable.Adds a large ReactBench regression suite and fuzz corpus cases for true positives and false-positive retractions.
Reviewed by Cursor Bugbot for commit 9cc9aeb. Bugbot is set up for automated code reviews on this repo. Configure here.