Hyperlinkv0.8.0-beta.28

Client verify — fail fast when the peer is wrong

Addressed clients should not hang on a dead peer or silently talk past a stale contract. Hyperlink.verifyConnection is the probe; addressed Hyperlink.client / clientHttp / socketClient run it by default.

Handoff SSOT: docs/handoffs/loud-failures-design.md · docs/handoffs/verify-connection-classification.md.

Default-on (addressed clients)

Building an addressed client Layer probes the peer before the handle is usable:

ModeBehavior
"reject" (default)Probe fails → Layer fails (NodeUnreachable, or deep errors below)
"status"Probe runs; failure is ignored (connect proceeds)
falseSkip verify
import * as Hyperlink from "hyperlink-ts/Hyperlink"
import { Layer } from "effect"

// Opt out for a nested/bootstrap client (Lookup.client / identity ping do this internally):
Hyperlink.client(Emails, WorkerNode).pipe(
  Layer.provide(Hyperlink.clientVerify(false)),
)

// Soft: probe but don't fail the Layer
Hyperlink.clientHttp(Emails, 3001).pipe(
  Layer.provide(Hyperlink.clientVerify("status")),
)

Tag-aware addressed clients escalate to deep verify (NodeStatus RPC + resource readiness + F4 contractHash). Nodeless / bootstrap paths that would deadlock keep verify off.

Explicit probe

import * as Hyperlink from "hyperlink-ts/Hyperlink"

yield* Hyperlink.verifyConnection(WorkerNode) // tier 1 — transport reachability
yield* Hyperlink.verifyConnection(WorkerNode, { timeout: "1 second" })
yield* Hyperlink.verifyConnection(WorkerNode, { deep: true }) // + NodeStatus RPC
yield* Hyperlink.verifyConnection(WorkerNode, {
  deep: true,
  resource: Emails.groupId,
  contractHash: Hyperlink.contractHash(Emails),
})
yield* Hyperlink.verifyConnection(WorkerNode, { all: true }) // every declared endpoint

Failure ladder

FailureWhen
NodeUnreachableTransport probe fails (tier 1)
ProtocolUnansweredTransport up, NodeStatus RPC silent
ServiceNotServed / ServiceNotReadyDeep + resource key missing / not ready
ContractMismatchDeep + contractHash disagrees with the peer (F4)
ProtocolMismatchWrong transport (e.g. http client → ws server) on a call
MissingClientProtocolNodeless client(tag) with no ambient protocol

Catch via Exit / _tag — remediation messages name the fix.

See also

Edit this page on GitHub