Skip to content

feat: share binding hook sub-slots - #818

Merged
trueadm merged 1 commit into
mainfrom
feat/shared-subslot
Aug 21, 2026
Merged

trueadm merged 1 commit into
mainfrom
feat/shared-subslot

Conversation

@trueadm

@trueadm trueadm commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add shared subSlot and createSubSlot helpers to Octane's client, server, and universal entry points
  • replace binding-local copies while preserving each binding's slotless fallback, namespace, and global/local symbol identity
  • document the shared helper in the binding bridge guidance and add a patch changeset

Closes #810.

Implementation

createSubSlot keeps the hot cache-hit path to parent/tag map lookups and supports the small set of compatibility policies already present across bindings. The default subSlot preserves the common parent:tag global-symbol behavior; configured factories cover namespaced descriptions, stable slotless children, and factory-local symbols.

The migration removes all remaining binding-owned function subSlot implementations without changing hook call sites.

Validation

  • pnpm typecheck
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm test — 2,262 files and 22,727 tests passed
  • pnpm format:files:check
  • focused sub-slot.test.ts run in development and production projects — 12 tests passed
  • node benchmarks/bench.mjs --quick hook-store-composition — semantic checksums, lifecycle counts, and hook-work counts unchanged; no quick-run regression signal
  • pnpm sync

Risk

Low. The helper is pure symbol derivation with per-factory caches, and the migration retains each binding's prior symbol-description and identity policy. Client, server, universal, and universal-native exports are covered.

Provenance

  • An agent produced this diff (agent-authored)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Medium Risk
Hook slot identity is load-bearing for composed binding state. The migration is intended to preserve each package’s prior symbol policy, but a mismatch would collide hook state across many bindings.

Overview
Adds shared subSlot / createSubSlot helpers on Octane’s client, server, and universal entries, then replaces every binding-local copy with that factory.

Bindings keep their existing slotless fallbacks, namespaces, and global vs local symbol identity via options (slotlessPrefix, tagPrefix, global, etc.). Hook call sites are unchanged.

Also updates the React-bridge skill to import subSlot from octane instead of inlining a naive Symbol.for helper.

Reviewed by Cursor Bugbot for commit 6f4b5ba. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Aug 21, 2026
@trueadm
trueadm marked this pull request as ready for review August 21, 2026 21:33
@trueadm
trueadm merged commit 7535acd into main Aug 21, 2026
49 checks passed
@trueadm
trueadm deleted the feat/shared-subslot branch August 21, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate function subSlot across bindings

1 participant