feat: add source-patched native Oxlint path - #1664
Draft
aidenybai wants to merge 427 commits into
Draft
Conversation
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
aidenybai
force-pushed
the
codex/oxc-source-patch
branch
2 times, most recently
from
August 21, 2026 06:39
fc576d5 to
1e12d5f
Compare
aidenybai
marked this pull request as ready for review
September 2, 2026 09:13
aidenybai
marked this pull request as draft
September 3, 2026 00:52
aidenybai
marked this pull request as ready for review
September 3, 2026 06:44
Member
Author
|
bugbot run |
Contributor
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
aidenybai
marked this pull request as draft
September 3, 2026 09:17
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.
Current performance fix: 248d574
Commit
248d57435ed2e108014db9ce8c1ac6606b947b44removes profiled repeated work while preserving canonical diagnostics: bounded declared-workspace discovery; lazy Dayjs mutability analysis; one Next.js file-gating result per context; one resolver per image-ownership project; and render/suppression/depth rejection before expensive hydration import analysis. No checks, traversal limits, or report validation are weakened.Repeated paired CLI measurements on the optimized release, three measured runs per lane after one excluded warmup:
Both complete reports match exactly: Cal.com 18 projects / 1,504 diagnostics and Mantine 3 projects / 1,071 diagnostics. The preceding controlled native build took 13.757s and 22.281s respectively. The new committed-head full 44-repository benchmark and 48-repository integrated audit are pending; these two repositories are not an aggregate speedup claim. The preceding full-44 run at
e330662bbwas still 2.6% slower in summed medians (native 137.582s, TypeScript 134.106s), which prompted this additional profiling and fix.681a45b46bb4ed15fa2bb6bf4bb75eff6d453b8f20e46f8d56738e67cf1b9e09; binding SHA-256:ebcf80e5fbe572e93ab59592bcb2a48b1f3a7437470c91da79756c242151aaa8.Publication remains paused. Previously prepared experimental tarballs predate these performance fixes and are superseded. Earlier validation below is historical until refreshed. Current local evidence:
tmp/native-performance-503a68c4d/resolver-validation.jsonandregressions-resolver-controlled/results.json.Add an experimental
react-doctor-rustlauncher backed by a source-patched Oxlint 1.79.0 binding. The build overlays native rules onto one pinned Oxc commit. The existing TypeScript CLI supplies project discovery, configuration, suppression, and reporting.Production CLI comparisons exposed missing and extra diagnostics despite complete rule registration. This change restores canonical callback, ref, memo, cleanup, asynchronous control-flow, dependency, and cross-file resolution behavior. Required-native execution rejects missing, incompatible, malformed, and failed analysis instead of silently falling back. Package assembly checks binary hashes and native source fingerprints before accepting artifacts.
Standalone experimental publication preparation
Commit
503a68c4dba6ab7332d213b3874666cbf7085b38preparesreact-doctor-rust@0.9.13-experimental.0and its five exact-version native platform packages. Explicit--release --versionassembly produces public manifests with theexperimentaltag; ordinary CI assemblies remain private. The launcher bundles the exact built workspace CLI and rule plugin, so it does not require publishing changes to stablereact-doctororoxlint-plugin-react-doctorfirst. The candidate reports its experimental version.Assembly records every bundled runtime file hash. Installation smoke verifies those hashes, plugin resolution from the bundled CLI, complete native AST/security/graph success, and all six required-native failure cases. Packing produces six tarballs, checksums, and a reviewable publication plan listing the platform packages before the launcher. The preparation guide documents exact-tarball dry runs and the publication boundary. No action/release workflow, tag, Changeset, merge, or npm publication is part of this change.
0.9.13-experimental.0tarballs passednpm publish --dry-run --ignore-scriptswith public access and the experimental tag. This does not establish registry ownership or publishing authentication.56f576b82, so the runtime parity evidence and limits below remain applicable.Local artifacts and results:
tmp/native-release-prep-56f576b82/release-tarballs/release-plan.json,package-validation.json, andrelease-prep-gates.json. Actual publication still requires fresh approval for the exact six packages/versions and registry-only installation smokes afterward. The channel remains experimental: the last integrated timing was 1.35× faster at the median repository but 38% slower in aggregate, and four corpus reports remain incomplete. It does not support default-engine promotion.Latest corrections
no-pass-data-to-parentdistinguishes inline callback parameters from local aliases and ordinary prop member receivers, preserves named-wrapper and debounce alias behavior, follows nested ref calls, and handles callbacks returned byuseMemowhile ignoring type-only parameter references.js-set-map-lookupsreuses the existing binding initializer resolver so string defaults and destructured sources retain their canonical behavior.no-adjust-state-on-prop-changehandles destructured state setters, state snapshot refs used as guards, deferred initializer callbacks, and the canonical uppercase callback-binding boundary.New regression and firing seeds are handwritten. Benchmark source is not copied into the fuzz corpus. Existing fixtures and fuzz invariants remain intact.
Main synchronization and canonical differences
The branch includes
mainthroughff7dd679e8b9939a7dd8f828a530559a275836f7, including owned cleanup paths, cancellation guards, per-call GET helper safety, magic-link mutation exemptions, and compiler opt-out handling.Canonical TypeScript still intentionally differs from that revision in seven detector files across four changes:
memo()with no argument against a crash while retaining its diagnostic (3ced1c98d).82a4d2645).b404f030e).rerender-functional-setstateto another same-setter call that reads state, ignoring nested function calls (72fd97b2a).Dedicated regression tests cover all four groups. Shared canonical AST/provenance helper implementations are unchanged from
main; shared rule metadata marks five already disabled rules as retired. Core native dispatch, normalization, caching, analysis, and failure gating also differ. This is not a claim that the TypeScript engine is identical tomainapart from crash guards.Coverage and verified local checks
Coverage remains 906 canonical rules: all 864 AST rules and 41 of 42 scan rules are native-backed, representing 905/906 canonical behaviors and 55/56 Security rules, with 1,734 generated Oxc implementations. The sole deliberate exclusion is
local-rpc-native-bridge-risk.postmessage-origin-riskretains its canonical WebSocket, Worker, MessagePort, BroadcastChannel, and EventSource suppressions.Final optimized release validation at
56f576b82c7b03d173350ee95827c58527a80b6cuses native source fingerprint5bccdfec928a551e219b962eba0eb0202601b2cb73479fd1bc34706f2f223c95and binding SHA-25617890718768463e43173b0b98d8d8134bc521d36873ad90d69a4e811f1e8c25f.The final installed smoke used private
0.0.0native packages and the real CLI/plugin packages. Its artifacts are intmp/native-smoke-hardening/local-darwin-Y9DEey; the release validation manifest istmp/native-full-parity-2f4568744/final-release-validation.json. This validates the local Darwin package; it does not substitute for all-target assembly or the eight CI installation smokes.Retained failures and evidence limits
The final production CLI run at
56f576b82completed all 48 repositories: 44 repositories / 197 projects matched exactly, with zero diagnostic differences among complete reports; four repositories returned incomplete reports in both engines. The five previously differing repositories now all pass, including Supabase's 13 projects and 4,346 full diagnostic objects. Source, binding, and built CLI fingerprints remained unchanged throughout the run. Runtime coverage passed: all 41 retained scan rules were requested, 366 native AST spawns and 145 native duplicate JSX calls were observed, and a separate graph-enabled CLI scenario fired all six graph rules exactly through the native project worker.The four completeness failures are retained: Leemons has an invalid
settings.react.version; Reactide exceeds the one-million-character source limit; Twenty exceeds the 5,000-file and source-length limits; Next.js exceeds those limits and contains an invalid UTF-8 fixture. The incomplete reports contain identical diagnostic objects and multiplicities too (7, 91, 2,318, and 3,279 respectively), but remain failed completeness checks. The report validator and analysis limits were not weakened. Evidence:tmp/native-full-parity-56f576b82/integrated-2026-09-06T02-54-22.375Z/summary.jsonandincomplete-diagnostic-audit.json.Historical confirmed totals remain 181,665 integrated diagnostics and 522,000 strict required-fire fuzz mutations. The final-head corpus run has four incomplete reports and does not replace the historical integrated total. Later focused checks and changed corpus selections do not establish updated performance claims.
The canonical cleanup invariant at seed
1000234, iteration 231 remains unfixed, with its failure artifact and reproducer preserved. Extracting stored-observer cleanup into a local helper changes both engines from zero diagnostics to one. The canonical cleanup detector is unchanged frommainatff7dd679e. A green fuzz run after corpus additions can select different mutations and does not erase this failure or weaken the invariant.Independent Daytona comparison between
mainatff7dd679eand final head56f576b82matched 128,776 diagnostic identities per lane across 43 validated, unredacted repositories: zero additions and zero removals, with matching repository pins, evaluator/configuration contracts, and project coverage. This is a separate TypeScript main-versus-PR check; local same-revision TypeScript-versus-native evidence is reported above.The complete remote 48-repository verdict remains unavailable. Baseline Supabase Studio hit the canonical hydration argument-cycle stack overflow; the candidate produced a valid Supabase report, but its saved strings were sanitized and cannot support exact comparison. Cal.com, Outline, and Twenty were sanitized in both lanes and are excluded too. Next.js failed in both lanes; candidate attempts retained two invalid-UTF-8 validator rejections and two command timeouts. Baseline and candidate had zero malformed rows, but both lanes remain incomplete under the unchanged validator. The two reported task-owned sandbox cleanup timeouts and the run's snapshot were subsequently confirmed absent. Evidence:
tmp/parity-independent-recovery/independent-valid-comparison-56f576b82.jsonandindependent-final-attribution-56f576b82.json.Detector-validation results at 56f576b
56f576b82c7b03d173350ee95827c58527a80b6c56f576b82: package assembly plus Linux x64/arm64 on Node 20.19 and 22.18, Darwin x64/arm64 and Windows x64 on Node 22.18, including both Linux glibc 2.28 installation environmentsThis remains a draft PR. This experimental native and internal validation work adds no Changeset. No merge, publication, release tag, or package release is performed.