mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 21:04:21 +01:00
Decisions 970-976 (02/11), after reading NVIDIA PAIR, its playbook and spec, NVIDIA's connect-two-sparks playbook, SGLang's model gateway and sparkDash: keep this routing, which serves the SGLang and vLLM lanes PAIR does not, and secure it as PAIR's nodes are secured. keepalive-proxy.py (role 10, still v6.50, unreleased): - each box has a certificate of its own (pair/identity, EC P-256, made once by pair.py) and pins the other's in pair.json by its SHA-256; a peer is https://host:port with cert_file and sha256; - PairServer: the pair port (PAIR_PORT, 30002), TLS 1.3, a client certificate demanded, the chain ending at a pinned certificate and the certificate itself pinned; a request there is a hop from the box of its certificate, whatever its headers say; opened by PairPort within 2 s of pair.json naming a peer, closed once it names none (no restart); - the entry sends to a peer's pair port only, with its own certificate, the peer's checked against its pin (chain, then fingerprint), never through a proxy of the environment; _pair_why says why a peer does not answer in words that say what to do; - a pair.json that names no peer is a box alone (pair.py name alone made a lane name a 404); - under TLS the socket under TLS is peeked at (_client_left, _watch_client): before, no peek was made through TLS, so a peer's engine generated to the end for an entry's client that was gone; - the watcher shuts the TCP side of a TLS connection (SSLSocket.shutdown unwrapped it under the reading thread, whose read could fail with a ValueError). pair.py, rewritten: `add HOST` pairs both boxes in one command over SSH (BatchMode, the destination after --), sending itself and the request on standard input (no key on any command line), each box writing new files and then pair.json at once (one commit point, checked by its own installed proxy), then checks both ways and keeps nothing on either box when one fails; `remove` unpairs both; `status`, `name` (before pairing), `identity`. An SSH that does not reach, an unknown host key, two boxes of one name and an older proxy are said with what to do. docs/pair.md and SECURITY.md say how; ci.yml counts 30002 among the serving ports a test must not reach. Tests written, not run yet (a measurement campaign runs on the box tonight): CI in the morning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>