GeezerVison is showing github.com — id: implement broker / serve-proxy wire protocol per #5792 decision · Issue #7569 · developing-today/code
id: implement broker / serve-proxy wire protocol per #5792 decision #7569DescriptionSummary
Implement the ID broker / serve-proxy wire protocol decided on #5792 (decision record: #5792 (comment)), as a mode of the id binary. Parent design: #5671 (its fallback ordering, trust model, and E2E boundary are unchanged and bind this work). Downstream consumer: #5798 (fleet surface for the broker role), which configures this role once it exists.
What to build (per the #5792 decision record)
- Leg establishment: TLS 1.3 over TCP 443, through HTTP CONNECT where the egress requires a proxy; optional WebSocket binary-message adapter carrying the same frames where CONNECT is denied.
- Frame codec: 4-byte big-endian length prefix plus typed frames (OPEN, DATA, CLOSE, WINDOW_UPDATE, PING, PONG, RESUME, RESUME_ACK, ERROR); DATA payload capped at 16 KiB.
- Multiplexing: per-leg stream IDs (odd/even by initiator), broker-side stream-ID mapping between client and server legs, per-stream credit flow control (initial 64 KiB per stream, 1 MiB per connection), priority scheduling in three classes (control, interactive, bulk), and the two-connection class split (control+interactive on one connection, bulk on another).
- Keepalive: PING after 25 s idle (plus/minus 20 percent jitter), leg declared dead after 3 unanswered PINGs, broker closes legs silent for 120 s into the resume window.
- Resumption: broker-issued session token bound to the endpoint identity key, RESUME signed by that key, per-stream sequence numbers with delivered-up-to vectors, replay of exactly the unacknowledged tail, 5-minute resume window, in-memory broker state only.
- Authorization and logging per the decision invariants: authenticated broker use by default, no payload logging, metadata-only operational logs.
Invariants (from the decision record)
The broker never holds or derives content keys and never terminates the E2E layer; control frames never queue behind DATA; credit is never exceeded (overrun closes the leg with ERROR); the broker persists nothing to disk in v1; resumption never duplicates or reorders per-stream delivery.
Tests
Name an oracle per the repo testing doctrine: frame codec round-trip and cap enforcement via property-based tests (oracle: decode-encode identity plus the 16 KiB cap invariant); resumption via model-based tests against a simple per-stream ordered-delivery model (oracle: the model); keepalive/dead-leg timing against a fake clock. CI runs the suites per repo policy.
Acceptance
Relations
Design: #5792 (decision record). Parent: #5671. Downstream: #5798. Programme: epic #2056.
Filed by queue worker task 12789 (lane code-y), 2026-11-08. Activitydeveloping-today commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 developing-today commented on Nov 8, 2026 🤖 Agent note · parked
- Agent: queue worker (repo-worker-code), lane code-g
- Session / ID: task 13211
- Found via: queue claim
- Task: task 13211 for issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569 — slice 1 of the serve-proxy wire protocol is implemented and pushed: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 (branch
queue/13211-7569-serve-proxy-codec, commit 2f43c13) adds pkgs/id/src/serve_proxy.rs, the typed frame codec from the issue id: design: id broker / serve-proxy role (from #5671) #5792 decision record §2 (4-byte BE length prefix; OPEN/DATA/CLOSE/WINDOW_UPDATE/PING/PONG/RESUME/RESUME_ACK/ERROR; 16 KiB DATA cap on encode and decode; scheduling classes; classified ERROR reasons; credit-window primitive). Targeted tests verified on the laptop: cargo test --lib serve_proxy — 10 passed, 0 failed (PBT oracles: decode-encode identity, decoder chunking transparency, credit-never-exceeded).
- Expectation: parked 20 minutes on PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 CI (basic checks still pending at park time; no Codex findings posted yet). Resume: read PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 checks and Codex findings fresh, disposition findings, merge when green; then the remaining slices on issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569 are leg establishment (TLS/CONNECT/WebSocket adapter), broker stream mapping + priority scheduling, keepalive (§4), resumption (§5), and the E2E ciphertext test.
- Links: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666, issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569, design issue id: design: id broker / serve-proxy role (from #5671) #5792
developing-today commented on Nov 8, 2026 🤖 Agent note · parked — CI pending on PR #7666 (task 13211, lane code-s)
- Agent: queue worker (repo-worker-code), lane code-s
- Session / ID: task 13211 (repo-queue-worker-shift-s, 2026-11-08 run)
- State: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 head
2f43c132c9b7bbac8c9155ba6beac4d134e9716c re-verified OPEN non-draft; completed checks: native arm64: world snapshot determinism success, full (main tier): nix flake check skipped, CodeRabbit skipped. Still QUEUED after a fresh 5-minute poll (and queued before this claim — fleet runner backlog): basic: fleet-search pyjson/render parity (#5920), basic: guard PR check list, basic: id builds without world feature, basic: scripts-test (3.14), basic: proxy port fallbacks, basic: scripts-test (3.12). No Codex findings on the PR.
- Resume: when those basic checks go green → merge PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 (slice 1), then complete task 13211 as pr_opened; issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569 stays open (multi-section acceptance).
developing-today commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026
Task 13211 (small_fix, issue #7569): resumed by lane code-v (direct lane, attempt 2/3 in this claim series). Re-verified PR #7666 fresh: OPEN, head 2f43c13, no hard-stop labels, no Codex findings posted (no reviews at all), one native check SUCCESS, remaining basic checks still QUEUED since 2026-11-08T11:39:23Z (runner backlog, unchanged from lanes code-b/code-l parks). Parking task 13211 again awaiting CI per the 5-minute rule — resume by re-reading PR #7666 checks/Codex fresh and merging when green; remaining serve-proxy slices (mux/legs/keepalive/resumption beyond slice-1 codec in PR #7666) stay on issue #7569. dezren39 commented on Nov 8, 2026
Agent note — task 13211 resumed, CI still pending (lane code-w, direct)
dezren39 commented on Nov 8, 2026 🤖 Agent note · slice 1 merged — parked on remaining slices
- Agent: queue worker (repo-worker-code), lane code-w
- Session / ID: task 13211
- Found via: queue claim (resume per §10 — slice 1 already existed: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666, head 2f43c13)
- Task: task 13211 for issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569. Fresh verification this shift: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 OPEN at head 2f43c13, +575/-0 (pkgs/id/src/lib.rs, pkgs/id/src/serve_proxy.rs), no hard-stop labels on PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 or issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569, no Codex reviews/comments and no CodeRabbit findings on PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 (CodeRabbit review skipped — bot author), merge-tree against current main 38ad37e clean. Targeted tests re-run on the laptop in the task worktree:
cargo test --lib serve_proxy — 10 passed, 0 failed. PR CI basic tier remained QUEUED since 2026-11-08T11:39Z (fleet runner backlog, no failures; native arm64 pass) — merged on direct verification per the standing merge directive, as with PR fix(codedb-bridge): bound daemon fetch deadline #4561 earlier today. PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666 MERGED at 2026-11-08T20:03:43Z, merge commit 72377c0.
- Expectation: task 13211 parked — issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569 stays OPEN. Remaining slices, in decision-record order: leg establishment (TLS 1.3 / HTTP CONNECT / WebSocket adapter), broker-side stream-ID mapping + priority scheduling across streams, keepalive/dead-leg timing (§4, fake-clock MBT), resumption state machine (§5, model-based no-duplicate/no-reorder tests), and the E2E ciphertext forwarding test. Resume by continuing those slices in follow-on PRs.
- Links: PR feat(id): serve-proxy wire protocol slice 1 — typed frame codec (#7569) #7666, issue id: implement broker / serve-proxy wire protocol per #5792 decision #7569, design issue id: design: id broker / serve-proxy role (from #5671) #5792
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|