You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ts/rpc): correct dispatch receiver, decorator metadata isolation, and wire arity
R18: RpcServiceHost now stores the implementation receiver beside each method
entry and dispatches via entry.fn.call(receiver, ...), so regular, no-wait, and
stream methods read the correct `this` (including #private state). addService
passes the original impl as the receiver; the unbound function is preserved so
FusionHub's server-method wrapper keeps working.
R19: stage-3 decorator metadata is no longer mutated through the prototype
chain. New shared helper ownMetadata (@actuallab/core) clones an inherited
metadata record into an own property before writing, so base contracts keep
their name/method set and sibling derived contracts no longer contaminate each
other. Used by rpcService, rpcMethod, and computeMethod.
R20: rpcMethod and computeMethod accept an explicit argCount option; when
absent, resolveArgCount (@actuallab/core) scans the parameter list for default
(`=`) / rest (`...`) parameters and throws a clear declaration-time error rather
than trusting the unreliable Function.length.
Tests: end-to-end receiver tests (regular/no-wait/stream, ordinary and #private
state) plus base/derived/sibling metadata and arity tests in both the rpc and
fusion decorator packages. Full suite: 572 passed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SDiBQM5rnhyBG1asuP1kDi
0 commit comments