From 58df49c0c56028d51d46ec908dec231018a00cbd Mon Sep 17 00:00:00 2001 From: Dai Ha Date: Sun, 12 Jul 2026 20:00:36 +0200 Subject: [PATCH] herdr contract: string ids + one-shot-per-connection (CB-101 findings) --- 2-Message-Server.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/2-Message-Server.md b/2-Message-Server.md index 8d61936..75c02c2 100644 --- a/2-Message-Server.md +++ b/2-Message-Server.md @@ -231,6 +231,13 @@ primary out of herdr — see [Deployment model](#deployment-model).)* > launch line" workaround below. Spike this in **Stage 1 (CB-102)** and prefer it if it carries > env/model cleanly; the pane-based path stays the documented fallback. (Also available: > `worktree.*` for git-isolated workers.) +> +> **Two wire facts the Stage-1 client (CB-101) pinned by contract test — both bit the first +> build:** (1) the request `id` **must be a JSON string** — an integer id is rejected with +> `invalid_request`. (2) herdr serves **one request/response per connection, then closes it** — +> a second write on the same socket gets a broken pipe. So the client is **connection-per-call** +> (open → one frame → one line → close), which as a bonus needs no locking. A long-lived socket is +> only for the streaming `events.subscribe` path, not request/response. The pane-based control path (the fallback, and what the examples below use):