Skip to content

refactor(renderer): separate prop lifetimes and value writers - #763

Merged
smiggleworth merged 1 commit into
developfrom
refactor/050-prop-lifetimes
Oct 9, 2026
Merged

smiggleworth merged 1 commit into
developfrom
refactor/050-prop-lifetimes

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

The host-prop coordinator mixes diff ordering, DOM snapshots, bindings, handlers and refs. Separate orchestration, transactional writers, lifetime ownership and controlled-select settlement into private modules; scalar dispatch uses private class/style/form/HTML writers. All 49 original function bodies are unchanged, including their compiled production DOM-bundle bodies. Existing internal entrypoints and public package contracts stay intact.

The mixed lifetime tests exercise fresh and adopted hosts: a later writer fails after listener/binding/ref replacement is prepared, the old listener and binding remain active, replacement refs do not attach, retry preserves element identity, and replacement/release clean up once. A failed initial adoption separately proves provisional bindings/listeners are discarded and retry installs each lifetime once. All three cases pass on both the original and extracted implementations.

Validation:

  • Before/after focused characterization: 489 renderer/DOM/hydration cases pass. The architecture seam assertion fails before extraction and passes after it; guards exercise static/re-export/dynamic imports and preserve the acyclic core graph.
  • Complete Node 24.21.0 npm run check: 433 unit, 92 repository, 2,693 jsdom, 158 browser and 12 installed type cases; formatting, lint, build, public types, publint and package artifact checks pass.
  • Three alternating captures on the node-refactor base and this candidate, all invariants and positive samples: 60-field form hydration medians 3.2809→3.2460 ms; 2,000 keyed rows through a component boundary 58.2465→62.6177 ms (+7.5%). The source-module result is retained, not dismissed or rebaselined.
  • Follow-up production-artifact diagnostic uses the built public state/boot/control/JSX/testing entrypoints, asserts complete forward/backward ordering and retained row identity, then times the same fixture on both artifacts. Three alternating captures: baseline 37.3167/39.8709/33.3573 ms, candidate 37.5377/35.5794/38.7362 ms (median +0.6%, 101–122 samples). All 49 compiled prop function bodies and their local call shapes are identical. This supports a source-runner/module-boundary explanation for the first workload's delta; it is not a general speedup or absence-of-regression claim.
  • Ownership documentation describes initial/adopted/committed writes and post-settlement ref errors. Readiness records merged refactor(renderer): split node dispatch from hydration and lifecycle coordination #738 with its successful dispatched merge-head CI and the still-open CLI performance gate. No versions, tags or publications change.

Closes #739.

@smiggleworth
smiggleworth merged commit cdda6a6 into develop Oct 9, 2026
4 checks passed
@smiggleworth
smiggleworth deleted the refactor/050-prop-lifetimes branch October 9, 2026 16:49
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.

refactor(renderer): separate host prop lifecycle from prop value writers

1 participant