Repository navigation
Two-Mac cluster beta on dev (#1407, #1426, #1577) - #1628
Merged
Merged
Conversation
…diagnostics) - tp-check `glm --lanes N [--lanes-batched yes|no] [--lanes-split-eval yes|no]` (with `--mtp-depth`): N requests' greedy MTP rounds, batched in one forward or time-sliced, with each round's phases (proposals, proposal wait, forward, agreement, encode, wait) at p50. - `DARKBLOOM_CLUSTER_LANE_TIMING=1|split` logs the same split for every batched decode step of a serving worker (off by default; no collective changes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pair driver recorded a lane its owner cancelled before the request's deadline as a failed wave; it now finishes with `finish_reason=deadline`, and `ClusterWorkerRequest` exposes why it was cancelled (`cancellationReason`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nel; fused fence update stays off decode3 traced the batched-lanes stall (39ab2c8) to the fused fence update, not the fenced inputs: `fence_update_coherent` splits a partial above 32 KB (8,192 words) over several threadgroups, and on that path the timestamp the CPU waits for is never written. Two lanes at MTP depth 2 are six rows, a 48 KB partial; one request's three rows fit one group. A synthetic chain of 90 sites with a CPU-stream sum each hung at five rows and more with the fused update on, and ran at every row count up to 24 with it off, the fenced inputs on or off (6 rows: 6.21 vs 6.80 ms a chain, 12 rows: 9.58 vs 10.19). So a GLM tensor-parallel worker now turns on `MLX_METAL_FENCED_INPUTS` only, unless its launcher chose, and never sets the fused fence update itself (before, a launcher setting only one of the two got the other turned on). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re start keeps the pair
A ~256K-token request on candidate 33 never reached `reserved`: rank 0's
worker owner endpoint (`ClusterRemoteWorkerEndpoint.sendWorkerCommand`)
queued at most 1 MiB, and a reservation is about 6.5 bytes per prompt
token (128K fit, 256K did not). The rejection was then treated as a pair
failure: the pair was invalidated, both ranks fenced ("the request was
cancelled before it started") and both workers exited.
- `ClusterWorkerLimits.envelopeBytes` (the largest command plus 64 KiB:
the owner-wire envelope check and pipe record framing) and
`queuedCommandBytes` (the largest command plus 1 MiB: both command
queues) bound every hop by what the codec accepts, up to 1,048,575
prompt tokens (~7.3 MB); the owner queue counts its bytes instead of
re-encoding queued commands.
- A reservation an endpoint cannot take (owner queue, worker queue, the
link to rank 1) refuses that one request (`busy`, or `profile` if it
cannot be encoded): the other rank gives back what it admitted, the pair
keeps serving, and the provider answers 503. A request cancelled by its
caller or deadline before it starts gives its reservations back and
leaves the pair serving, with or without lanes; a rank is fenced only
when it does not answer in time.
ProcessChecks: a full rank-0 queue, then a full rank-1 queue after rank
0 admitted, refuse the request without fencing; a cancel after both
admitted leaves the pair serving. RemoteChecks: a 1,048,575-token
reservation with the largest token ids crosses the owner wire and its
pipe framing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ver; a follower refuses one request instead of fencing A ~1,040,000-token request still ended the pair on candidate 35: the writer that sends records to a rank's owner process gave every record half a second from before it was built, and a ~7 MB reservation record (several JSON passes, then a 64 KiB pipe) took longer, so the write timed out, the endpoint closed and admission ended the pair (512K, ~3.6 MB, still fit). - A command now gets its own delivery deadline, the admission wait (30 s with lanes, 5 s without); control records keep half a second. - When a follower's owner cannot take a relayed reservation (`busy` for a full queue, `profile` when it cannot be encoded), the follower answers the leader with `commandRefused` (request id and reason) over the link; nothing reached its worker, so no worker sequence number is spent. The leader's link endpoint turns it into a `refused` event for that request without advancing the worker's event sequence (events are routed by request id), so rank 0 gives back its reservation and the pair keeps serving. A malformed message or a closed owner still fences. RemoteChecks `ClusterLinkWorkerCommandRefusalTests`: write deadlines, only an untakeable reservation counts as a per-request refusal, the new message's fields, and a leader endpoint that refuses that request, stays ready and accepts the worker's next event at its expected sequence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner rule (2026-10-22): every cluster path keeps its KV paged, never contiguous. GLM tensor parallel kept every request's DSA history in contiguous arrays (`GLM5NextTextStageCache`), and prefix entries as copies. - Each rank's stage has a DSA page pool (SDK 53b9746a); every request and lane reserves its pages, prefix entries share pages (refcounted, copy on write at the boundary) instead of copying histories, and releases return pages. - The request and lane charges count pages when paged (a request's pages plus one layer's gather; no doubling, no append copy); the load gate prices page bytes before the load and the pool's own after. - Media lanes (embedding-input frames) and the request charge's cached evidence digests work with paged histories. - `DARKBLOOM_CLUSTER_GLM_PAGED_KV=0` keeps contiguous histories for diagnosis (bound into the load agreement); tp-check is paged by default (`--kv contiguous` to compare). The load line logs `paged_kv=<page size>`. Paged equals contiguous bitwise on synthetic weights (GPU): rounds, caches and NextN histories alone and batched, up to 13.1K contexts with selected-latent decode reads, shared prefix pages, and a media lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pages Owner rule (2026-10-22): every cluster path keeps its KV paged, never contiguous. After 577c76b the GLM pipeline still kept contiguous DSA histories, and Qwen 3.5 stages with an MTP head chose contiguous KV. - GLM pipeline stages make a DSA page pool at load, and each `GLM5NextStageSession` reserves its local DSA layers' pages for the request's maximum tokens. A stage of linear-attention layers only has no DSA history and gets no pool (it used to fail its load). - `GLM5NextTensorParallelPageReservation` becomes `GLM5NextPageReservation`, shared by tensor parallel and pipeline. - `ClusterStageKVBackendKind.resolved` returns paged for every Qwen 3.5 stage, MTP head or not; `DARKBLOOM_CLUSTER_KV_BACKEND=contiguous` still selects contiguous. The 2026-10-13 pair record put paged MTP decode 7-34 % slower than contiguous there; re-measure on the pair. GPU (synthetic, GLM53_PAGED_KV=1): pipeline generation, resident stage and runtime, stage session, frame transport, CBv2 paged MTP windows, the KV default and the GLM TP paged suites pass (80/81; the one failure is the existing freed-buffer-cache isolation test, which passes alone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner rule (2026-10-22): every cluster path keeps its KV paged, never contiguous. Qwen tensor-parallel shards kept `KVCacheSimple` per request and copied histories into prefix entries. - Pins SDK 5b861465 (`PagedAttentionKVPool` / `PagedAttentionKVCache`). - Load makes each shard's page pool for its full-attention layers (KV dtype from the checkpoint; the load line logs `paged_kv=64 page_bytes=...`); Gated DeltaNet state is unchanged. - `reserve` trims unheld pages first and adds the pool's growth to the live gate; `generate` reserves the request's pages for its maximum tokens and keeps the reservation to the end. Prefix entries share pages instead of copying and are counted by their page bytes. The request charge stays the existing conservative contiguous one. - `DARKBLOOM_CLUSTER_QWEN_TP_PAGED_KV=0` keeps contiguous caches for an A/B; the choice is bound into the load agreement (`qwen-tp-paged-kv-v1 page=64`). Diagnostic tools keep `KVCacheSimple`. GPU test: a synthetic 4-bit Qwen 3.5 checkpoint loaded as the rank 0 and rank 1 shards with the runtime's own pool, reservation and prefix store/restore gives logits and every layer's state byte-equal to the contiguous shard. Not yet run on a real Qwen model or the pair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or pairs
Closes OpenRouter-parity gaps the c35 pair run found.
- Logprobs on lanes: the worker refused every logprob reservation when
lanes > 1 (provider 503). Lanes now capture each token's logprobs as
the solo path does (rank 0's product sampler, gathered after the
token is agreed, no collective) and publish them with that token. A
logprob request decodes in one-token steps, solo or on a lane, as the
single-Mac engine does (`mtpBasicEligible`); this also fixes the solo
path, whose MTP rounds left a round's second token without logprobs.
Every other request keeps MTP, including lanes beside a logprob lane.
- `reasoning: {exclude: true}`: the scheduler's early raw-control check
refused it for GLM with 400. It now admits GLM exclusion; the pair
withholds the reasoning and single-Mac still refuses at the same
point.
- `/metrics` for pairs: GLM TP rank 0 reports each request's MTP rounds,
proposals and acceptances (solo at completion, lanes at retire,
before `finished`) in the optional `mtpRounds` telemetry field (absent
from the wire when nil). The provider sums them and renders the
single-Mac metric families, plus the pair's KV ledger
(`ledger="cluster_pair"`), waiting requests and prefix-cache status.
- `top_logprobs` above 20 is clamped to 20 as single-Mac does (was 503).
Requests without logprobs are unchanged: same sampling bytes, same
speculation decisions, same collectives.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner rule (2026-10-21): MTP is always on. 2fdcca5 decoded a logprob request in one-token steps, as single-Mac's `mtpBasicEligible` does. A logprob request now speculates, solo and on a lane. Rank 0 takes each committed token's logprobs from the verification-window row that drew it (the product's raw gather on that row), after the ranks agree, so no collective changes. Tokens are unchanged; logprob values may differ from one-token decode by rounding. A logprob request costs rank 0 one small extra evaluation a round. Tests: a logprob lane in MTP rounds publishes one logprob set per committed token; a round's gathered rows equal each row's one-step gather (CPU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Qwen tensor-parallel decode steps at 12,288 tokens of history or more attend the KV pages in place instead of gathering them (bitwise equal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… shortest prompt first A joining lane's prefill frame stalled every decoding lane for the whole frame (an 8,192-token chunk is about 2.0-2.3 s), and a short request joining behind a long prompt waited for that prompt's whole prefill. - Pins SDK cfbe8d8d (`GLM5NextSlicedPrefill`). - While any lane decodes, a lane's frame runs in near-equal layer slices of about 500 ms (`lanePrefillSliceMilliseconds`, sized at 0.252 ms a token), one slice a step, each decoding lane's unit after it in the same step. Frames merge chunks (up to 16,384 tokens) beside decoding lanes too. Alone (c1), frames run whole and merged, as before. - Among lanes still prefilling, the shortest remaining prompt takes the next frame (ties in join order). A frame in progress finishes first, except that a prompt whose whole rest fits one slice runs between its slices. - Lane wire v2: each frame carries its slice; rank 1 derives every slice itself and refuses a plan that changes one or abandons a frame. - Admission charges one sliced frame's held arrays (about 0.63 GiB). - Media lanes slice like text lanes, from the spliced embeddings. Tokens are the whole frame's bits: a slice builds the frame's next layers with the whole frame's ops in order, and other lanes only touch their own caches between slices. Tests: sliced text and media frames at 1, 2 and 3 layers equal chunk-by-chunk prefill (logits, cache, NextN history, kept prefix), with paged histories; the fake two-rank lane loop keeps every lane's solo tokens with slices and shortest-first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…requests A 31.5K prompt's first token came about 0.27 s later on c36 than on c34 (rank 0 log, every request), and a fresh process's first paged prefill about 0.6 s later: the pool's kernels compiled at the first request, and every idle release freed the slabs (or copied held pages into smaller ones), so the next request regrew about 0.6 GB a rank on its first-token path. - Pins SDK 93d87568. - Load prewarms the pool (tensor parallel and pipeline stages), logged `darkbloom-glm-paged-prewarm-v1 rank= ms=`. - Idle release keeps the slabs up to `DARKBLOOM_CLUSTER_GLM_PAGED_RETAIN_MB` (default 2,048 MB a rank) and trims beyond it, so a long-context request's memory still drops after it ends; retired pages return to the pool. `darkbloom-idle-release-v1` logs the slabs kept or trimmed. - Retained slabs give way before any refusal: freed buffers, then prefix entries, then a pool trim and one more try, for solo and lane reservations. No arithmetic changes: pages are written before they are read, and a recycled page's old rows are never read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… once A rank spent 5.66 s in setup before its load intent, and 1.5-2.0 s in open parsing the same config, index and headers again. - Pins SDK 4b9575e6 (one metadata parse, byte-level name matching). - After the config parse, the metadata work (inventory, both ranks' envelopes and quotes, the request charge, shard byte counts) runs on its own thread while the main thread brings the link up (lease, JACCL, data plane, codec), joined before the intent agreement. - `open` reuses the prepared loader's inventory (about 0 s). - The phase line splits `setup` into `setup`, `link` and `metadata`, with `metadata_thread`, `metadata_inventory` and `metadata_resources` timings. The loaded weights are the same bytes and every file is still hashed; the sealed link is unchanged. Measured on Ultra A against the real model's metadata: setup about 0.4 s, link 0.85 s, metadata about 2.5 s in parallel (was 5.66 s serial). Tests: the new path gives the same shard, MTP and vision bytes, inventory fingerprint and request reserve as the sequential code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… request Owner (2026-10-22): do not pre-allocate memory for the full context; allow growth, with no context cap. Qwen tensor parallel and GLM pipeline sessions reserved every page of prompt + output at open. - Qwen tensor parallel: a request reserves its prompt plus a 1,024-token granule; before each decode step it keeps the next step plus 64 tokens reserved, growing by a granule (never past its own length). Each growth is a new page account the caches are rebound to; when the slabs must grow, the live memory gate decides after the prefix cache yields. A refused growth ends only that request, on both ranks after the same step, with finish `length`, carried in the per-step stop slot (no new collective; a client stop wins). The request log gains `kv_tokens=`, `kv_grown=` and `kv_refused=`. - GLM pipeline stage sessions reserve the prompt plus a granule and grow by granules before the frames that need them (admission already charges the whole length there, so growth is not gated). - The admission charge is unchanged, and no context is capped. Tokens are unchanged (pages are bookkeeping). Tests: growth across granules, a refused growth that changes nothing, growth bounded by the request length, the stop-slot round trip; the Qwen shard GPU proof reserves only the prompt and grows mid-decode, byte-equal to contiguous on both ranks and after a prefix restore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner (2026-10-22): do not pre-allocate memory for the full context; allow growth, with no context cap. A GLM tensor-parallel request reserved its whole prompt + output in pages at open. - Pins SDK cea528aa (`GLM5NextDSAPagePool.extend`). - A solo request opens with its prompt plus a 1,024-token granule and keeps the next step plus 64 tokens reserved, extending by a granule between steps (never past its own length), as Qwen tensor parallel does. A refused extension ends the request at `length` on both ranks through the per-step stop slot (no new collective); the request log gains `kv_tokens=`, `kv_grown=` and `kv_refused=`. - Lanes still reserve their whole length (next). - The admission charge is unchanged, and no context is capped. Tokens are unchanged (pages are bookkeeping). GPU: the GLM tensor-parallel paged suites pass on growing histories (179 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner rule (2026-10-22): cluster KV lives in pages, never contiguous. - Gemma 4 stages take the paged stage KV host at every lane count; the refusal of paged KV for batch lanes is gone. Windowed and full-sequence layers both page. - Nemotron 3.5 stages take the paged host at one lane (its batched decode has no Nemotron path, so more lanes are refused as before). Synthetic stages: Gemma 4 paged tokens equal contiguous and per-request storage with prompts that wrap the 1,024-token window, and three lanes (one joining, one leaving) each keep their own solo tokens. Nemotron paged tokens equal contiguous (logits within 6.6e-7). Not yet run on a real Gemma 4 or Nemotron model on the pair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…catter and all-gather - Pins mlx-swift 59ff16a (core 360d11b9, mlx-c 8a50797: sealed reduce-scatter and all-gather) and the SDK's opt-in sequence-parallel prefill. - `QwenTensorParallelGroup.reduceScatter` / `allGather` (sealed; an unsealed bench fallback through the all-sum with -0 padding). - Runtime `prefillSequenceParallel = false` (with load-line fields); the product path is unchanged until the pair A/B shows it identical and faster. tp-check `--sequence-parallel yes|no`. - `tp-check glm sealedcheck jaccl|socket`: reduce-scatter equals this rank's rows of the sealed all-sum and all-gather equals the -0-padded all-sum, bit for bit (f32/bf16/f16, signed zeros), with a tamper mode (`DARKBLOOM_TP_SEALED_TAMPER_AT`) that must be refused on both ranks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the verification forward Every MTP round built its whole graph (about 1.76 ms p50 on the host) before submitting anything, so the GPU idled during that build. - Pins SDK 5c697344 (early proposal submission, sequence-parallel prefill pieces, DSA absorb overlap, divergence probe). - Solo rounds and lane rounds `asyncEval` the NextN proposals right after `prepareProposals`, so the GPU runs the priming and proposals while the host builds the 3-row forward. tp-check `--mtp-early none|proposals|layers` (`layers` also cuts the verification forward every 8 layers); serving uses `proposals`. The same graph evaluated in more pieces: bitwise. The proposals hold no collective, and the agreement sum still depends on every lane's logits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(off) `prefillPrefixGrid` (`chunk`, the default, or `bulk`): with `bulk`, prompt prefixes are kept every 8,192 tokens instead of every chunk, and the rest of the prompt runs as one frame (on 31.5K the last 6,924 tokens run as 2 x 3,462 instead of 2 x 2,048 + 2 x 1,414). It cuts the tail rows differently, so it is not bitwise; it stays off unless it passes the reordering gate (perplexity within 0.1 %, top-1 at least 99.4 %) and the owner accepts 8K prefix granularity. tp-check `--prefix-grid chunk|bulk`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tic) Each lane logs `darkbloom-tensor-parallel-prefill-v1 ... open_ms prefill_ms steps wall_ms` at its first token (no content), so one long request shows whether the endpoint's extra time over the rank's own prefill is in the host and HTTP path, the loop, or the frames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nostic) `tp-check glm --divergence N --divergence-rows R` prefills the prompt's first N tokens from an empty cache as the product's two micro-batches and as micro-batches of at most R rows, compares every layer's boundaries and cache state bit for bit on both ranks, and logs `divergence first_layer=...`, then stops. Not on any serving path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…collectives in order - `tp-check glm --divergence-start K[,K2...]` prefills the prompt's first K tokens the product way, copies that cache for both cuts, and compares the next chunk layer by layer, then the readout (hidden rows and last-row logits): `first_layer=<n>|readout|none`. Several offsets run in one process. - `tp-check glm sealedcheck` evaluates each collective on its own, so tamper counters map as documented (0 all-sum, 1 reduce-scatter, 2 padded all-sum, 3 all-gather). Diagnostics only; no serving path changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s for DSA selection - Pins SDK f15d8487 (kept top-k candidates per product micro-batch). - Lever 2 (larger micro-batches), coalescing and the bulk-grid tail give every re-cut segment the product's micro-batch rows, so DSA picks the same tokens as the product's cut. The bulk-grid tail runs as one chunk only where every micro-batch has at least 1,414 rows (the router's measured bound). - tp-check `--pin-selections yes|no` (default yes); the divergence probe logs `pinned=`. Both levers stay off in the runtime, so serving is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ked bytes 58d7371 counts all file-backed pages and dropped the 32 GiB cap (`maximumCountedReclaimableBytes`), but the real-sampler test still compared against it, so DarkbloomClusterRuntimeTests did not compile. The decision now counts at most the file-backed bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… where their sums stay hidden - `prefillMicroBatchTokens = 8192`, `mergedPrefillTokens = 32768`: a graph re-cuts its segments into 8,192-row micro-batches only when no micro-batch holds more than half of the graph's rows (`Plan.hidingSums`), so each micro-batch's sealed sums overlap the rest of the graph. Otherwise, and for a frame alone (beside decoding lanes), the product's cut stays. 2.7K, 6K and 10.5K prompts keep today's plan; 31.5K runs [8192, 8192, 8192, 4096, 1414, 1414] in one graph. - Prompt prefixes stay on the 4K grid at a micro-batch edge, and every re-cut row keeps its product DSA selection (d69b180), so tokens and caches are the product's. - tp-check `--micro-batch-rule half|all`, `--micro-batch-tokens 0` (the product's cut) and `--prompt-tokens N`. Pair (selection pinned): 31.5K 4,087 -> 4,257 tok/s (+4.2 %, 1,002 -> 962 ms per 4,096 tokens), bitwise (perplexity and NLL identical, top-1 100 %), peak transient 18.98 GiB. Before the rule, 10.5K ran 17 % slower with an 8,192-row micro-batch beside 2,308 rows; it now keeps its plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… head by vocabulary - Pins SDK 80edb23c (verification readout of one vocabulary part). - In a greedy round each rank reads out only its half of the head's vocabulary rows. Its agreement slot carries, per window position, its half's [max, global argmax] with the drafts and stop flag (3w+3 values instead of 2w+2); `decide(vocabularySplit:)` takes the larger max and rank 0's lower index on a tie, MLX's argmax rule, so the whole-head argmax needs no extra sum. Sampled lanes keep the full head; lanes split only when every lane is greedy. - tp-check `--mtp-vocab-split yes|no` (default yes, as the runtime). Pair (bin6 on c38): depth-2 round 21.32 -> 21.05 ms (104.5 -> 105.6 tok/s), tokens and top logits identical to the reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cluster beta deleted EngineV2LogprobsChannelCapTests and said the cap moved to the SDK encoder. The GLM and Nemotron relays still buffer through EngineV2LogprobsChannel (Inference/Streaming/EngineV2Logprobs.swift), so its cap, drop-oldest eviction and droppedCount lost their only tests. Restore the two origin/master tests unchanged in behavior, in a file that mirrors the source path. The stale comment in EngineV2BridgeTests now points to them. Mutations killed: removing the maxEntries guard in append (count and droppedCount fail), evicting the newest instead of the oldest (first/last token fail), and drain that does not clear the buffer (second drain fails). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A cluster member without a live pair slot refused coordinator inference with a bare 503 at three places, and none of them sent service_reservation_released: - CoordinatorClient+Inbound (receive path, memberPairSlotModel nil) did not release as rejectInvalidInferenceRequest does. - ProviderLoop.consumeClusterMemberEvent (dispatcher) called rejectClusterMemberInference, which sent only the error frame. - ProviderLoop.handleInferenceRequest returned before the ServiceReservationLifetime and the lookup-receipt finalizer existed. A request that passed the dispatcher and then raced a pair-slot retire kept its reservation held on the coordinator and left its receipt unsettled. The receive path now uses one pre-dispatch refusal helper that sends the frame and releases the reservation; rejectInvalidInferenceRequest uses it too. rejectClusterMemberInference releases the reservation after the frame. The handler check moves below the lifetime, finalizer and defer setup and refuses through lookupReceiptFinalizer.sendTerminal, so the defer releases the reservation and the receipt settles as skipped_capacity. The 503 frame is the same at all three places (modelUnavailable, 503, no profile). Test rows and the mutations they kill: - ServiceReservationInboundTests.memberWithoutPairSlotReleasesItsReservation: no release on the receive-path member refusal. - ClusterMemberLoopTests.memberRefusalWithoutPairSlotReleasesTheReservation: the handler check back above the lifetime (no receipt, no release), and rejectClusterMemberInference without the release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stopServingCommittedStart returned at once while clusterPairServingForming
was true. Forming covers the slot publication and its warmup canary (up to
300 s), and the slot is in modelSlots for most of that time. The member
session then released its owner and sent native_pair_owner_released while
the slot was still published, which breaks the NativePairMemberServingHost
contract ("return once it is retired").
Choice: retire the slot of this epoch even while forming, rather than make
the stop wait for formation to end. A wait would hold the session's
stopServing for the whole canary and makeOwner (both bounded only by the
cleanup deadline, after which the session sends the receipt anyway), so the
breach would come back on a timeout. Retirement is idempotent and
publishClusterPairSlot already stops at a slot retired during its hops, the
path a readiness loss takes today. While forming, the stop does not end the
served epoch: the serve sees the stop flag at its tail and ends the start
itself, so no next start can begin under a serve that still runs.
To close the window where a retirement is running but has not yet cleared
clusterPairSlot, publishClusterPairSlot now checks that no retirement of
its slot has begun (clusterPairSlotIsLive) before it opens admission. Before
this, a canary that finished during that window reopened admission state
and started a capacity refresh task after the retirement had cancelled it.
Test row ClusterPairServingTests.aStopDuringTheWarmupCanaryRetiresTheSlotBeforeItReturns
holds the canary request, stops, and checks that the slot is gone from
modelSlots when the stop returns. It kills the mutation "return while
forming" (the slot is still published when the stop returns). Its
clusterPairCapacityTask == nil check kills the mutation "guard on
clusterPairSlot === handle only" when the canary result arrives before the
retirement ends.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hold Changelog fragment for the two provider behavior fixes before it: member refusals now send service_reservation_released, and a stop during pair formation retires the slot before the owner release receipt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itation docs-check fails a current doc that cites a root deleted from this repository, and `coordinator/` is one (scripts/docs-check.sh, section 3). The cluster-member note in protocol-messages.md cited it as inline code, so Docs Lint failed at 96a4b9c after the master merge. Name the path with its repository prefix, as the citations below it already do. No meaning changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The closure carries the runtime fixes of the MLX review: the JACCL mesh failure flag and 64-bit all_gather offsets (Layr-Labs/mlx#33), fenced inputs kept on device and sealed frames over INT_MAX refused (Layr-Labs/mlx#35), the fast fence before the event fence (Layr-Labs/mlx#41), and GLM5NextClusterImagePlan.inspectPNG offsets taken from the Data's startIndex (Layr-Labs/mlx-swift-lm#308). Pins: libs/mlx-swift-lm d5bd32b8, libs/mlx-swift c633d221 (the revision mlx-swift-lm's Package.swift pins), libs/mlx 72dffa2d (mlx-swift's Source/Cmlx/mlx). mlx-c in that mlx-swift is 2ac897e3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 31, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the whole two-Mac cluster beta (PR 1407, then PR 1426 and PR 1577 on top of it) to
dev, so that a plainswift buildfromdevis a DevNet build of the beta. A push todevstarts no GitHub workflow: every push trigger namesmaster,mainor a tag, andrelease-dev-branch.ymlruns only on a manual dispatch. Published DevNet providers still come only frommasterpushes.Commits on
dev(first parent)e63b399c2dev. Conflict inprovider-swift/Package.swiftonly: master's three environments (prod, dev, staging) with this branch'sdevdefault.a09d844e81fd0f557ea686b8a9fGITHUB_RUN_ATTEMPT.f868b5562DARKBLOOM_RELEASE_ENVIRONMENT=prod), as on master.b0395c5bd,28fa9931796a4b9cff52f79efcb(PR 1631, PR 1633). One conflict: a date stamp indocs/reference/ssd-kv-cache.md.ba070619fEngineV2LogprobsChannelcap tests are back (the beta had deleted them; the channel and its cap are still used for the GLM and Nemotron relay).bed4006cc10cbe808bd216a429d3e69f535cdocs/reference/protocol-messages.mdnames platform paths asdarkbloom-platform:coordinator/...(Docs Lint after the master merge).bf06fa13cThe fixes B1, C1 and T1 are also on their source PRs: PR 1407 (
322e4882de: B1, C1, changelog) and PR 1577 (716a84cb7f: T1), so that master anddevdo not diverge.Pins
libs/mlx72dffa2d(Layr-Labs/mlx#41),libs/mlx-swiftc633d221(Layr-Labs/mlx-swift#61; itsSource/Cmlx/mlxis72dffa2dand itsSource/Cmlx/mlx-cis2ac897e3, Layr-Labs/mlx-c#15),libs/mlx-swift-lmd5bd32b8(Layr-Labs/mlx-swift-lm#352).libs/mlx-swiftis the revision that thePackage.swiftof mlx-swift-lm pins. NoPackage.resolvedentry names a Layr-Labs repository.Validation
bf06fa13c: 40602298933. Provider Unit Tests (6466 tests in 931 suites), Provider SDK Tests, Provider Prompt Parity, Docs Lint, Release Integrity, Provider Tests, Landing: pass. The rows of B1, C1 and T1 ran and passed.d-inferenceandd-inference-console-ui-devfail on every branch since PR 1625 deletedconsole-ui/(their root directory). They are Vercel project settings, not code.ClusterModelProvisioningChecks151/151 (from the stack PRs).Independent review: follow-ups not fixed here (for the stack PRs)
ClusterPlancannot express tensor parallelism (Coordinator/NativePairMemberRoster.swift,Protocol/ClusterRosterRegistration.swift): no tensor-parallel mode, a fixed cut count, no shares field. A tensor-parallel roster fails closed atClusterMemberPreparation.swift.min_pis applied on every EngineV2 bridge (the comment inChatRequest.swiftsays "cluster pair only"); new 400 and 422 answers for coordinator traffic (ProviderLoop+InferenceHandler.swift,ProviderLoop+ErrorMapping.swift); the solo--localAPI retries a normalized body, honorslogprobsand addsreasoning_tokens; a new info log linedarkbloom.request.prepper request. These need platform review.libs/darkbloom-cluster/Tests,libs/darkbloom-cluster-worker/Testsor theprovider-swift/Tests/Cluster*Checks/run.shsuites.handoff/(49 files) is a working journal at the top level of the repository.devbranch rules indocs/developer/build.md("dev is master plus one commit") are not true while the beta is ondev.sigwaitthread whensigactionfails; lenient decode ofcluster_member_accepted; no planpredictionin the roster;DARKBLOOM_DEBUG_LOCAL_ERRORSin release builds;cluster localwith--no-authon 0.0.0.0;qualify-sdkleavesDARKBLOOM_RELEASE_ENVIRONMENTunset;BuildEnvironmentTestsreads the variable at run time.Limitations
release-dev-branch.ymllane cannot pair: its builds have no keychain access group for the Secure Enclave key.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.