docs/pair.md listed seven of the eleven models the proxy sends to the other box, the README's Operations no
MiniMax-H3-Image, agents-and-network.md opencode 1.19.6 as the version this repo pins, and the cockpit's sudoers six
serving units. The three pages' lists are held to the proxy, the lane registry and the pins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pump read the engine into a queue of 1,024 events and waited when it was full: behind a
client that read nothing, it read nothing more, the end included, and what the proxy decides at
an engine's end (out of a stop's reach, the order read in systemd, the binding of decision
1019, the order told to the other box) waited for the relay to reach it. The twelfth to
fifteenth reviews of v1.43.0 found a window in that each time.
- The pump puts into a _Spool that never waits, bounded at SPOOL_MAX_BYTES (32 MiB,
PROXY_SPOOL_MAX_MIB): past it, the generation is stopped and the client cut, CLIENT TOO SLOW.
- _engine_end decides a death or a cut as the pump reads it: out of reach, the order read
once, the request bound or a hop's box told ("o", put before the death or the cut), the
3 s of deferred reads started at the binding; _engine_end_late reads the order again at a
dead stream's clean end. The relay only writes what was decided: a client that leaves first
no longer leaves a death unbound, an order seen at the death binds nothing however late.
- The ends: [DONE], message_stop, response.completed, .incomplete and .failed (SSE_ENDS), an
Ollama stream's last line (_NDJSON_DONE), and vLLM's death on its Anthropic route, said as a
ValidationError of ChatCompletionStreamResponse, when the engine no longer answers.
- stop_generations skips what a stop marked already, ends a running vLLM relay's upstream at
once, and a generation that starts while a stop is under way is that stop's (_STOP_WINDOW,
8 s more when SGLang's abort_all did not go, the cockpit then sending its own); the stop
route's finishing counts the streams whose end was read (_FINISHING).
Tests in tests/test_proxy_pair.py (the frozen client helper rewritten: one freeze, the effect
waited for, a binding's deferred reads counted, the end delayed at will), each failing on
93746bf's proxy, fifteen mutants caught; CLIENT TOO SLOW in dashboard/tests/test_lifecycle.py;
the floor stop tests start each with no stop under way. docs/pair.md says the bindings as
they are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The thirteenth review's window was one record, not 1,024 events; the out of reach rule holds for vLLM's death
and the [DONE] and message_stop ends, not for /v1/responses, the Ollama routes or vLLM's death on /v1/messages; and
docs/pair.md says the bindings left for v1.44.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notes said the eighth review left the 3 s reads' fault as minor: the ninth review
found it, as its code, its test and its commit say. They said the line end before the
other box's order line stays at the entry: it does when the entry holds nothing of the
unended line, not when it still holds part of a line over 64 KiB, which is said now.
docs/pair.md said "within 3 s of its client leaving": the 3 s count from the proxy
finding the client gone. And the twelfth review's fixes are told.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What was to be v1.43.1 (the eighth review's minor faults of the binding, and an older one the ninth found)
goes out in v1.43.0, which is not published yet: one update for those who take it, one matrix, and one
review of the whole. The proxy stays v6.52 (its v6.53 entry goes), docs/pair.md says the binding at a
relayed death, the binding given back, and the reads after a client's early leaving, and the notes say the
faults among the eighth review's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md and restart_due's docstring: a mark counts for a restart that leaves active, or changes the
unit's state, within 2 minutes of it, as recovery_runs reads it. The notes: what the ninth review found,
a mark that stopped counting (not expired), and the test files beside tests/test_proxy_pair.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md: the cockpit keeps a recovery's mark while systemd does not answer, and the proxy counts it
from the moment the unit leaves active. The notes: what the eighth review found and this release fixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md and the notes: a request whose client left at a death the other box relayed is bound at
once and unbound by an order said within 5 s (decision 1061); a request of the box's own client unbound
when its lane's stop shows at the stream's end; a recovery's mark kept when systemd took the restart, and
counted for the restart it was written for only (decision 1062); and what the seventh review found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md and the notes: a recovery's mark written by the job that runs the restart, the order a
relaying box says at a dead stream's end, the operator's stop of a stuck engine no recovery again
(decision 1059), and what the sixth review found. docs/engine-restarts.md: a held Ollama stream waits in
silence, its client reading NDJSON, which carries no keepalive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notes' "What an update does" said a box alone works as before: its Ollama streams change, and a hop
whose lane stopped by order gets a 503 that says so. docs/pair.md and the notes say the operator's stop of
a stuck engine (1055), the 5 s an order said after a death is waited for (1054), the drop-in on
nftables.service (1053), the marks' life, and what the fifth review found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md and the v1.43.0 notes said every restart binds the requests it ended (1030): a restart to
another checkpoint, the cockpit's Load of one, ends them by order (1041), and the cockpit's restart of
a wedged engine binds them whatever checkpoint an update staged (1049). The notes still listed an Abort
all, the floor and a restart among the closes with no answer. The Ollama line that says an order stays
at the entry. The notes say what the fourth review found, and the two Ollama fixes, and the CVE
extra's check, reload and uninstall.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The third review: docs/pair.md still said an Abort all or the memory floor on the other box
closes the connection with no answer, the entry pausing that box 30 s; with decision 1031 it
says so, the client gets a 503 that runs nowhere else, with no pause and nothing bound, and only
a restart of its proxy or its power is a request lost. _pair_lost's message says the same. The
cockpit's outcome table and the test constants had their comments one entry off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stop of the lane's unit, an Abort all and the memory floor bind nothing, and a box that ends
so a request the other box sent tells it before the cut; a restart binds as an engine's death;
with this box's engine away, another checkpoint waits for this box's engine instead of a 503; a
pair dissolved keeps its bound requests nowhere. The CHANGELOG adds what the code review of the
final review's fixes found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/pair.md: the checkpoint a box says is its engine's, the one a request sent on carries
and the 409 of another one; the entry serves a request the other box refused at TLS; a
request an engine died with is bound as one it closed on, nowhere once its box left the pair,
and a stop by order binds nothing; the engine-away rule reads the command of the engine
starting; a binding is kept by the entry the request went through.
- The module's docstring says decisions 1017 to 1019 and the checkpoint header, and
_forward_peer's says "lost" and "gone" (both missing, found in review).
- The test of a lane whose port refuses kept no hold on that port once its engine stopped:
another test's server could take it (localports.held now, as every other test).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The full CI was red: three outcomes of the proxy were missing from test_lifecycle's table
(the request lost by the other box, bound elsewhere, another checkpoint).
- A request bound to the other box (decision 1019) whose box serves another model now got no
answer at all, the 409 written nowhere: a 503 now (fails on the commit before: TimeoutError).
- The binding of 1019 was noted on the body this proxy had rewritten (a reasoning effort it
maps, a tool schema it fixes), and looked up with the body as sent: the fingerprint is taken
once at routing now (fails on the commit before: the retry went to the other box).
- An engine that died during its answer, this box's or the other's, bound nothing: it does now
(fails on the commit before: the retry streamed from the other engine).
- This box's engine away, a model its lane served went to the other box whatever its
checkpoint: from the same checkpoint only, a 503 otherwise (decision 1018; fails on a mutant
without the check: the uncensored answer).
- The two counts the other box reads are taken under one lock (a hop between them said more of
the other box's generations than of all), the marker of an engine closing on a hop is looked
for across two reads, and a box that reads no key binds nothing to the other box either.
- docs/pair.md: 1019 binds before and during an answer, the engine-away rule, and the journal
lines of a box of v1.42 in a mixed pair.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The reason given for answering a token count here was false: the prefix fingerprints start
with the route, so a count never placed a conversation. It stays here because it costs the
other box a hop and a load for nothing (code comment and CHANGELOG). Its test's last check,
a turn served here after the count, could not fail: it checks now that this box's engine
answered the count, the boxes far apart.
- docs/pair.md and the CHANGELOG say the 27B's 8 at once is a 128 GB box's: on a 64 GB box its
unit says 4, so 3 ahead moves a conversation there.
- docs/pair.md says role 9 is split between the boxes: a long prompt sent again after its
client gave up is told apart by the box that served it.
- Two paragraphs of the v1.43.0 section wrapped again at its width.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A box busy with System One's branches, or with requests held while its engine came back, said
it ran none, and the other box sent it more (code review of 2026-11-03). busy_here() counts
them with the generations and the requests the sharing kept here, for the list the other box
reads and for this box's own weighing. Fails on a mutant that counts as before ((0, 0, 0)).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "failover" and "too_long" were counted when the other box refused, before this box tried:
a request this box then refused too was said served here. They are counted once this
box's answer ends well. Fails on the commit before ({'failover': 1} for a request no box
served).
- The take-overs (memory floor, a prompt too long for this pool, a warming engine, an engine
away) were said "sent there when this box did not answer": "when this box could not serve
it" now, and a request sent there at the decision because this box is held by its floor is
counted so, no longer "to even the load". The floor test also says no take-over carried it
(fails when this box stays a candidate).
Found by the code review of 2026-11-03.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
switch-model.sh serves the 27B's stock, uncensored, fp8 and uncensored-fp8 checkpoints, and
Flash's three, under one name each: two boxes shared them as one model, and a client of the
stock box got the uncensored one, a conversation going from one to the other (code review of
2026-11-03). Each box now reads the revision its active unit names (--revision, the sha every
lane's unit carries; a draft model's or a tokenizer's revision is another flag), or
PAIR_CHECKPOINT when no unit says it (a proxy run by hand, the tests), and says it in its list
(x_alzeo_revision, 40 hexadecimal characters). A box that serves another checkpoint, or says
none, keeps its own requests, said once a minute. Fails on the commit before (shared).
The unit's texts have one reader now, for the slots and the revision (the rid override keeps
its own): one request at a time reads systemd (a burst at the cache's end ran one systemctl
each, a late one writing its older answer), and forget_engine_rules drops it when another
engine serves (the slots of the lane before were kept 10 s).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request an engine closed the connection on may be what took it down, and the entry already
sent it to no other engine at once. But a client sends a 5xx's request again within seconds
(Claude Code, opencode, the SDKs), and that retry reached the other engine through the
sharing's fallback: one request and its retry could take both boxes down (code review of
2026-11-03). Such a request is now kept by its fingerprint (role 9's hash, without its size
floor, so role 9 keeps its own) with the box it happened on, PAIR_KILLER_KEEP_S (600 s, at
most 1,024 kept): this box's engine closing on it, the other box's 502 or the error event of
a stream its hold opened, and a request the other box had whole and dropped (decision 1017).
Until then it goes to that box or nowhere: never shared, handed back or taken over. Each of
the four cases fails on the commit before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The entry served itself every request the other box gave no answer to, a connection closed
after the request went too: an Abort all there was undone here (decision 1004 and docs/pair.md
say those requests end from that box's cockpit), and a request that took that box down went
on to this one (both reviews of 2026-11-03). urllib wraps in a URLError what h.request raised
(the connection, its TLS, the send), and lets what getresponse raised through: the first never
reached the other box whole and is served here as before, the second gets a 503 that says so,
and that box the pause of one that does not answer, in the sharing and in the take-over. The
test of a box that drops a request now wants that 503, and fails on the commit before (200,
"from spark1").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A pair.json removed (pair.py remove on a box without a name) or one this box cannot use kept
what was learned of the boxes it named: a box paired next under the same name got their
conversations, pause and tile counts. Both cases fail on the code before.
- PAIR_SHARE_CONNECT_S at 0, below 0, nan or inf broke every shared send, and PAIR_SPREAD_COOL_S
at nan paused a box for ever: both keep their defaults (fails on the code before).
- No test held the take-over of a request this box's engine refused the connection to (fails on
a mutant that never sees a refusal), the pause and list read a take-over learns from a
refusal (fails on a mutant without them), nor each of the two floor paths: the floor test now
says the requests were sent at the decision (fails when this box stays a candidate), and a
request kept here before the floor goes over (fails without the floor's take-over).
- The in-process twin declares every case of its class again.
- Docs: the entry adds its requests in flight there (not "what it sent since"), X-Alzeo-Here is
v6.52, and a pair that serves two models now answers 502 at once for a request whose engine
closed the connection on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gap of 4 requests, the 64 of SGLang's router brought to a lane of 8, moved a conversation
off a lane of 16 (Kolibri, Bolt) or 24 (Flash's throughput tier) with room to spare, its
prefix computed again on the other box, and came late on Nemotron Super's 4 (review,
2026-11-03). The gap is now half the slots of the box the turn would go to: this box reads
them in its active unit (--max-running-requests, --max-num-seqs, in its ExecStart or a script
it runs, as the rid override is read), and says them to the other box in its list
(x_alzeo_slots, a count from 1 to 4096, else a lane of 8, the gap of 4 as before). On the box:
7 units read, Flash FP4-Local 8 slots, a gap of 4. A lane of 16 keeping a conversation 5
ahead fails on a mutant whose gap stays 4, and the other box's 16 fails on the commit before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pair.md: the 32 KiB for Claude Code's bodies, the counts each box says, a box of a
version before v1.43.0 not shared, the 30 s pause only after no answer, a 503 or a 529
(a prompt too long has none), what the entry hands over itself, X-Alzeo-Here, the tile's
counts, the 3 s for a box gone, an update of a paired box, and the measuring tools,
which measure the pair through :30001. SECURITY.md: x_alzeo_running_yours. CHANGELOG and
the v6.52 entry of the proxy: the same, without a semicolon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found on the paired run with the real clients (2026-11-03): a token count
(/v1/messages/count_tokens, one of the pair's routes) was shared as a generation
is, and the Anthropic SDK's went to the other box. A count generates nothing and
fills no prefix cache, but it noted the conversation where it went: a count of a
whole conversation, as Claude Code sends, sent there by the load, took its next
turn to the box that cached none of it. A count is answered here now, both boxes
counting with the same tokenizer. The test fails on the commit before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent review of the two commits before (2026-11-03) found, and this fixes:
- the other box's memory floor said 529 to every Claude Code request for its
whole episode while this box idled: a 529 is handed back like a 503, and a box
that refused one gets no shared request for 30 s (PAIR_SPREAD_COOL_S);
- a prompt too long for the other box's pool (a 64 GB box paired with a 128 GB
one) reached the client as a 400: this box serves it, and the shorter ones still
go there;
- a box that switched lanes said 409 to every request until its list was read
again: its kept list loses the model at the first 409 and is read again;
- only lists read in the last 15 s shared anything, so a burst after a pause stayed
here whole: the kept list shares, a switch since answering 409;
- a conversation this box served while the other was away was not noted as this
box's, so the other box, back with an empty cache, got its next turn;
- the take-over held a copy of the client's body for the whole request: it sends
the body this box has.
docs/pair.md now says that conversations sharing one long beginning go where it
went first until the boxes are far apart, that every generation counts in the
load, and that Abort all stops the generations of its own box's engine only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision 998 says either box: one that does not answer for a model both serve
hands the request on. The entry handed a request back from the other box, but its
own engine refusing one at its first try (connection refused, or the 502, 503 or
504 of a lane that starts or stops) held it for the lane, or said 503, while the
other box served that very model. It now goes there, with the body as the client
wrote it, before any byte went out and before any hold opened a stream; never
after. The tile counts these too. The test fails on the commit before: the client got 503.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The entry served every model it loads itself, and the other box got none of its
requests (decisions 976 and 996 to 998 of 2026-11-02 and 03). An agent sends its
whole conversation again at each turn, and the box that served the turn before
holds all of it in its prefix cache but the new turn: sent to the other box, all
of it would be computed again. So the entry keeps fingerprints of the first 4 KiB,
8 KiB, 16 KiB and so on of what it sent each box in the last 10 minutes, read as
role 9 reads a body, in one pass, nothing copied, and:
- a request goes to the box it shares its longest block with, when that covers
30 % of it (SGLang's router's cache_threshold); blocks double, so the longest
one known covers more than half of what is shared (with blocks four times
longer, a prompt just under a block shared a quarter at most);
- any other one to the box with the fewest requests in flight, the entry when
they tie: a client working alone never pays a hop;
- any one while the boxes are more than 4 requests and 1.5 times apart to the
one with the fewest (the router's 64 and 1.5, brought to 8 per lane);
- a box that does not answer, or answers 503, before a byte of its answer went
out hands the request back: the entry serves it, never one whose answer began.
Each box says how many generations it runs (x_alzeo_running, in the list it gives
the other on the pair port, a count or nothing); the entry adds what it sent since,
reserved at the decision under one lock, and never counts fewer than its own
requests in flight there: a list read in the middle of a burst forgot those in
transit, and a burst of 8 went 5 to 3 (4 to 4 now). The tile says what was sent
there and why.
tests/test_proxy_pair.py: the two-box fixture is a mixin, and a class of its own
has both boxes serve the 27B from their start (a proxy learns what its engine
serves at a lane's start: changing a fake engine's list under a running proxy
tested a switch, whose 409 hands the request back). Its tests fail on e07f2c2:
nothing went to the other box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two independent reviewers (correctness, security; effort max) read eda19f8..87ae395 and
reproduced what follows; each fix was checked in the code and has a test that fails on
901862b:
- Decision 986 held a lane up forever while the other box stayed off once this box had
restarted (a power cut): a box never read held every lane it does not load. A box
that may serve a lane now holds it up (503, why) for PAIR_FIRST_READ_S (30 s) from the
pair's load if it was never read, for PAIR_KNOWN_WAIT_S (15 min) from its last good
read if it served it; then this box's lane answers it, as on a box alone.
- A box off without a reset made every such request wait the read's 5 s: a box whose
last read failed slowly is read again in the background (one read at a time, its own
function: a first try handed the read back to the background from the background).
- A box listing a model and refusing it twice fell through to this box's lane: a 503.
- TCP_USER_TIMEOUT cut a live stream whose client stopped reading for 25 s: dropped,
keepalive alone sees a box that lost power.
- pair.py add: a Ctrl-C during the checks lost a working pair (both boxes put back now);
an undo that came before the other box's write let that write land (a cancelled run
is refused there); its record is dropped once the run succeeds (done); a restored
entry's name is checked before it names a file; the messages say what was undone.
- The other box could end every generation of this one: SGLang aborts every request
whose rid starts with one it aborts, and a request it sends on kept its own rid, in
the body or the x-override-rid header. It never names one now.
- The pipe d27240a gave each request in flight doubled its descriptors, which the other
box could exhaust (EMFILE at 256 hops), and select() refused any past 1024 (read as
a caller gone by _client_left): the keepers poll() every 50 ms, no descriptor of their
own (51 ms through the proxy for an answer of 35 ms at the engine, 502 on v1.41.0).
- Nested JSON from the other box (9,990 deep) broke GET /v1/models here and froze the
cockpit once written back: its rows and its summary are rebuilt field by field.
- Its summary is kept 2 s: its reads were quiet and each one read this cockpit.
- Ollama's NDJSON streams reached the client whole at the end: relayed as they come.
- Docs and comments said holds, 404 and "within the hour" where the code does not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hasan's choices of 2026-11-03 on what the review and a pair simulated on the box found:
- 986: a lane name no box of the pair serves is answered by the box it was sent to,
by the lane it serves, as on a box alone (961 refused it with a 404). Claude Code
as installed names qwen3.8-27b, pi and Hermes qwen3.8-flash-next, and these lanes
are often not the one loaded: they worked on a box alone and failed once paired.
A box that may serve the name and does not answer still gets the 503 to try again
with why: one that served it at its last good read (a restart), or one never read
(not reached yet, another certificate at its address). A box whose last list is
known and lacks the name does not hold it up, so this holds while the other box is
off. Its line is said once a minute.
- 987: GET /v1/models stays a 503 while this box's engine does not answer (the
cockpit's probe and claude-local.py read its first row as this box's model):
docs/pair.md says so.
- 988: add run again on a pair that worked could leave it one way after a failure
(this box's entry forgotten there, the other kept here). Each box now keeps what
the run replaces, entries and certificates, under the run's token, and a failure
puts both boxes back as they were, a pair they had included.
Tests that fail before this commit: a lane no box serves is answered here (OpenAI and
Anthropic), as is one the box that does not answer never served, add cut on a working
pair, a check failing on a working pair. Five tests of the 404 or of never-read
boxes follow the new rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each found by the code review of feat/dual-spark at eda19f8 (9 finders, 4 verifiers,
2026-11-03) or by two proxies of this branch paired on the reference box with the
real clients, checked in the code, and fixed with a test that fails before it:
- pair.py add read each way through the other box's engine (GET /v1/models on its
pair port): a lane loading, stopped or switching on either box failed the check,
and add undid the pair on both boxes, a working one included. A box whose proxy
answers over the pair's TLS, even with its engine's 503, is reached.
- No TCP keepalive between the boxes: a box that lost power or its cable held a
request in flight to it for up to MAX_SILENCE_S (an hour in the unit), its client
hearing nothing. Probes after 10 s, every 5 s, gone after 25 s, both ways.
- An error answer of the other box over 1 MiB went out cut to 1 MiB as if whole:
error answers have the cap of a 200 now, and a 502 past it.
- A request the other box sent on could be held through a whole boot, then refused
with a 409 inside the held stream, which its entry relayed as an answer: it is
never held, its entry gets the 503 at once.
- pair.py remove asked the other box to forget a name, said it had whatever it
answered, and a box renamed since was never forgotten: the other box forgets by
the certificate it pins, and remove says when there was nothing to forget.
- NaN, Infinity and 1e400 in what the other box sends (its list, its summary) went
into this box's answers and cockpit state, which a browser cannot parse: every view
of the cockpit froze. Both read it as JSON.parse does now.
- The other box's cockpit stopped or not installed made its whole tile "HTTP 503":
its summary says what it serves without its cockpit, and why.
- The tile's reads every 5 s wrote a journal line on both boxes, and pushed a paired
box's requests out of the 800 lines the cockpit reads in about 34 minutes: a read
of the tile writes no line, a box that does not answer is said once a minute.
- /api/chat, /api/generate and /invocations were not routed: a lane name there was
answered by this box's model under the other's name.
- The first GET /v1/models after a start or a pairing listed this box's models
alone: each peer's list is read as soon as the pair is.
- The docs say the pair port serves the tile's summary too, and what it holds.
Left for decisions: a lane name served by no box (404, decision 961) and GET
/v1/models while this box's engine is down (503), both against what a box alone
does; add run again on a working pair can leave it one way after a failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The other box's proxy sums its own cockpit up for the tile (GET /pair/cockpit/state, on the pair
port only): what serves, the memory, the GPU, the job under way, the version; logged in once with
its own key (a session kept, a login again after a cockpit restart, never a login loop: the cockpit
counts five failures a minute by address), never relayed whole (its feed, paths, settings and logs
stay there). This box's cockpit reads it through its own proxy (GET /proxy/pair/<box>/state, this
machine's route only, with the engine's key, as /proxy/stop), in a tier of its own (collect_pair:
a box that went holds its read). The Now view shows a panel per box, its words set as text, never
as markup. Switching the other box's lane stays its own cockpit's: the page's lane journey is
computed from this box's state, and making it the other box's is a change of its own, proposed.
Outcomes ok pair cockpit, 503 pair cockpit unreachable, ok pair state, 401/403/404 pair state
refused, in the cockpit's vocabulary. Tests written (fake cockpit with key and session, the
route refused from the pair port, a wrong key and an unknown box; the collector through a fake
proxy; the cockpit found where its unit binds it), not run yet: a measurement campaign runs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two independent reviews of f50c7e4..ff450c7 (security; robustness and tests), each finding checked
again in the code before its fix.
Decision 978 (proposed after the security review, to be confirmed): the API key a box handed the
other as a "second lock" is also its cockpit's login, root on a box (SECURITY.md). No key is
exchanged any more, as between NVIDIA PAIR's nodes: the pinned certificate admits the other box on
the pair port, which takes PAIR_ROUTES and GET /v1/models only (403 "403 pair route refused"), and
the box that serves admits the request to its engine with its own key (_upstream_auth). An identity
wall (QWEN38_CLIENT_KEYS_FILE) no longer stops the pair. pair.json peers lose key_file; pair.py
swaps certificates only.
Also fixed, each with a test that fails without it:
- an answer not streamed from the other box was read whole: bounded by MAX_BODY_BYTES
("502 pair answer too large");
- an error answer cut on the way escaped _forward_peer: said as a cut (UPSTREAM CUT pair);
- a streamed request on the pair port never saw the entry's client leave during a prefill: _peek
(the socket under TLS) now serves _client_left, _watch_client and _keep_waiting_inner;
- two boxes whose clocks disagree could not pair: certificate dates not checked
(X509_V_FLAG_NO_CHECK_TIME), the pin being the certificate;
- the hop header on the client port: no hop any more, a hop is the pair port's;
- cookies crossed the pair both ways; the client's key headers are never sent on;
- a peer's model ids with control characters were kept: dropped; _pair_why strips them;
- the pair port's handshake failures, said once a minute with a count;
- PairPort.check and stop could cross and leave a port open: one lock;
- pair.py: host keys checked whatever ~/.ssh/config says (StrictHostKeyChecking=yes, -T); an SSH
cut once the other box wrote is undone there; a rollback that fails never hides why the pair
failed; what the other box says is checked before it is printed;
- uninstall.sh --list tells a paired box only to unpair first;
- the tests: pair.json written whole and seen read (no fixed sleeps), no connection to a closed
port number, journal counts taken before, the in-process class redeclares all 43 cases.
Tests written, not run yet (a measurement campaign runs on the box): run in the morning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
The entry of a pair is set up with one command: `ssh spark2 cat .config/qwen38/api-key | python3
pair.py add spark2 http://spark2:30001`. The key is read on standard input (or asked without echo),
never on a command line, and kept in ~/.config/qwen38/pair/<name>.key, mode 600 in a folder of mode
700; pair.json names the file, never the key. Before writing, the other box is asked its list with
that key, as the proxy asks it: a key it refuses, or a box that does not answer, gets nothing written
(--no-check writes it anyway). Names and addresses are judged by the proxy's own _pair_parse, so what
pair.py writes is what the proxy takes. `remove` drops a peer and its key, the last one leaving the
box alone; `status` says what each peer serves now, never a key; `name` sets this box's name.
tests/test_pair_tool.py: 8 tests against a fake peer. docs/pair.md says what a client sees, the
security of the link and the limits; the README's table points at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>