Skip to content

FPFNFIXAPEX: preserve structuredClone self definitions - #2067

Open
aidenybai wants to merge 4 commits into
mainfrom
codex/audit-structured-clone-self-definition
Open

aidenybai wants to merge 4 commits into
mainfrom
codex/audit-structured-clone-self-definition

Conversation

@aidenybai

@aidenybai aidenybai commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Why

A native structuredClone self-definition using JSON serialization should avoid a redundant-clone warning only when the provider identity stays intact.

What changed

Recognize the bounded self-definition, reject dynamic constructor and global-carrier exposure, and memoize whole-program admission per target to keep repeated definitions linear.

Resolve runtime references and writes to the nearest genuine value when erased TypeScript declarations share its name. Keep erased-only fallback and declaration identity intact. Reuse the shared erased-binding, namespace, and runtime-value helpers for conservative provider admission. Shared semantic controls cover imports, parameters, writes, local values, namespaces, and computed keys. Independent regressions and synthetic fuzz controls exercise the rule boundary. The patch changesets cover diagnostic and resolver behavior.

Constructor member/destructuring controls preserve warnings for dynamic execution. Deterministic traversal counts verify that repeated self-definitions share one program scan.

All four additional native constructor-key controls matched the focused runner; every emitted diagnostic was the target rule.

Known limits

This is a finite self-definition check and does not certify a complete structuredClone polyfill or arbitrary wrapper behavior.

Test plan

  • Final head 3568942832204e974aff9159fb674d7298bb0703: 151 focused assertions passed.
  • Full repository test graph and all typecheck tasks passed before committing.
  • Repository lint/format, serial build, strict target fuzz (500 iterations, seed 42, required firing), and built JSON smoke passed.
  • Shared resolver/test and six-helper hashes match the reviewed canonical sources; exact tested tree verified after normal commit hooks.
  • Previously observed timing failures use deterministic work-count and clock fixtures, plus a scoped timeout for the seven-scan integration test.
  • Exact-head available checks, workflow runs, mergeability, and review threads gate ready status.

Fresh full-corpus parity was unavailable: required sandbox credentials (Daytona/Vercel as applicable), sibling RDE checkout, and repository cache are absent. Older sampled results are not parity for the revised head. No PR was merged.

@pkg-pr-new

pkg-pr-new Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@2067
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@2067
npm i https://pkg.pr.new/react-doctor@2067

commit: 3568942

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at 3568942 in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@github-actions

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 3568942.

@aidenybai
aidenybai marked this pull request as ready for review October 17, 2026 06:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant