Skip to content

net: SocketBackend::bindModel drops contextKey on a private registration, unlike SimulatedRemoteBackend #587

Description

@Yaraslaut

Surfaced while implementing #569 (PR #586); not folded into that PR per AGENTS.md, since it's a pre-existing defect the native bindModel path deliberately preserved rather than introduced.

The finding (inferred from reading the code, not yet reproduced)

SocketBackend does not override registerModelWithContext, so the default implementation forwards to registerModel and discards contextKey — while wire::makeRegister accepts a contextKey and SimulatedRemoteBackend does override the verb to carry it across.

Consequence: a server-side action log has no entity key for instances registered privately over morph::net.

bindModel's native path (added in #586) stays bit-for-bit identical to the blocking one on this point — the drop was deliberately preserved, with a comment in socket_backend.hpp saying why, rather than silently fixed as a drive-by.

Status

Inferred from reading include/morph/net/socket_backend.hpp against wire::makeRegister and SimulatedRemoteBackend's override (core/remote.hpp). Not reproduced against a running server / action log. Needs verification before a fix is written.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreSubsystem: corebugSomething isn't workingtriage: validWell-framed; implement as written

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions