Skip to content

refactor(universal): extract lazy owner claiming seam (issue-66 A3) - #75

Merged
Huxpro merged 1 commit into
new-lynxfrom
refactor/universal-kernel-owner-claiming
Aug 19, 2026
Merged

Huxpro merged 1 commit into
new-lynxfrom
refactor/universal-kernel-owner-claiming

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #74; final Phase A3 kernel seam of #66.

  • extracts lazy hook-owner activation and explicit/implicit compiler slot composition into a host-neutral controller
  • universal core injects active attempt/owner/scope state and the actual claimChildOwner callback; record creation, identity buckets, replay ordinals, and reconciler adoption stay core-owned
  • distinguishes nullable active-owner probes (used by DOM-owned renderer regions) from strict hook access diagnostics
  • patch changeset and living-spec §8 verdict: extraction remains GO; fresh-core fallback is not selected

Red-green / differential evidence

  • Final issue-prescribed guard set plus renderer-boundary coverage: 14 files / 396 tests green in dev/prod.
  • First implementation made nullable renderer-region probes require a universal attempt, producing 22 mixed-boundary failures. Splitting nullable currentOwner from strict requireOwner restored all guards; this is retained in the final design.
  • Deliberate break: disabling the injected lazy scope made the keyed getter list reuse item A's state for item B (['A','A'] vs ['A','B']); dev/prod both failed. Restoring scope activation returned the suite to green.
  • Coverage includes lazy keyed loops, getter-owned hooks, renderer regions, nested mixed ownership, transition rebases, retained Suspense, Activity, context, and owner teardown.

Same-window performance evidence

universal-leaf-update, B/A/B/A, #74 base vs this slice:

scenario base windows candidate windows
scoped leaf, 4k clean siblings 0.039 / 0.039 ms 0.042 / 0.040 ms
keyed list-item, 4k siblings 0.203 / 0.217 ms 0.192 / 0.195 ms
root state, 4k clean siblings 6.490 / 6.368 ms 6.683 / 6.382 ms
root state, 4k dirty control 35.572 / 37.337 ms 34.112 / 35.224 ms

No stable regression or improvement: first-window micro-differences mostly disappear in the second window, and the list path moves the other direction. This is equivalence evidence only.

Validation

  • pnpm sync
  • scoped format + tsgo for changed core files
  • relevant universal guard set — 14 files / 396 tests
  • B/A/B/A universal-leaf-update with semantic controls
  • octane + octane-prod full projects not rerun; A2's broad run was environment-failed by SG1 inotify EMFILE, while relevant isolated failures and all universal guards pass
  • pnpm test (full repository)

Risk / follow-ups

  • Hook owner/slot lookup now crosses one monomorphic controller method. Same-window measurements do not show a stable cost; keep the scoped-leaf gate for subsequent work.
  • The reconciler's actual record identity index and adoption remain in universal core by design. The kernel receives a narrow claim callback and stays free of renderer/host imports.
  • With A2–A3 green, A4 can build the Lynx background core against the extracted owner/hook services instead of selecting the fresh-core fallback.

Provenance

  • An agent produced this diff (agent-authored)

Move lazy hook-owner activation and compiler slot composition into a host-neutral controller while injecting actual child-owner claiming and active-attempt state from universal-core. Preserve nullable renderer-region probes, strict hook diagnostics, and keyed owner identity; extraction remains GO.

Agent-Authored-By: TraeCode <[email protected]>

Trae-Session: 01a015c8-dc52-71b3-b929-2b5d818926bf
@Huxpro
Huxpro changed the base branch from refactor/universal-kernel-root-services to new-lynx August 19, 2026 18:28
@Huxpro
Huxpro marked this pull request as ready for review August 19, 2026 18:28
@Huxpro
Huxpro merged commit cfa4b95 into new-lynx Aug 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant