Skip to content

FPFNFIXAPEX preserve convergent empty-record lifecycle resets - #2141

Open
aidenybai wants to merge 2 commits into
mainfrom
codex/fp-empty-record-state-comparator-reset
Open

aidenybai wants to merge 2 commits into
mainfrom
codex/fp-empty-record-state-comparator-reset

Conversation

@aidenybai

@aidenybai aidenybai commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Why

A structural comparison of the previous and current state record followed by this.setState({ record: {} }) can converge after at most two self-induced follow-up updates with fixed inputs. no-did-update-set-state currently warns on that bounded pattern.

What changed

  • Recognize a direct readonly react-fast-compare import comparing the same state field before a literal empty-record reset.
  • Require a genuine React class, a stable null-render barrier, and bounded class, initializer, and update behavior. Other-field lifecycle updates still require a previous-to-current props transition.
  • Ignore erased interface and type-alias declarations while checking visible runtime providers. Keep runtime TypeScript, opaque producers, fake comparators, competing updates, and escaped bindings outside the exemption.
  • Add regression and fuzz coverage, including two erased-type metadata false positives found during review, plus patch changesets.

This is a syntax- and binding-bounded convergence check. A warning on an unsupported form is not proof that the component loops forever.

Test plan

  • Full local suite: 34,103 passed, 1,118 skipped; all 12 tasks ran without cache. Lint, typecheck, formatting, registry generation, fresh five-package build, and JSON-report smoke passed.
  • Focused convergence tests: 32 passed, including three new erased-type/runtime boundary controls. Two synthetic false-positive corpus fixtures and corresponding generator cases were added.
  • Strict target-rule fuzz passed with seed 42, 500 configured iterations, and required firing. Numeric execution and firing counts were not printed.
  • Independent source review passed. The existing runtime predicate is preserved; traversal prunes only erased interface and type-alias declarations.
  • Published API comparisons under isolated and default rule configurations preserve all complete diagnostic arrays for the 29 original synthetic cases. Six additional boundary cases remove the two erased-metadata false positives, preserve the nominal quiet cases, and retain the unsupported runtime-parameter warning. Every selected main file completed analysis; unrelated diagnostics are unchanged.
  • Built CLI comparisons cover the six boundary modules under both configurations. Two additional warnings are removed from the original PR behavior, while the remaining warning and its full diagnostic identity are preserved.
  • Remote parity could not start because DAYTONA_API_KEY is absent. These comparisons are finite synthetic evidence; no real React mount or measured update-loop experiment is claimed.

@pkg-pr-new

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

Copy link
Copy Markdown

Open in StackBlitz

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

commit: a0081e6

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at a0081e6 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

@aidenybai
aidenybai marked this pull request as ready for review October 20, 2026 07:42

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