Host deployment

Image synchronization has a host-owned deployment boundary. @knolo/core encodes and verifies the V5 exchange. The host owns everything that touches a network.

ConcernOwner
Request and response encoding, signatures, image roots@knolo/core
Peer discoveryHost adapter, opaque peerId values
Sockets, URLs, proxiesHost adapter
Credentials and TLSHost adapter. Never passed into the coordinator
Retry boundsCoordinator, within host maxAttempts
CheckpointsHost load and save callbacks
Logs and metricsHost monitoring sink
Adopting the image into durable storageA separate explicit store operation

executeKnowledgeSyncHostDeploymentV5 discovers peers, transfers bytes, verifies the response and the image, handles expiry and replay, and emits monitoring events. It does not mutate the local image by itself.

InMemoryKnowledgeSyncHostAdapterV5 is for deterministic tests. It does not model sockets, credentials, or durable checkpoints.

FailureWhat happens
Discovery failure or an ambiguous peerTerminal. No transfer
ExpiryTerminal. deployment.expired. Replay state unchanged
ReplayTerminal. deployment.replayed. The existing entry stays authoritative
Transfer error with a valid checkpointRetry until maxAttempts
Repeated transfer failureTerminal. deployment.failed
Verified exchangedeployment.succeeded. No further retry

Monitoring events can include request ids, peer ids, attempt counts, offsets, and byte counts. They must not include credentials, endpoint secrets, image contents, or private keys.

Applying a fast-forward after that exchange is Sync and merge.