Skip to content

refactor(universal): extract the host-neutral hook-cell kernel (issue-58 L2 spike) - #64

Merged
Huxpro merged 2 commits into
new-lynxfrom
claude/octane-issue-58-l2-kernel-spike
Aug 19, 2026
Merged

Huxpro merged 2 commits into
new-lynxfrom
claude/octane-issue-58-l2-kernel-spike

Conversation

@Huxpro

@Huxpro Huxpro commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on the L1 PR (#63); the kernel-extraction spike that #61 (L2 of the #58 roadmap) calls for as its first step. packages/octane/src/universal-kernel.ts now owns the host-neutral first slice of the hook kernel:

  • every hook cell shape (state, linked state + parked drafts, reducer, memo, ref, id, effect, effect-event), with the owner record entering EffectHook only as a type parameter;
  • the hook update-queue value types (UniversalHookUpdateQueue and applied-update shapes), with the transition batch as a type parameter;
  • the pure helpers: depsEqual, isThenable, thenable tracking, the effect create/cleanup runners, and effect-event cell deactivation.

universal-core.ts binds the generics (EffectHook<UniversalOwnerRecord>, queue types over UniversalTransitionBatch) and re-exports the public types (LinkedStateOptions, LinkedStatePrevious), so runtime behavior and the public surface are unchanged — this is a mechanical move that answers the fresh-core-vs-extraction question's first gate: the cells separate cleanly.

The remaining seams, in extraction order for the L2 core proper, are now inventoried in docs/lynx-specialized-target-l0.md §5 (owner abstraction; scheduleOwner injection; transition-batch globals + root services; formatUniversalId / warm-memo cache / readBridgeContext; owner claiming last). ComponentMemoHook stays renderer-facing in universal-core by design.

Validation

  • pnpm typecheck (repo-wide, clean)
  • octane + octane-prod full projects: 837 files / 12,418 tests green
  • full lynx project: 25 files / 340 tests green
  • targeted guard suites for the move (universal-scheduling, universal-event-scope, universal-retained-suspense, universal-activity, universal-renderer): 10 files / 334 tests green
  • new packages/octane/tests/universal-kernel-boundary.test.ts: pins the kernel's zero-import host-neutrality contract and exercises the extracted runtime helpers directly
  • pnpm test (full repo run beyond the projects above not executed in-session)

Risk / follow-ups

Provenance

  • An agent produced this diff (agent-authored)

Generated by Claude Code

@Huxpro Huxpro left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the extraction line-by-line: depsEqual, isThenable, thenable tracking, the effect create/cleanup runners, effect-event deactivation, and every cell/queue type are byte-identical moves with dependencies entering only as type parameters, and the kernel file genuinely has zero imports (the structural test pins that). Guard suites plus the full octane/octane-prod projects passing supports the zero-drift claim. One inline note on what the boundary test actually pins vs what its name claims — worth tightening before the next slice, which is where semantic drift risk actually begins.


Generated by Claude Code

claude added 2 commits August 18, 2026 16:07
…-58 L2 spike)

Hook cell shapes, hook update-queue value types, and the pure cell helpers
move to universal-kernel.ts with owner and batch types as parameters;
universal-core binds the generics and re-exports the public types, so
behavior and the public surface are unchanged. Remaining extraction seams
are inventoried in docs/lynx-specialized-target-l0.md §5.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
Per review: the standalone helper assertions do not prove core wiring; the
comment now routes that guarantee to the universal-* behavioral suites.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YHfFsy9CLaRovTFH8pTGyY
@Huxpro
Huxpro force-pushed the claude/octane-issue-58-l2-kernel-spike branch from 09e0cd5 to 4924e40 Compare August 18, 2026 16:08
@Huxpro
Huxpro changed the base branch from claude/octane-issue-58-l1-lynx-target to new-lynx August 19, 2026 17:12
@Huxpro
Huxpro marked this pull request as ready for review August 19, 2026 17:12
@Huxpro
Huxpro merged commit d82ce40 into new-lynx Aug 19, 2026
2 of 3 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.

2 participants