Skip to content

Provider 0.10.13: keep a busy paged engine at one decode pass per layer (SDK #403) - #2011

Draft
jonathan308 wants to merge 305 commits into
devfrom
fix/paged-kv-contiguous-alloc
Draft

jonathan308 wants to merge 305 commits into
devfrom
fix/paged-kv-contiguous-alloc

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Status

Superseded for 0.10.12 (owner, 11-12 ~00:50Z). The SDK pin moves once, together with mlx-swift-lm #404, on #1970's head 0e6ac37885: branch fix/sdk-pin-0.10.12-paged-alloc-mtp-events (this PR's fragment, retitled "Paged decode keeps one attention pass per layer on a busy Mac", and its docs paragraph are there). This draft stays open until that PR lands.

Draft for provider 0.10.13, not 0.10.12. Opened by an agent. Stacked on #1970 (0.10.12 into dev): until #1970 merges, this PR's diff includes #1970's commits; afterwards it is this PR's one commit (plus re-pins). Do not merge before Layr-Labs/mlx-swift-lm#403 merges and the dev-pair GPU proof below passes.

Why

On production's paged KV backend (the 9B, Qwen 3.6, gpt-oss-20b, the 35B, Gemma 4 and the other paged models), decode slows with minutes of continuous busy work and recovers only when the engine drains. 24 h of 0.10.11, each request against the same provider's fresh speed (PAGED-SLOWDOWN.md):

Model (backend) 1–3 min into a busy run 3–6 min 6–15 min
the 9B (paged) 0.69× 0.40× 0.30×
gpt-oss-20b (paged) 0.93× 0.85× 0.67×
Qwen 3.6 (paged, 3–4 running) 0.98× 0.33× 0.21×
MiMo (contiguous, the control) 0.96× 0.95× 0.92×

Net of the method's floor, fixing it is worth about +10 % token-weighted decode speed for the 9B, +5 % for gpt-oss and +3 % for Qwen 3.6, without 0.10.12's contiguous-flip costs (concurrency 8 → 4, the 9B's shared-event exposure).

Cause: page scatter. All rows and layers of a geometry share one free list; freed pages go to its front, so after the first retirements new requests fill the holes left among live requests' pages across many segments. The segmented decode binds at most 17 segments per pass, one pass per bucket per layer, so a scattered pool needs about one pass per 256-token partition per layer.

What

libs/mlx-swift-lm → Layr-Labs/mlx-swift-lm#403 head f386237962 (ad8a5860 + the allocator, its tests and a review commit). A group's free pages are two tiers: pages a prefix-cache alias still names wait in eviction order and are reused last (as before); every other page is placed by address, each request layer in aligned 16-page runs (one partition), continuing in its run, then its segment, then the segment with the most free runs, so requests that start together take different segments. Refcounts, generations, prefix-cache invalidation, copy-on-write, deferred speculative frees, row retire, preemption, reservations and segment trim are unchanged; only which free page a write lands on changes. Each attention partition is computed as before, so outputs are unchanged.

Plus the changelog fragment (changelog.d/paged-kv-page-runs.md) and the placement paragraph in docs/architecture/inference.md (segmented paged admission section).

Before

flowchart LR
  R["request retires"] -- "uncached pages prepended" --> F["one shared free list<br/>(per geometry)"]
  F -- "pop front" --> N["new request's pages:<br/>holes across many segments"]
  N --> P["decode plan: ≤17 segments per bucket"]
  P --> D["≈ one pass per 256-token partition per layer<br/>(Qwen 3.6 c=4: ~930 passes/step)"]
Loading

After

flowchart LR
  R["request retires"] --> T{"prefix cache names it?"}
  T -- "yes" --> C["cached tier (eviction order, reused last)"]
  T -- "no" --> U["uncached pages, by address<br/>in 16-page runs per segment"]
  U -- "own run → own segment →<br/>roomiest segment → lowest page" --> N["each request layer:<br/>a few segments, whole runs"]
  N --> P["decode plan: ≤17 segments per bucket"]
  P --> D["one pass per layer<br/>(Qwen 3.6 c=4: 10 passes/step)"]
Loading

Evidence (CPU only)

The SDK's own allocator, layout and planner sources, compiled with swiftc into a model of a busy provider (rows reserve prompt + max_tokens, size-class growth, tail-first release, whole-segment trim). Part dispatches per decode step after the first retirement, mean (max); one per layer is the fresh pool's count:

Load Today (0.10.12 SDK) This PR
Qwen 3.6 GPQA, c = 4 (10 layers) 930.2 (1,865) 10.0 (10)
9B GPQA, c = 4 (8 layers) 655.4 (1,230) 8.0 (8)
9B production-like, c = 3 427.0 (1,381) 8.0 (8)
Qwen 3.6 production-like, c = 4 559.8 (1,509) 10.0 (10)
Short rows, c = 8 6.0 (6) 6.0 (6)

SDK unit test PagedKVAllocationTraceTests: red on today's allocator in Fork Tests 43091512573 (exactly these 2 tests of 551 in the unit shard; mean 680.9 and 427.0; every other shard passes), green on #403 (mean 10.0 and 8.0). SDK CI: #403 18/18 checks pass on f386237962 (43105112140). This PR's CI (dev): green on 8f36ebcc96 (provider and cluster tests, provider builds against the new pin).

Pin plan

  1. Fix P1 WebSocket stability gaps #403 passes Fork Tests and review; the dev-pair GPU proof passes.
  2. Fix P1 WebSocket stability gaps #403 merges into mlx-swift-lm main; this PR re-pins libs/mlx-swift-lm to that merge commit (signed, no force) and CI re-runs.
  3. If Release preparation: provider 0.10.12 into dev #1970 merges first, this PR's diff becomes the one commit; if dev moves, refresh by a signed merge of dev.

Not in this PR

  • Backing pages as a request grows (instead of prompt + max_tokens up front): a design note, not code. Production's segmented pools also make the scheduler reserve the full sequence (scheduler.reserveFullSequenceTokens), so admitted requests never preempt for KV; lazy backing must keep that promise in the grant and the physical floor and only defer the allocation, and must handle a late allocation failure (preempt-and-requeue) on the step path. The placement here already holds a growing pool at 10–14 passes per step in the model.
  • A dispatch gauge (part passes per step on /metrics and in the request profile): follow-up.
  • The GPU proof itself: planned below, not run (the pair is reserved for 0.10.12's release proofs).

GPU proof (planned for the dev pair, ~20 min, not run)

One arm per Mac, both models at once, the same seeded load: Mac A today's paged build (#1970), Mac B a build of this PR (the SDK change touches no Metal source, so the metallib is #1970's). On each Mac two isolated provider instances, the 9B and Qwen 3.6, each held at c = 4 for 15 min with GPQA reasoning prompts, max_tokens 131,072, and a finished stream replaced at once (the engine never drains). Every 30 s: per-stream decode tok/s, paged_kv_committed_bytes, paged_kv_live_bytes. Read at 0–1, 3, 6 and 15 min busy, as a ratio to the same instance's first minute. Pass: Mac A reproduces the decay (≤ 0.6× by 6 min for at least one model) while Mac B stays ≥ 0.85× at 3, 6 and 15 min for both, and ≥ 1.5× Mac A at 6 and 15 min; first-minute speeds within 5 % across Macs; no crash; Mac B's committed bytes no higher than Mac A's. Steps, scripts and stop rules: PAGED-ALLOC.md §5.

jonathan308 and others added 30 commits November 9, 2026 04:04
…dispatch test, and the silent banner in the onboarding checks

- CLIDispatchTests: `start --network --opencode` is refused at parse (its usage block is right there); the test now
  uses `start --choose` without a terminal, which start refuses once it runs.
- ClusterOnboardingChecks pinned the screen's opening with roles beside a silent other Mac; with D3 it names none:
  "This Mac · the other Mac (…) isn't answering".
…pped line, the longest-context lead shared

The refactor pass for #1931 (d-inference AGENTS.md, "Required Refactor
Pass"). Behaviour preserved; no test changed.

- One parse rule for the CLI's two entry points: `Darkbloom.parseAsRootOrExit`
  parses the command line, and a parse error ends the process with its usage
  block, as before. `main.swift` and the AppKit host each repeated the same
  do/catch for it; both keep `exit(afterRunWithError:)` for a refusal the
  command makes once it runs.
- One builder for the pair screen's "Stopped; last model …" line
  (`OnboardingLive.stoppedLine`), read by `localStatus` both where a stopped
  pair's other Mac is away (`awayLines`) and where it isn't, in place of two
  copies of the expression.
- The recommendation's longest-context reason and its short form share their
  lead (`ClusterOnboardingModeAdvice.longestContextLead`), as `fasterWords`
  and the measured words already do, so `brief` can't drift from
  `longestContextWords`. The same prefix as before: "the longest context".
- Comments only: the `StartLocalFirst.swift` header and
  `ClusterOnboardingModeAdvice`'s doc are wrapped like the rest of each file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s review, D7)

The review found D7 narrower than its rule: beside --solo only the mode flags stopped writing [local] mode.
`--solo --choose` still saved its answer over the pair's mode (and asked for a route), and --me-first over a saved
me_first = false, --no-me-first, --me-first-idle and --route still wrote [local] keys the pair reads.

One test per flag: --choose's answer serves that start only and asks for no route; each settings flag that would
change a key the pair reads is refused, naming the key, and nothing is saved; values equal to the pair's serve.
On 03cba3d: 3 tests fail with 10 issues (the parameterized one in all four cases).
…y-pins

#1930 holds a Gemma 4 pipeline to the memory plan's request. One conflict,
docs/architecture/inference.md's Gemma pipeline bullet: dev's text, with
this branch's `hostBound` note and its functions and pinning tests restated
for the memory plan (READY is the planned bytes, each stage's host 65,536).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After #1930 a Gemma 4 pipeline serves the memory plan's request (32,768 +
32,768 in 65,536), so eachStageHoldsAndCoversTheLongestRequestItServes
pins, for every row, cut, rank and prefill schedule: the stage's KV host
bound 65,536 tokens in 512-token chunks; READY's capacity equal to the
planned bytes, with no longer request asked of the stage; and every request
shape within the plan (32,768 + 32,768 down to 1 + 1) charged no more than
READY. Tensor parallel's pins (262,144) are unchanged.

Whichever of this PR and #1932 (which lifts #1930's cap) merges second flips
these pins back to 262,144.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e pair reads is saved (#1931's review, D7)

On a Mac in a pair [local] holds the pair's settings: its answer (mode), its pause (me_first,
me_first_idle_minutes) and its router's route. A solo start now saves none of them:

- --choose's answer serves that start only, and no route question follows (the pair's route serves);
- --route, --me-first-idle, --no-me-first, and --me-first over a saved me_first = false, would change the pair's
  value, and the background service reads them from [local], so beside --solo each is refused before anything
  starts or is saved, naming the key (StartServingResolver.soloSettingsRefusal); a value equal to the pair's serves.
  Start.run makes the same refusal before this Mac's part of the pair is touched, as it does for --choose.
- Only this Mac's one port is still saved, as on every start: the pair's API listens on it too.
- A plain `start --local` on one Mac still saves its choice (#1899's rule).

Docs (local-first, cli-reference, configuration) and the changelog say exactly that.
Tests: the red commit's three (one per flag) and a wiring test that the refusal comes before the leftover part is
released; with the CLI and start suites, 179 tests in 22 suites pass.
…mode (red)

Red first for the real-refusal path of D6. #1932's tests drove the drivers
with injected refusals, and its real-Mac proof drove them with the dev fault,
which threw inside each gate's typed block. A real refusal never got there in
Gemma 4, GLM and MiMo tensor parallel, MiMo's pipeline or GPT-OSS's pipeline:
their running gate first ran the load's entry check
(`QwenResidentResourceEnvironment.require()`), whose 6 GiB floor is the one
the typed check asks too, and whose refusal is an untyped `ProbeError`. That
error escapes the stop latch, the stop slot and the lanes, and ends the worker.

`QwenDenseStageLoadResources.sampleOverride` lets a test show the host memory
gate a Mac whose memory is taken (`TakenMemory`: 512 MiB free, no file cache,
normal pressure, no swap). No fault is armed; every gate reads it as it reads
the kernel's counters. With it:

- RealMemoryRefusalTests: every running gate throws the typed refusal (Gemma,
  GLM and MiMo tensor parallel; MiMo's and GPT-OSS's pipeline; Qwen's and
  Gemma's, typed already), and a stop latch over MiMo's or GPT-OSS's gate
  latches it.
- Two ranks, the refusing rank asking its family's own gate on the taken
  reading and classifying it as the runtime does: GLM's tensor-parallel lanes,
  Gemma's lanes (QwenTensorParallelBatchDriver) and MiMo's pipeline lanes end
  the newest lane alone on both ranks; and over real local sockets
  (PipelineStageAbortTests, Metal), a MiMo stage on rank 1 and a GPT-OSS stage
  on rank 0 end the request on both ranks and the next request exchanges.

On dev 0f11fbe every one of these fails with the untyped refusal
"Selected-stage loading needs 6.00 GiB of admissible memory and has 0.50 GiB",
which escapes the latch or the lane check (run locally: RealMemoryRefusalTests
4 tests, 13 issues; the three lane tests "Caught error"). The fix follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, both ranks' one abort, every owed slot, the lanes

The independent review of #1932 (F2, F4, F6) found claims the fix rests on
with no test where it matters. These are model-free.

- The stop marker on the encrypted link real pairs use (F2):
  PipelineStageAbortTests' two-rank cases now also run keyed
  (Collective.establishDataPlane with pinned credentials). There every
  transfer, a marker and its confirmation too, is an authenticated record of
  its own type and label, so a marker on the wrong record fails
  authentication. The fixture's raw path never checked the record.
- Every other slot a rank owes, plain and keyed (eachOwedSlotCarriesTheStop):
  rank 1's token, rank 0's tokenAccepted, rank 1's decisionAccepted, rank 0's
  compact decision, rank 1's alone-route prompt digests (the stop deb3572
  takes before each frame), and an MTP round's control frame (MiMo's and
  Qwen's rounds). Each is followed by the next request's exchange on the same
  collectives. These run where Metal is (CI).
- The TP stop rule over the encrypted link (TensorParallelPlanChecks,
  checkSealedEndAgreement, CPU): the end agreement crosses a keyed session's
  sealed all-sum as the product group carries it (float32, each partial
  sealed and opened by QwenTensorParallelSealCodec). Both ranks read one end,
  a memory stop names the refusing rank (rank 0 if both), the owner's stop, a
  stop token and the length win, counts up to 2^24 - 1 stay exact, and a
  tampered partial is refused.
- Both ranks report the same abort (F6, ProcessChecks):
  abortsThatDisagreeAreNotTaken. The fake worker's new `abort-mismatch` rank 1
  names rank 0 where rank 0 names rank 1. The consumer gets a failure, never
  an abort; nothing is counted aborted; the pair is fenced. It fails with the
  review's breakage C, the owner taking any rank-1 abort ("A disagreeing abort
  reached the consumer as [token 9, aborted memory 1]").
- The lanes (F4), on the drivers with a model-free harness:
  - MiMoBatchDriverTests.aMemoryStopWaitsForTheAnswerItsLaneOwes: rank 0's
    stop is latched while the lane's last token awaits the owner's answer.
    The lane runs and publishes nothing more and leaves only once that answer
    came. The shared host now refuses an abort with an answer owed.
  - rankOneFollowsAMemoryLeaveItsOwnDeadlineCrossed: f7af179's case on
    this driver. Rank 0 plans a memory leave in the step where the lane's
    deadline passed on rank 1 alone; rank 1 ends it aborted, not cancelled.
  - GPTOSSBatchDriverTests.aMemoryRefusalOnEitherRankEndsTheNewestLaneAloneOnBothRanks
    (7d609ae's lanes).

Green locally: TensorParallelPlanChecks, ProcessChecks, MiMoBatchDriverTests
(7), GPTOSSBatchDriverTests (8), QwenTensorParallelBatchDriverTests (32),
GLM5NextTensorParallelLaneTests (16), PipelineStageAbortTests' CPU cases. The
keyed and slot cases need Metal (CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… them

The review of #1932 (F3): no CI job ran the worker package's tests
(provider-tests.yml ran only its CapabilityChecks). So
testAMemoryAbortEndsOnlyThatRequestAndTheWorkerServesTheNext and
testALaneAbortedForMemoryEndsAloneAndTheWorkerServesOn ran only on the
author's Mac.

Cluster Release Build Checks now runs
libs/darkbloom-cluster-worker/Tests/LifecycleChecks/run.sh: WorkerTests and
WorkerLaneTests (39 XCTest cases; the coordinator over its real pipes with a
fake runtime, CPU only), in a debug build of the worker package on the
runner's 12 cores. test-provider-ci-workflow.py pins the step. Local run of
the same filter: 39 passed, both D6 cases among them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S, the gate's cadence and a prompt's prefill

The review of #1932 (F1, F7, F8 and its note on the gate's cadence), for
0.10.11:
- inference.md's D6 section names GPT-OSS's pipeline and lanes
  (7d609ae) beside MiMo's.
- The stop table: on the alone route, rank 1 takes a stop point before each
  frame it prefills alone, in its digests' slot (deb3572).
- The latch: the gate is now asked at the stop points, about once per prompt
  chunk on the rank prefilling, where `check` asked it every 250 ms from
  inside the transfers. A refusal is acted on up to one chunk later.
- A tensor-parallel prompt's prefill: what memory does while its chunks run
  without a check (nothing the request allocates passes its reservation; the
  rest of the Mac can change, and the first check sees it). Why there is no
  per-chunk check: an agreement per chunk is an evaluated all-sum that ends
  the prefill's overlap of host and GPU work. Lanes check between frames.
- test.md: with lanes, every live check of the armed rank counts, another
  lane's reservation too (refused at reservation).
- The changelog fragment lists GPT-OSS's pipeline.

The Gemma pipeline cap's text (#1930's fragment and docs) is made consistent
in the next commit, which reverts the cap's lift: 0.10.11 keeps the cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…longer says a refusal ends the worker

e379655 reverted the cap's lift (0.10.11 keeps #1930's cap; the lift is
its own draft PR for 0.10.12, based on #1932). #1930's text came back with
it, and it still gave the cap's reason as a pipeline Mac whose memory
refuses a running request ending its worker and the pair. D6 makes that
false (review F1):
- changelog.d/gemma-pair-native-context.md keeps "Its pipeline keeps the
  32,768 + 32,768-token request, as every model's pipeline does" and drops
  the reason;
- two-mac-cluster.md: a Mac whose memory refuses a running request, in either
  mode, ends that request alone, and the pair keeps serving;
- inference.md: such a refusal now ends that request alone, as tensor
  parallel's ranks do; 0.10.11 keeps the pipeline at the memory plan's
  request all the same, until the abort is proven on real pairs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gain (lifts #1930's cap), for 0.10.12

#1930 held a Gemma 4 pipeline pair to the memory plan's request (32,768 +
32,768 in 65,536) because a pipeline stage whose memory refused a running
request ended its worker and the pair (journey 3, D6). #1932 (0.10.11) ends
such a request alone on both ranks in every pair mode, and 0.10.11 kept the
cap until that is proven on real pairs. This lifts it, for 0.10.12. It
reverts e379655 (#1932's revert of e377efa):

- ClusterRuntimeAdapter.pipelineServesWholeProfile is `self ==
  .gemma4LayerStage` again: the provider advertises and holds a Gemma
  pipeline to its whole profile (262,143 prompt, 32,768 output, 262,144
  context) and the worker's stages admit it; LOAD, quotes and the planner
  still size the memory plan's request, and each rank's live gate decides a
  longer one when it is reserved.
- ResidentAdmissionGemma4Tests and PairContextWindowTests pin both modes'
  whole profile again (and the refusals at 262,144).
- Docs (inference, two-Mac cluster, protocol messages) say the pipeline
  serves the whole profile, with D6's abort as the reason it can: 0.10.11
  served the memory plan's request. A 0.10.12 fragment of its own; 0.10.11's
  gemma-pair-native-context.md stays as 0.10.11 ships it.

Whichever of this and #1928 merges second flips #1928's Gemma pipeline-stage
pins back to 262,144.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y that request; the dev fault is the reading (D6)

Before: Gemma 4, GLM and MiMo tensor parallel (one request, Gemma's lanes,
GLM's 8 lanes), MiMo's pipeline (one request, MTP, lanes) and GPT-OSS's
pipeline ran the load's entry check (`QwenResidentResourceEnvironment.require()`)
before their typed check. Its floor is the one the typed check asks, and its
refusal is an untyped `ProbeError`, so a real refusal escaped the stop latch,
the stop slot and the lanes and ended the worker; the pair stopped serving for
about a minute. MiMo's gate had no typed block at all. The dev fault threw
inside the typed block, after the entry check had passed, so the real-Mac
proof took a path real pressure never takes.

After:
- Every running gate asks power and thermal state first (untyped: they still
  fail the worker) and judges memory only inside its typed block:
  `ClusterLiveMemory.requireTensorParallel` (Gemma, GLM and MiMo tensor
  parallel, GLM's page growth), `MiMoResidentRequestAllowance.requireLive` (now
  typed, one sample of the allocator) and `GPTOSSResidentRequestAllowance.requireLive`.
  The entry check is not asked: the gate asks at least its floor on its own
  sample. The Qwen and Gemma pipelines, GLM's pipeline and the Qwen TP batch
  had this shape already. GLM's start asks no memory check before the first
  frame (#1932), so a refusal there is the latch's.
- The dev fault is the reading, not a branch. `ClusterMemoryFault.reading`,
  in `QwenDenseStageLoadWatch.admits`, gives the gate the sample with this
  Mac's memory taken (`withMemoryTaken`: no free page, no file cache, the
  counters consistent) from the armed request's Nth gate pass on. The policy
  refuses it with its own sentence, and the first check that judges it throws,
  as for a real reading: had a gate still asked the entry check first, the
  fault would have ended the worker there too. Same switch
  (`~/.darkbloom-dev/cluster-setup/memory-fault`), read only in a dev or DevNet
  install, consumed at the request's start, disarmed at its end;
  `refuseIfDue` is gone. The worker logs `memory=taken` at the Nth pass.
- Tests: the red commit's tests pass (RealMemoryRefusalTests, the lane tests,
  the two-rank pipeline test); TensorParallelMemoryAbortTests now pins the
  fault as the reading every check judges (the entry check refuses it untyped,
  every running gate typed, admitted again once disarmed), one-shot and inert
  in a production install.
- Docs: inference.md states the gate rule and the fault's new place; the test
  guide's fault section says installs and the reading. Gemma's pipeline keeps
  #1930's cap, with its real reason (planned and proven at the memory plan's
  request; the whole context waits for its own proof), in the changelog
  fragment and two-mac-cluster.md, instead of "ends its worker".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Macs admit and serves it (red)

Red first for 0.10.12's first concurrency step: a Gemma 4 pair in tensor
parallel serves one request at a time today. Its owner already serves
batch lanes (the shared batch driver with a Gemma executor), but no width
is ever saved for it: guided placement sizes only Qwen TP rows (by their
native quotes), and `ClusterConfiguration.validate` refuses a Gemma
tensor-parallel `batchLanes` outright. So the setup screen says "serves
one request at a time" and the slot's `max_concurrency` is 1.

These checks state the behaviour wanted, with the APIs dev already has:

- ClusterPlacementTensorWidthTests: a Gemma tensor-parallel placement
  whose layout states a lane charge (`laneBytes` beside the family's
  allowance, as the native plan tool will write it) saves the widest of
  8, 6, 4 and 2 lanes both Macs admit now, each lane after the first
  adding that charge to every rank's need; the smaller Mac decides; the
  setup screen's number (`ClusterSetupPlanning.loads`) is the saved width
  and `DistributedInstalledPlan.batchLanes`'s; a layout with no lane
  charge saves none and says one.
- aGemmaTensorParallelPairServesTheWidthItsSetupSaved: a Gemma TP setup
  saved with 8 lanes is accepted on both Macs, both plans serve 8, a lane
  retires alone and both ranks are launched with 8 (a new
  `.gemma4TensorParallel` shape of the approval fixture).
- ConfigurationCheck: a Gemma TP setup keeps a width of 2, 4, 6 or 8 with
  serial prefill; GLM and MiMo TP still save none; a width beside the
  one-chunk lookahead is refused.
- The configuration check runner compiles again: ClusterConfiguration's
  validation reads ClusterPublicModels, which needs the grant files and
  the placement module, which its run.sh did not build.
- InstalledBatchLanesCheck: a Gemma TP setup's saved width reaches its
  owner lease, its actual owner child and the rank.
- PlacementChecks: the product layout (the allocator's bound known)
  states Gemma's lane charge, one request's whole charge.

On dev 0f11fbe each fails: no width is saved, the screen says one,
the Gemma TP setups are refused at validation, and the layout states no
lane charge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…many requests at once as both Macs admit

A Gemma 4 pair in tensor parallel served one request at a time: its owner
serves batch lanes, but nothing ever saved it a width. It is now sized at
placement the way a Qwen TP row is, by what both Macs' memory admits, and
LOAD reserves that width.

- The lane charge. Gemma's layout states, beside its allowance (one
  request at the memory plan's request plus the rank's reserve), what each
  lane after the first adds: one request's whole charge
  (`ClusterTensorParallelFamilyPlan.laneBytes`, from
  `Gemma4TensorParallelRequestBudget.laneBytes`), the charge `reserveLane`
  admits every lane with. The native plan tool writes it where the
  allocator's bound is known; metadata-only layouts carry neither.
- The planner. `ClusterPlacementPolicy.tensorParallelLanes` prices a
  tensor-parallel candidate at a width: each rank's native reservation
  grows by the lane charge for every lane after the first. It refuses a
  width for a family without a lane charge, or beside a native quote.
- The width. `ClusterPlacementTensorWidth` sizes both kinds of owners: a
  Qwen TP row by its native quotes, as before, and a family with a lane
  charge at 8, 6, 4 and 2. The placement chosen for one request keeps its
  leader and split; the first width both Macs admit now is saved, and none
  (one request at a time) when no wider width fits. It never exceeds the
  width the family qualified on real Macs (`qualifiedLanes`: eight for the
  Qwen TP rows, as before, and eight for Gemma, to be confirmed on the M5
  Ultra pair).
- The setup. `ClusterConfiguration.validate` accepts a Gemma
  tensor-parallel width of 2, 4, 6 or 8 with serial prefill
  (`ClusterRuntimeAdapter.savesTensorParallelWidth`). The setup screen,
  both owners, the slot's `max_concurrency` and the local API read it
  through `DistributedInstalledPlan.batchLanes`, unchanged.
- LOAD. Gemma's rank reserves `reservedBytes(lanes:)`, the allowance and
  a lane charge for each lane after the first: the figure the planner
  priced. Its prompt-prefix memory tier is measured beside every lane's
  charge. The load line reports `reserved=`.

GLM tensor parallel keeps its eight lanes, MiMo tensor parallel serves one,
and the pipelines are unchanged: later steps of the same work.

Checks: PlacementChecks prices each width as LOAD reserves it (12.7 GB a
rank at two lanes, 28.6 GB at eight; two idle 256 GB Macs hold eight, two
idle 24 GB Macs one) and refuses a width without a lane charge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… review follow-up sits on the real refusals

#1935 now merges after #1934 with nothing left to resolve; D6's whole fix
ships in 0.10.12 as #1934, #1935 and #1933 in that order. The overlap,
resolved once here:
- docs/developer/test.md: #1934's fault (it changes the reading the gate
  judges, `ClusterMemoryFault.reading`), with #1935's note on lanes: every
  pass of the armed rank's gate counts, another lane's reservation too.
- docs/provider/two-mac-cluster.md: #1934's reason the pipeline keeps the
  standard request, with #1935's answer to a request refused while it runs
  (the same 503, or the typed chunk once a stream started).
- changelog.d/gemma-pair-native-context.md: as `dev` has it, which is as
  0.10.11 ships it (#1930's fragment, in the approved 0.10.11 snapshot
  695a3b4). Neither PR edits a fragment another release includes.
- inference.md, IndependentHistoryBatchDriverTestSupport.swift,
  MiMoBatchDriverTests.swift: merged as they are. #1934's
  `[() throws -> Bool]` holds #1935's lane tests' closures.
- PipelineStageAbortTests: #1934's real MiMo and GPT-OSS refusals run keyed
  too, as every two-rank case there does.
- GPTOSSBatchDriverTests: GPT-OSS's lanes refuse through GPT-OSS's own gate on
  a Mac whose memory is taken (TakenMemory, no fault), as #1934 made MiMo's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.10.11 ships without #1932 (#1859 was approved at 695a3b4), keeps
#1930's Gemma pipeline cap, and lists D6 as a known issue. The whole D6 fix
ships in 0.10.12 (#1932 in dev, then #1934, #1935 and #1933). The docs say
what is true from the release that ships them:
- inference.md, D6's section: "Before 0.10.12 a refusal that remained was
  thrown from the request's `check`" (it said 0.10.11).
- inference.md, Gemma's pipeline: 0.10.11 serves the memory plan's request
  in the pipeline; from 0.10.12 a stage's refusal ends that request alone, and
  the pipeline still serves the memory plan's request until serving the whole
  context there is proven on real pairs. It said "0.10.11 keeps the pipeline
  at the memory plan's request all the same", as if 0.10.11 had the abort.
Fragments carry no version: pipeline-stage-memory-abort.md names none, and
gemma-pair-native-context.md stays as 0.10.11 ships it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… lift sits on the whole D6 fix, for 0.10.12

#1935 now sits on #1934 (merged at a728d65), so this branch holds #1932,
#1934 and #1935, with the lift on top: it merges last, with nothing left to
resolve. Both sides rewrote the Gemma pipeline's text; this resolves it for
0.10.12, which ships D6's whole fix and this lift:
- inference.md: the lift's whole-profile text. 0.10.11 serves the memory
  plan's request in the pipeline (#1930), because there a stage's refusal
  ended its worker (journey 3, D6); 0.10.12 ends such a refusal alone, and the
  pipeline serves its whole profile again. It said "0.10.11 ended such a
  refusal alone (#1932)", which 0.10.11 does not ship.
- two-mac-cluster.md: the lift's text, with #1934's and #1935's: in every
  mode a request one Mac's memory refuses while it runs ends alone (the same
  503, or the typed chunk once a stream started), and the other models'
  pipelines keep the standard request until serving their whole context is
  proven on real pairs.
- changelog.d/gemma-pair-pipeline-whole-context.md names no version
  (fragments carry none): "Before, its pipeline served the 32,768 +
  32,768-token request." It said "0.10.11 held …" and "as since 0.10.11".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Test that `darkbloom cluster leave` leaves a pair in one command (red)

UX audit R14: leaving a pair takes four steps (`cluster pair --status`,
read a pin, `cluster pair --forget <pin>`, `start`), and nothing says
what happens to the other Mac.

The tests ask for `darkbloom cluster leave [--yes]`, from either Mac:
- it parses with `--yes`/`-y`, and `darkbloom cluster --help` lists it;
- a Mac in no pair has nothing to leave (exit 0, nothing touched); a
  pairing record that can't be read changes nothing (exit 1);
- in a terminal it says what leaving does, then asks "Leave the pair?
  [y/N]"; Enter, no, anything else or the input's end change nothing;
  without a terminal it refuses unless `--yes`;
- yes stops this Mac's part first (the pair on both Macs while the other
  Mac answers, then this Mac's cluster service), then forgets every
  pairing of this Mac, in that order; a part that doesn't stop leaves
  the Mac paired, and a pairing that can't be forgotten is said;
- it ends with what happens to the other Mac (it stopped too, or wasn't
  reached; it keeps its pairing until `cluster leave` there), how to
  serve each Mac alone (`start`) and how to pair again (`cluster` on
  each Mac); single-Mac serving here keeps running and is said so;
- the stop, as `darkbloom uninstall` already takes it for the pair, no
  longer says "Run `darkbloom cluster` to start it again" or "stop
  --service there too" when this Mac is leaving (`finishStop(leaving:)`).

Seams, with today's behaviour: `Cluster.Leave` and `ClusterLeaveFlow`
exist but aren't reachable and do nothing; `finishStop` takes `leaving`
and ignores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools: red tests for waiting on this Mac's models and following its address

`darkbloom --opencode` / `--hermes` set the tools up as soon as the local
API answers, before the model loads, so the limits they write are the
catalog's or none ("run it again once the model is loaded"); and after a
port or key change nothing says the tools point elsewhere (UX audit R11).
Tests first; the skeleton adds only the names the tests use, unwired:
ModelLoads, InterruptWatch, LiveLine and ModelLoadWait (it never waits),
ToolPointer and ToolAddress (they read nothing), the planners' `pointer`,
`Start.noteToolsPointingElsewhere` (it says nothing), the step's
`modelLoadWait` (unused), `runAgainOnceLoaded` (today's words),
`ToolIntegrationStep.command` (#1901's helper) and `LocalEndpoint.tokenPath`
made public.

- ModelLoadWaitTests (fakes: a scripted daemon state, a clock that moves
  only between looks, no file, port or signal):
  - a model still loading: the step waits, reads `/v1/models` again, and
    writes this Mac's window (262,144) instead of the catalog's 131,072;
  - nothing loading (or Only me, which loads before it listens): no wait;
  - a provider that hasn't said what it loads yet is asked again a second
    later; no word at all, or nothing loaded and nothing to load: set up
    after that second look;
  - the deadline: one ✗ line naming `darkbloom --opencode --hermes` and
    `darkbloom status`, nothing written;
  - Ctrl-C: nothing written, and the start says so;
  - a model it waited for that didn't load: nothing written, `darkbloom
    status` says why;
  - one live line on a terminal (drawn in place, erased at the end); none
    without one, only a line as it starts and one as it ends;
  - only the API's own process's state counts; models this Mac doesn't
    list, or that are loaded, aren't waited for; the live watch takes the
    signal only while it waits (SIGUSR2 stands in for SIGINT).
- ToolAddressTests: a later start on another port says so in one line
  with `darkbloom --opencode --hermes` and changes no file; only the tools
  set up are named; another key file is named, the same key in another file
  isn't; mixed misses get one line; no line with a tool flag or without a
  local API; the planners' files read back (a key file under ~, and one
  with a quote and a space in its path).
- StartToolIntegrationTests: the line for a model left unloaded names it,
  `darkbloom status` and the short command.

Red (prod identity, CPU-only, sandboxed): ModelLoadWaitTests 11 of 12 fail
(28 issues), ToolAddressTests 5 of 6 (11 issues), StartToolIntegrationTests
1 of 16 (2 issues). Passing on both sides by design: the live line's words
and clipping, and no line with a tool flag or without a local API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* local API port: red pins for the short form in --port's line

#1896 (merged into this branch from dev) added a user-facing line with the
long form: `start --port <n>` replacing a saved port says ``Local API port:
8007 (saved, instead of 8005: tools set up for 8005 need `darkbloom start
--opencode` or `--hermes` again).`` (`LocalAPIPort.note(named:saved:)`).
Its two pins now expect `darkbloom --opencode` (#1901 review, the verdict).

Red (prod identity, CPU-only, sandboxed): LocalAPIPortTests 1 issue,
LocalAPIOnePortTests 1 issue: exactly these two expectations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* `darkbloom cluster leave` leaves a pair in one command, from either Mac

UX audit R14: leaving took `cluster pair --status`, a pin,
`cluster pair --forget <pin>` and `start`, and nothing said what
happens to the other Mac.

- `darkbloom cluster leave` reuses the steps `darkbloom uninstall`
  already takes for the pair, in its order:
  1. this Mac's part stops: `Cluster.Stop.leavePair`, now shared with
     uninstall (its closure moved there unchanged): the pair stops on
     both Macs and this Mac's cluster service leaves login, as
     `cluster stop --service`; when the pair can't stop together, only
     this Mac's part, as `cluster stop --local-only`;
  2. every pairing of this install is forgotten with
     `cluster pair --forget <pin>` (`ClusterUnpairing`, as Start over):
     the leading Mac tells the other Mac first, which reclaims its pair
     cache and stops its part.
- In a terminal it says the pair in one sentence and what leaving does,
  then asks `Leave the pair? [y/N]` (No by default); without a terminal
  it refuses unless `--yes`. A part that doesn't stop leaves the Mac
  paired (exit 1, "try again"); nothing else changes: single-Mac
  serving, models and the cable port setup stay.
- It ends with what happens to the other Mac (stopped too, or not
  reached; it keeps its pairing until `cluster leave` there), that
  `darkbloom start` serves each Mac alone (or that single-Mac serving
  keeps running here), and that `darkbloom cluster` on each Mac pairs
  them again. A Mac in no pair has nothing to leave; an unreadable
  pairing record changes nothing.
- `Cluster.Stop.turnServiceOff` is `cluster stop --service`'s path,
  unchanged, as a function; `finishStop(leaving:)` drops "Run `darkbloom
  cluster` to start it again" and "stop --service there too" while a Mac
  leaves (uninstall too: its summary says what to do on the other Mac).
- `darkbloom cluster --help` lists `cluster leave`.

Docs: cli-reference (`darkbloom cluster leave`, uninstall's step 2),
two-mac-cluster.md (Leaving the pair, Undo); changelog fragment
`cluster-leave.md`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(desktop, cluster): the app on a paired Mac: no Autopilot dead end, true lines, `start --solo` when away (red)

#1892's review, follow-up (`review-1892-1895.md`, last section).

The app's Autopilot enroll on a paired Mac was a dead end. Onboarding starts
with Autopilot. Its `autopilot` action first downloaded a model, then ran
`start --autopilot …`, which the pair refuses in three CLI lines. Retry
repeated them, and nothing pointed to Start serving, which starts the pair.

- DesktopAppOnAPairedMacTests (provider):
  - autopilotIsRefusedFirst: the app's `autopilot` and `autopilot_models` on a
    paired Mac are refused in `DesktopBackend.arguments(for:)`, ahead of
    `runAutopilot`'s downloads. The words are the app's: "This Mac serves in a
    pair; Autopilot isn't available for pairs yet. Use Start serving." On an
    unpaired Mac the enroll is unchanged.
  - snapshotOffersStartServing: the snapshot on a paired Mac reports no
    `autopilot` capability (the app then offers its plain Start, as it already
    does for a runtime without Autopilot) and a `pair` with its model. On an
    unpaired Mac: `autopilot`, and `pair` null.
  - appStartLinesAreTrue: the app's Start line says what happened. A serving
    pair "serves" its model (never "started" one that already ran); after exit
    3 the pair "was asked to start … and isn't serving (above)", not "serves".
    The app's `--local-endpoint`, which a pair doesn't take, is said: "No local
    API was added on this Mac: …". A pair serving Only me has one here, so
    nothing is said.
  - otherMacAwayNamesSolo (the review's nit 4): `.otherMacAway`'s Next names
    `darkbloom start --solo` once this Mac's part was given up, and not before
    (it would be refused then).
  - appStartStartsThePair now pins those words too.
- desktop-app:
  - onboardingStartPlan: a paired Mac's start action starts the pair with no
    model and no local API of its own;
  - onboarding: a paired Mac's start page offers "Start serving" for the pair,
    with its model, never Autopilot, and sends that action.

On 9f41e9c723: DesktopAppOnAPairedMacTests fails 4 of 4 (6 issues), and
appStartStartsThePair 1; the two app tests fail. Each for the reasons above
(the enroll runs, and the refresh says "Turn on Autopilot first"; the snapshot
says autopilot and no pair; the old line; no hint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools: wait for this Mac's models before writing, and say when a tool points elsewhere

`darkbloom --opencode` / `--hermes` now wait, before they write a tool's
config, while the local API's own process still loads the models this Mac
lists for its start; then they read `/v1/models` again, so the tools get
the limits this Mac gives each model (its window) instead of the catalog's
or none. And a start without a tool flag says, in one line, when a tool set
up for Darkbloom points elsewhere, never changing its file (UX audit R11).

- ModelLoadWait (ToolIntegration): the API's process's own daemon state
  (`ModelLoads.reported`: only by the pid in `local.json`), its start's
  pending models and its loaded ones. Only me's server loads before it
  listens, so it isn't waited for; a provider that names nothing loaded and
  nothing to load is asked once more a second later (its API may answer
  before it says what it loads). A model that isn't loading (unloaded when
  idle, or loaded only on a request) isn't waited for: one line names it,
  `darkbloom status` and `darkbloom --opencode`.
- One live line on a terminal (`⠙ Loading Gemma 4 26B before setting up
  OpenCode… 42s`, erased at the end); without one, a line as it starts and
  one as it ends. At most 10 minutes. The deadline, a model that didn't
  load, or Ctrl-C (`InterruptWatch` takes SIGINT only while it waits, then
  gives it back) write nothing, say so in one line with the next step, and
  `Darkbloom keeps serving.`
- ToolAddress: OpenCode's and Hermes' provider blocks read back
  (`pointer`: the base URL and the key file `{file:}` / `key_cmd` reads),
  against this start's local API: its base URL and `local_token`
  (`LocalEndpoint.tokenPath`, or another file holding the same key). One
  line names the tools that miss it, what they point at, and `darkbloom
  --opencode` / `--hermes`. Called by the background and the terminal
  starts without a tool flag, not by launchd's child, not without a local
  API.
- The changelog fragment.

Green (prod identity, CPU-only, sandboxed): ModelLoadWaitTests 12/12,
ToolAddressTests 6/6, StartToolIntegrationTests 16/16; DarkbloomCLITests
1193 tests in 171 suites, with the suites that run the built binary or
open Metal skipped as before (CI runs them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say `darkbloom --opencode` in #1896's port line, its docs and the pending notes

#1901 review (the verdict and N1), on the merge with dev:

- `LocalAPIPort.note(named:saved:)`, which `start --port <n>` prints when it
  replaces a saved port, now says ``tools set up for 8005 need `darkbloom
  --opencode` or `--hermes` again``. Its quotes in cli-reference.md,
  direct-mode.md and troubleshooting.md, and #1896's pending fragment, say
  the same. ProviderCore can't reach `ToolIntegrationStep.command`, so the
  line stays a literal.
- N1: install-next-start-opencode.md describes the installer as it ends
  now (`Next: ~/.darkbloom/bin/darkbloom --opencode`), so the release notes
  no longer contradict this PR's fragment, which drops its own installer
  sentence. #1891 did the same for that line.
- The other pending notes that led with the long form (#1880's two, and
  #1892's pair-2 repro, now "a start with `--opencode`") and the tool code's
  developer comments say the short form. No open PR touches them.
- The long form now appears only as the alias: the help's "(same as `start
  --opencode`)", the CLI reference's global-options row, this PR's
  fragment, the comments that say "short for", the alias tests, and the
  Hermes fixtures of a file an earlier version wrote.

Green (prod identity, CPU-only, sandboxed): LocalAPIPortTests 9/9,
LocalAPIOnePortTests 10/10, ToolShortcutTests 8/8,
StartToolIntegrationTests 16/16, the planners and HermesVersionTests 36/36,
DarkbloomCLITests 1197/1197 (the suites that run the built binary and the
two Metal tests skipped, as before), test-install-identity.py 8/8;
docs-check, changelog-check and diff --check clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: the tools wait for the model, and starts say when a tool points elsewhere

Renders dev's pending LS-4 markers as today's behaviour:

- local-first.md (Use it from OpenCode or Hermes): it waits for your model
  on one live line (at most 10 minutes; a timeout, a model that didn't load
  or Ctrl-C write nothing); run it again when your models change; a later
  start names a tool set up for another address or key file, with the
  command that points it there, and never changes its file.
- quickstart.md: the live line in the opening block; step 5 waits for the
  models it started with, and the tools get this Mac's limits.
- cli-reference.md (Set up OpenCode or Hermes): step 4, the wait
  (`ModelLoadWait`: the API's own daemon state, the second look, the lines,
  the deadline, Ctrl-C); the one-line notice of a start without a tool flag
  (`ToolAddress`).
- tool-integrations.md: the wait in the flow and in Models, step 6 (follow
  the address), a failure-mode row and the code map.
- direct-mode.md: the key file row names `LocalEndpoint.tokenPath()` and the
  notice; the port-in-use fix says the start names tools still set up for the
  old port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test the update check's random pauses, its second round's switch, and a bound on its tries

The re-review of #1890 (changes needed, tests only) found:
- fixed pauses passed every test: one within a round (always the top
  of its range, Q3) and 120 s between the rounds (Q4);
- `automatic: false` and `automatic: true` in place of
  `automatic: request == nil` (ClusterServiceCommand.swift) passed every
  suite (Q1, Q2);
- under a mutant whose rounds never ended (Q7), UpdateCheckCommandTests'
  `unansweredCheckSaysWhatToDo` ran for 1 h 50 min until it was killed.
  Its coordinator fails every try at once and its updater doesn't pause,
  so only `next(after:...)` could end the check's `while true`: nothing
  bounded the tries. A time limit wouldn't have ended it either: Swift
  Testing's `.timeLimit` records an issue at its limit, then waits for
  an exit test's child (here, a 1-minute limit around a spinning child:
  the issue at 60 s, the child still spinning at 300 s, when it was
  killed).

Seams that change nothing:
- `SelfUpdater.ReleaseCheck.random` draws a pause from its range
  (`Double.random(in:)`); the check doesn't use it yet.
- `ReleaseCheck.nextForTesting` stands in for `next(after:...)`'s
  decision in a test (nil outside tests); `maximumTries` is `attempts`
  times `rounds`, which the check doesn't use yet.
- `Cluster.Service.supervisorConfiguration(..., runCycle:)` runs one
  cycle in the environment its `run` built (by default
  `ClusterPairUpdateCycle.run`), so a test can read that environment.

Tests:
- SelfUpdaterReleaseCheckTests (20 tests, 10 issues here):
  - each pause is drawn from its range: with a source that answers a
    quarter of the way in, a pair's check without an answer draws from
    0.5-1, 1-2, 60-120, 0.5-1 and 1-2 s, and pauses 0.625, 1.25, 75,
    0.625 and 1.25 s (fails: the check draws its own pauses);
  - a check whose every decision is to ask again (`.askAgain` or
    `.nextRound`) stops after its rounds' 6 tries, saying "(6 tries)"
    (fails: 100 requests, where the test's stand-in stops by itself);
  - the pauses' own source, of `standard` and of `pairCycle`, stays
    inside each range and spreads over more than half of it in 200
    draws (passes).
  The suite gets a 1-minute time limit for each test: a check that
  keeps asking in-process is cancelled at it, and a cancelled check
  stops.
- ClusterServiceUpdateTests: through the supervisor's own `run`, a cycle
  without a request gets a release check of 2 rounds, and a cycle for a
  `darkbloom update` request 1 (passes; Q1 and Q2 fail it).
- UpdateCheckCommandTests: each exit test's child ends itself after 60 s
  (`endChildAfter` in CLICommandSandbox.swift: its own thread, exit code
  124 and a line on standard error), and a test shows that a spinning
  child is ended that way (passes).
- WatchdogRecoveryIntegrationTests: a 2-minute time limit for each test
  (its offline updaters check in the test's own task).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say "a start with --opencode" in #1892's pair-2 test comment

The repro comment named the long form; it now reads as the matching
pending note does. Comment only: ClusterPairCommandsTests 118/118.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that Only me serves a model its picker just downloaded (red)

The refactor pass of #1899/#1900 found it by reading the code. Only me's
picker downloads the models picked that aren't on this Mac and returns
their ids, but `onlyMeModels` looks each id up in the snapshot `start`
scanned before the picker ran, so a model downloaded in this start is
dropped without a word. On a fresh Mac, choice 1 then a model from the
list downloads it and ends in "No model to serve yet" (exit 1); a Mac
with model A that also picks B serves A alone.

Seams, today's behaviour: `onlyMeModels(select:scan:)`; `select` stands
in for the picker, `scan` for a scan after it (not taken yet).

New test, failing here: a snapshot without `fresh/gemma`, a picker that
returns it, a scan after it that has it: Only me serves `fresh/gemma`,
after one more scan; with every model picked already on this Mac, no
second scan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(desktop, cluster): the app on a paired Mac offers Start serving, and its lines say what happened

#1892's review, follow-up (`review-1892-1895.md`, last section).

- The app's Autopilot is refused on a paired Mac, before any download.
  `DesktopBackend.arguments(for:)` refuses `autopilot` and `autopilot_models`
  ahead of `runAutopilot`'s downloads, in one line the app shows: "This Mac
  serves in a pair; Autopilot isn't available for pairs yet. Use Start
  serving." (`pairRefusedActions`, `pairAutopilotRefusal`).
- The snapshot lets the app offer Start serving.
  - On a paired Mac, `capabilities` leaves out `autopilot`
    (`snapshotCapabilities`). The app already reads that as a runtime without
    Autopilot, so even a released app offers its plain Start, which starts the
    pair (#1892).
  - New `pair`: `{ model }`, the pair's model name (`pairSnapshot`), read again
    after 30 s.
- Desktop app (onboarding):
  - on a paired Mac the start page uses the plain method with the pair's
    words: "This Mac serves in a pair. Start serving starts the pair with
    <model>.";
  - it sends `{ action: 'start', models: [], local: false }`, with no model and
    no local API of its own (`startPlan.startAction`);
  - its summary says the pair starts on both Macs, and the advanced model
    choice is hidden.
- The app's Start lines are true (`ClusterPairSummary.appStartLines`):
  - "the pair serves <model>" after exit 0, also for a pair that already ran;
  - "the pair was asked to start with <model>, and isn't serving (above)"
    after exit 3, never "serves";
  - "No local API was added on this Mac: …" when it asked for one
    (`--local-endpoint`) that the pair doesn't give this Mac
    (`givesThisMacALocalAPI`: Only me on both Macs, Both, me first on the
    leader).
- The review's nit 4: once this Mac's part was given up, `.otherMacAway`'s
  `next` adds "Or serve this Mac alone: `darkbloom start --solo`." (`pairIdle`).
  Before that, `--solo` would be refused, so it isn't named.
- Docs: cli-reference (paired start, the app's lines and Autopilot, exit 5),
  two-mac-cluster, troubleshooting (both app lines), agent-setup, desktop
  control (`capabilities`, `pair`, the refused actions), developer desktop-app
  (onboarding on a paired Mac). Changelog fragment.

Green (CPU-only, Xcode 27.2): the red commit's tests, and all of
DarkbloomCLITests, 1216 tests in 176 suites (Metal-loading suites skipped).
Desktop app: all 673 tests in 101 files, `tsc --noEmit` and prettier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): a paged slot's admission refusal is a 503 before any SSE header

Red first, from the re-review of #1893 (its probe P9). A paged slot, the
automatic backend of every catalog single-Mac model, takes no bridge KV
reservation: the engine's own admission is its memory gate, and refuses a
request that can never fit (EngineV2.requireRequestCanEverFit). The bridge
yields that refusal in-band, after the stream exists, so a streamed request
too big for the Mac gets HTTP 200, the SSE role chunk and "Response
generation failed", while the docs promise a 503 streamed or not.

aPagedSlotSaysWhenItsMemoryCantHoldARequest asks for the JSON 503 with the
memory words, streamed or not (NeverFitsEngine, in ContextWindowTestSupport).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cluster: each Mac of a pair answers on its own saved port, and no member relays a pair Darkbloom doesn't have

#1894's review, and the orchestrator's port decision:

- B1: rankZeroPort never falls back to rank 0's session port for Both, me first. While Darkbloom doesn't have the
  pair, that session listens on loopback with rank 0's own key alone, so a member relayed to an address that reset
  every connection, and its status and darkbloom local named it. Only an older build's cluster local, which doesn't
  send pairAPIPort, is still relayed at its session's port. The member now says why it has no address
  (ClusterServiceStatus.relayWaitsForOffer, from rankZeroAnswersOnItsMacOnly), and the leader's Members line follows
  where its API listens, not the scope alone (N3).
- Rank 0's every-address check is the pure ClusterLocalRelay.pairAPIPort(part:record:) (review item 6).
- One port per Mac, as every local API on a Mac since #1896: the relay (relayTick) and rank 0's API (leaderAPIPort)
  take this Mac's own port, LocalAPIPort.thisMac from the service's provider config (ClusterService.ownAPIPort): a
  saved [local] port as it is, an updated Mac's 8000 included; only a new choice avoids 8000 and 47420-47423. The
  pure rules take it as own (ClusterLocalRelay.port(own:for:scope:isFree:), ClusterLocalServing.apiPort(own:...)), so
  Installed/ stays free of Config/. The earlier rules are only the fallback when this Mac's port can't be read or
  chosen. Rank 0 no longer asks the other Mac's free ports (peerFreePorts is gone); freePorts is still sent for an
  older rank 0. thisMac is read only when a relay starts or rank 0's part starts, never every tick.
- A relay that can't listen on this Mac's port (another program holds it) says so once in the service log, is tried
  again every 10 s, and its status says which port and what to do (ClusterServiceStatus.relayPortHeld).
- The pair API's not-up words (LocalFirstWords.whyNotUp) now say to free the port or set another [local] port in
  provider.toml, then restart: a restart no longer moves it.
- The setup's card prints each Mac's own address once its port is up (N1): rank 0's API or the relay's record
  (OnboardingLive.ownPairAPIPort), else where to find it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Serve the models Only me's picker just downloaded

`onlyMeModels` looked the picked ids up in the scan `start` took before
the picker ran, so a model downloaded in this start was dropped. When a
picked id isn't in that scan, this Mac is scanned again, as
`loadRuntimeSnapshot` scans it (`Start.modelsOnThisMacNow`), and the ids
are looked up there. It costs one scan, only after the picker brought a
model; every other start keeps the one scan it had.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Bound the update check by its tries, and draw its pauses from its source

- The bound. `fetchLatestRelease` asked again in a `while true` that
  only `next(after:...)` could end. A check whose tries fail at once and
  whose pauses take no time (an offline test's updater) then spun as
  fast as it could under a decision that never stopped: in a review's
  run, UpdateCheckCommandTests' child spun for 1 h 50 min, at about
  130 % CPU. The loop is now `for made in 1...maximumTries` (`attempts`
  in each of `rounds`: 3 tries, or 6 for `pairCycle`), and the last
  try's decision is `.stop`, so it neither pauses nor logs that it asks
  again. A check decides as before: `next` already stopped at those
  counts.
- The pauses. Each is drawn by `ReleaseCheck.random` (by default
  `Double.random(in:)`, as before) from its range: 0.5-1 s, then 1-2 s,
  within a round, and 60-120 s between rounds.

Tests (red at 823dad5ac4): SelfUpdaterReleaseCheckTests 20/20,
UpdateCheckCommandTests 9/9, ClusterServiceUpdateTests 15/15,
WatchdogRecoveryIntegrationTests 39/39. No doc changes: what a check
does and how long it takes are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(cluster): a pair's API and every Mac's port for it take that Mac's own saved port

The docs now match the code:

- One port per Mac for a pair too: rank 0's API and each other Mac's port for it take that Mac's saved [local] port
  (LocalAPIPort.thisMac), never moved, an updated Mac's 8000 included; the ports may differ, and each Mac keeps its
  own whichever Mac runs rank 0 (two-mac-cluster.md, local-first.md, agent-setup.md, direct-mode.md, cli-reference.md,
  configuration.md, provider-release.md, inference.md items 8 and 9, the changelog entry).
- #1896's two pending LS-3 markers are fulfilled and deleted (local-first.md, agent-setup.md); no pending LS-3 is
  left.
- A held port: free it, or set another [local] port in provider.toml, then darkbloom restart, for the pair's API
  and for a member's port (no longer "restart starts the pair's API on a free port").
- While Darkbloom doesn't have a Both, me first pair, the other Macs pass nothing on and say so; the leading Mac's
  Members line follows where its API listens.
- The setup's card prints each Mac's own address once its port is up.
- N4: local-first.md no longer says a pair's API has one key for both Macs: each Mac's tools use its own key.
- This PR's changelog entry says what it replaces in #1896's entry ("darkbloom restart for the pair's own API"),
  which CONTRIBUTING keeps unedited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(provider): a paged slot's admission refusal is a 503 before any SSE header

On a paged slot, the automatic backend of every catalog single-Mac model,
the engine's own admission is the only memory gate: it refuses a request
that can never fit its grant and queues the rest. The bridge yielded that
refusal in-band, after the stream existed, so a streamed request too big for
the Mac got HTTP 200 and "Response generation failed". On one Mac
(distributed == nil) an admission refusal that maps to tokenBudgetExhausted
is now thrown before any stream exists, as the shared KV gate's and the
pair's already are (the re-review's diff); nonthrowing callers still get the
message in-band, and pairs are unchanged.

Docs keep the promise true: direct-mode.md's memory row and
hardware-support.md name both gates (the contiguous reservation, the paged
admission); inference.md's failure modes add the admission refusal. The
changelog states the network change plainly: a request the coordinator's
estimate undercounts is now served cut to the window (finish_reason length)
instead of refused on GLM, MiMo and Super. configuration.md's GLM default
and GLM5NextServingPlan's comment are current (the re-review's R1, R2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that `darkbloom doctor` knows how this Mac serves you (red)

UX audit R17: `doctor` (the quickstart's step 2, the installer's first
next step) checks the account link, trust, MDM and the coordinator, which
a local-only user can't fix and doesn't need, and misses the local API
(port, key file, tools). It reads no `[local]`.

The tests ask for a Local API section, first in the report:
- `mode`: what the running provider serves (read as `status` reads it),
  else the saved `[local] mode`; a saved choice that doesn't serve now is
  named; nothing saved: `darkbloom start` asks; on a pair, the pair's way
  and the Mac that runs its API;
- `darkbloom network`: on Only me, the network checks are not needed,
  with the command that changes how this Mac (or the pair) serves;
- `address`: up on its port once it answers; a port that doesn't answer
  (`darkbloom restart`); a port in use with the next free one, in
  status's words; not running (`darkbloom start`); a stopped pair; the
  other Mac that runs the pair's API;
- `key file`: present (`darkbloom local` shows the key); none holding a
  running API's key (`darkbloom restart`); none with `--no-auth`;
- `OpenCode`, `Hermes`: Darkbloom's provider points here, elsewhere, or
  at another key file (`darkbloom start --opencode` / `--hermes`); a
  config Darkbloom can't read; not set up; a tool left pointing at a
  local API on a Darkbloom network Mac (`darkbloom start --choose`);
- the tools' configs are read from the files `start --opencode` and
  `--hermes` write (the real writers, in a temp home);
- no line holds the key or a speed (a guard: it passes already);
- the whole command on a Mac set to Only me: the section first, none of
  the network checks, and no coordinator request.

Seams, with today's behaviour: `DiagnosticSection.localAPI`;
`DoctorLocalAPI` says nothing and never skips the network checks;
`DoctorToolSetup` reads no config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* `darkbloom doctor` opens with how this Mac serves you, and skips the network on Only me

UX audit R17.

- A Local API section opens the report (`DiagnosticSection.localAPI`,
  `DoctorLocalAPI`). No line shows the key or a speed; each problem names
  the next command:
  - `mode`: the running provider's way, read as `status` reads it (its own
    local API: Only me or Both; none: Both when it failed to open, else the
    network), else `[local] mode`, in the start summary's words
    (`LocalFirstWords.serving`); a saved choice that doesn't serve now is
    named; nothing chosen: `darkbloom start` asks; on a pair, the pair's
    way and the Mac that runs its API;
  - `address`: ✓ up on its port once it answers `GET /health` (2 s); ✗ a
    port that doesn't answer (`darkbloom restart`); ✗ an API that couldn't
    listen, fixed in status's words (`LocalFirstWords.whyNotUp`, with the
    next free port); ⚠ not running (`darkbloom start`); a stopped pair; the
    other Mac that runs the pair's API;
  - `key file`: ✓ the file the API's key is in (`LocalEndpoint.keyFile`);
    ✗ none holds a running API's key (`darkbloom restart`); none with
    `--no-auth` or before the first start;
  - `OpenCode`, `Hermes`: Darkbloom's provider in the tool's own config
    (the file `start --opencode` / `--hermes` choose): points here,
    elsewhere or at another key file (`darkbloom start --opencode` /
    `--hermes`), can't be read (why), or isn't set up. On a Darkbloom
    network Mac only a tool still pointing at a local API is shown
    (`darkbloom start --choose`). `DoctorToolSetup` reads OpenCode's JSONC
    with `JSONCDocument`, and Hermes' YAML with the planner's own reader
    (`HermesConfigPlan.setUp`, appended to its file).
- On Only me (the running provider serves only its owner, or nothing runs
  and `[local] mode = "local"`; a pair serving locally only), the network
  checks are skipped: the coordinator's detailed checks (one
  `darkbloom network: not needed (Only me)` check stands for them) and the
  attestation key, App Attest, attestation readiness, trust, coordinator
  traffic and billing sections (`DoctorRunner.networkDiagnosis`, moved
  unchanged; `buildOperatorDiagnosis(networkChecks:)`). Model fit,
  runtime, version, hardware and security stay. `--coordinator <url>`
  runs them anyway. `darkbloom verify` is unchanged.

Docs: cli-reference (the Local API section, `--coordinator`),
troubleshooting (doctor checks), local-first.md (Check how this Mac
serves); changelog fragment `doctor-local-api.md`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* doctor: name `darkbloom --opencode` / `--hermes`, as #1901 does

#1901 (merged) made `darkbloom --opencode` / `--hermes` the short form
every hint and doc names. The Local API section's tool lines now name it
too: "not set up (`darkbloom --opencode` sets it up)", and the fix for a
tool pointing elsewhere or at another key file. Tests, docs and the
changelog fragment follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cli: the pair's two tool lines name `darkbloom --opencode`, as #1901's do

#1901 made every tool line name the short form (ToolIntegrationStep.command). This branch's two lines for a paired
Mac (noPairAPI: the pair serves only the Darkbloom network; pairAPIElsewhere: its API is kept on the Mac that runs
it) still said `darkbloom start --opencode`; they now use command(tools) too, and their test says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: the quickstart says doctor checks the local API and tools first

Its Verify step said `darkbloom doctor` checks the Darkbloom network
(daemon connected, trust level, account link). It now opens with the
Local API section and, on Only me, skips the network checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: the 503 before any SSE header is for a refusal at admission, not a later lease

The confirmation of #1893 (nit C1): two later memory failures still end a
streamed answer in-stream, as before this PR. A request a paged slot
queued and then couldn't admit, because the 120 s admission lease expired
or the pool stayed full through its requeue budget, fails after the
response head: HTTP 200 and then an error event when streamed; 503 when not
(after the lease, with the older words). direct-mode.md's whole-window
paragraph and memory row, hardware-support.md, inference.md's lease row and
the changelog fragment say so in one clause each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* cluster: the relay's retry time compares as SDK 27.2 needs, and the approval fixture's Macs have a saved port

CI run 42450813244 on b3a76db414:

- scripts/test-check-date-comparisons.py: `Date() >= held.retryAt` is back-deployed in SDK 27.2. It is now
  `Date().timeIntervalSince(held.retryAt) >= 0`, as the script asks.
- ClusterApprovalServiceStartTests.aHandSavedPairApprovalThatEndedStaysSavedAndIsNeverOffered compares a Mac's
  provider configuration byte for byte across a service start. The leader's part now takes this Mac's own port
  (LocalAPIPort.thisMac), which saves [local] port when none is saved, so the file gained it. The fixture's Macs
  now have one saved, as every Mac that has served locally since #1896 does: the service takes it as it is and writes
  nothing, and the test's check is unchanged. The service saving a port when none is saved stays tested
  (theServiceTakesThisMacsSavedPortFromItsConfig).

Locally: ClusterApproval* 56/56, ClusterPlacementTensorWidthTests 6/6, ClusterService* 85/85, the relay 23/23.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that a saved route and key count on the running local API, with no restart (red)

Orchestrator's decision for #1902: `darkbloom route <choice>` and
`darkbloom route key` take effect on the running local API from its next
request; "after `darkbloom restart`" costs a model reload for a routing
change. Today `[local] route` is read once, when the local API starts.

The tests, with a stub engine and coordinator and a temporary
provider.toml (the router reads the file its settings came from):
- a running router whose saved route changes (this-mac → my-macs →
  my-macs-first → this-mac) uses each on its next request, with no
  restart, and logs the change; its model list follows the route too;
- a malformed edit (a bad value, then broken TOML) keeps the last good
  route and says so once in the log, without the file's content; a good
  edit then counts;
- a request this Mac serves never looks at the file; a passed-on request
  and a model list look once each (one stat);
- the file is read again only when it changes; one that is gone keeps
  the last good route, said once; one that comes back is read;
- a key saved or removed while running counts from the next request
  (this one passes already: the key was live through its notification);
- Both's local API and the pair's beside Darkbloom get the provider.toml
  they came from;
- the words: "✓ Saved. Your local API uses it now." / "It applies when
  your local API starts."; `route key` save and remove say the same, and
  a key removed while the route passes requests on says what the next
  request does; on the Mac that follows in a pair, the leading Mac's
  route and key apply (its local API, to which this Mac forwards); no
  "restart" anywhere, no key printed.

Seams, with today's behaviour: `LocalRouterConfig.settingsFile` and
`LocalRouterRouteFile` exist but nothing reads the file (the router uses
the route read at start, and the call sites pass no file);
`RouteSaved.PairPart`, `RouteChoiceFlow.pair` and `RouteKeyFlow`'s
`localAPIRunning` and `pair` exist with today's words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(desktop, cluster): the paired-Mac rules said where they live, one name for the pair's model, gaps pinned

The required refactor pass (AGENTS.md) for #1905. Behaviour is unchanged: the
sources change in comments and two small simplifications, and the tests only
gain checks (no expectation dropped or loosened).

Provider (Swift):
- The paired-Mac decision is said where it is made. `arguments(for:)` refuses
  Autopilot first, so a refused Autopilot downloads nothing, and its `paired` is
  the test `start` makes (an unreadable pairing record counts too). The
  snapshot's `pair` is read again after 30 s because `ClusterPairSummary.local()`
  asks launchctl, while an action reads it afresh.
- The app never serves a paired Mac alone: `DesktopBackend.arguments` says it
  at the app's `start` (never `--solo`; the pair starts, and local mode
  refuses).
- `pairRefusedActions`' doc is exact: only the enroll downloads first.
- `pairSnapshot` uses `ClusterPairSummary.model` (the name, else the ID)
  instead of spelling it again.
- `appStartLines` builds its two model lines with one shared tail; its doc is
  in plain sentences. `givesThisMacALocalAPI` says why it reads the role and
  not `localAPI.runsRankZero`: the app's Start reads the pair before it runs.
- `.otherMacAway`'s hint names `start --solo` exactly where `Start.pairStart`
  serves it (`pairIdle`).

Provider tests:
- `DesktopAppOnAPairedMacTests`: plain `DesktopAction`s instead of decoded
  JSON; one helper for the snapshot's two fields and one for the app's Start,
  each used where the same lines were repeated; the two app lines shared with
  `appStartStartsThePair`; no PR number in the header. `appStartStartsThePair`'s
  doc no longer says "started with".
- New checks, each for a mutant the PR's tests let through, and each passing on
  the PR head's sources: the app's Start isn't refused on a paired Mac (in
  `autopilotIsRefusedFirst`); nothing is added after exit 1, 4, 5 or 64, and Both,
  me first gives a local API on the leading Mac only, by its role
  (`appStartLinesOnlyWhereTrue`); the app's Start on a serving pair changes no
  launchd job.

Desktop app:
- `pairModel` (startPlan.ts) is the one place that names the pair's model, or
  "its model"; `pairCopy` is the manual page's copy with the pair's lead, without
  its unused `empty`. Comments wrapped to the file's width; `Snapshot.pair` says
  it is absent from older runtimes.
- Tests: one `pairedMac` fixture for both files; the paired page's summary
  lines and hidden Advanced, and `pairModel`'s fallback, are now pinned.

Checks (Xcode 27.2, prod identity, nice 19, CPU only, sandboxed): the touched
suites and DarkbloomCLITests, 1,194 tests in 171 suites (1,193 at the PR head;
the suites that run the built binary and the two Metal tests skipped, as CI
runs them). A 1,822-line transcript of the snapshot fields, every app Start
line, the away hint and the refusal over many states is byte-identical at the
PR head and here. 15 Swift and 8 app mutants. Desktop app: 674 tests in 101
files, tsc --noEmit and prettier --check. docs-check, docs-impact (base
9f41e9c723), changelog-check and diff --check are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A saved route and key count on the running local API from its next request

Orchestrator's decision for #1902: no restart, and no model reload, for a
routing change.

- The router reads `[local] route` again when the provider config file
  it started with changes (`LocalRouterRouteFile`): each call that needs
  the route compares the file once (one `stat`: device, inode, size,
  modification time) and reads it only when it changed, as
  `setLocalSettings`' atomic replace or an edit change it. Only a
  request this Mac can't take and a model list need the route, so a
  request this Mac serves never looks at the file and nothing is added
  per token (`LocalRouterOverheadTests` unchanged).
- A change is logged ("route is now my-macs-first (provider.toml
  changed)"). A file that doesn't read (a malformed edit, or one that is
  gone) keeps the last good route and is said once until it reads again;
  the line holds nothing from the file, which can hold credentials.
- Every local API gets the file it came from: Only me (`snapshot`), Both
  (`unifiedLocalEndpoint`), the pair's API beside Darkbloom
  (`clusterMemberLocalEndpoint`) and the pair leader's outside Darkbloom
  (`pairLeaderOutsideDarkbloom`, `cluster local`), so a pair's API reads
  the leading Mac's provider.toml. `LocalRouterConfig.host` takes it.
- The key was already read again after `route key`'s change notification.
- Words: `route <choice>` says "✓ Saved. Your local API uses it now." or
  "It applies when your local API starts."; `route key` save and remove
  say the same, and a key removed while the route passes requests on
  says that from the next request one this Mac can't take gets this
  Mac's own answer. In a pair, both say plainly that the leading Mac's
  route and key apply (its local API, to which the other Mac forwards);
  on the other Mac, what it saves applies when it serves alone.
  `RouteSaved` holds these words; no "restart" remains.

Docs: cli-reference (the routes, `route key`), local-first.md,
direct-mode.md (the local router), configuration.md (`[local] route`),
two-mac-cluster.md; the changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(cluster, status): a paired start's first line, Apple's check, and the pair's pause on every Mac, from now (red)

Journey 2a on pair-2 (DevNet `.144`, `validation-evidence/journey-2a.md`, steps 3
and 5) passed #1892, and found five frictions in the pair's words:

- J2-b: a script's `start` on a pair that served said "starting the pair".
- J2-d: in a terminal, a stopped pair's `start` said "starting the pair", then
  waited at the model list: nothing starts before Enter.
- J2-c: every healthy 45-second start said "This Mac isn't verified by Apple
  yet; … Don't restart either Mac until then." for both Macs.
- J2-h: while the pair was paused for its owner, the Mac that follows said
  only "✓ Serving … through Darkbloom".
- J2-i: the pause said "since 21:41", the Mac's own time without a zone, read
  over SSH at 05:41 UTC.

DarkbloomCLITests (compile against today's sources, fail on what they say):
- PairStartFirstLineTests, and the start tests that pinned the old line:
  - a script's start on a pair that serves says "the pair already serves",
    asks nothing of either Mac, on either Mac;
  - one in a terminal says what its screen does: on the leading Mac of a
    stopped pair "Press Enter to start it with Qwen 3.8 27B (last used), or
    choose another model.", with no model "Choose its model to start it.";
    elsewhere "opening the pair's screen";
  - a pair that runs here and still loads starts as before (a guard).
- coordinatorWaitIsLoading: "… is not serving yet: checking both Macs with
  Apple." reads as loading on both Macs, never ✗, and isn't a final reason.
- ClusterPairBothMeFirstCLITests: the Mac that follows shows the pause the
  leading Mac's status carries, under the pair's line, and points there only
  for its address and key; the leading Mac says it once.
- LocalFirstStatusTests: the pause in relative words ("paused for 10 minutes",
  "back in about 1 minute if you stay idle", "1 hour 5 minutes", "back in
  under a minute"), and no clock time in any line. Calls drop `timeZone:`,
  which the words no longer need.

ProviderCoreTests (red by compile: `MeFirstWords`,
`ClusterOnboardingAppleCheck` and `OnboardingLive.pauseLines` don't exist):
- MeFirstWordsTests: the words for one Mac and for a pair, spans in minutes
  and hours, the way back, no speed and no clock time.
- ClusterPairStatusWordsTests: Apple's check is progress ("checking both Macs
  with Apple") until a Mac's part has run 2 minutes without it, or its
  key-generation safeguard holds it back; the Mac that joined says the same;
  the status of the Mac whose part runs the pair's API carries me first, and
  nothing elsewhere or for the other ways to serve.

On 8e7d44a9ab (#1905's head): PairStartFirstLineTests fails 2 of 2 (5
issues); the six start and status tests above 6 of 6 (12 issues);
LocalFirstStatusTests 2 of 9 (7 issues); ClusterPairBothMeFirstCLITests 3 of
13 (6 issues). Each for the reason above: "starting the pair" and
["ensureService", "serve"]; `.notServing` and "✗ Not serving: checking …";
"paused since 06:02 … back at about 06:13" (this Mac's zone); the member's
"whether Darkbloom is paused" and the leader's second Pair line. The
ProviderCore files fail to type-check on the three missing names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools: red tests for the default model's words, the URL and "(your pair)"

Journey 2a (pair-2, `.144`) found three things in a start with
`--opencode` / `--hermes`:
- J2-g: neither of the user's OpenCode files set a default model, so
  Darkbloom's became his default, said only at the end of the `Use it:`
  line; and Hermes' line didn't name the main model it replaced.
- J2-e: "Darkbloom already serves on 0.0.0.0:8001" named the address the
  pair's API listens on, not the URL a tool uses.
- J2-f: the pair's model was "Qwen 3.8 27B (this Mac)".
Tests first; the skeleton adds only the names the tests use, with today's
behaviour: `OpenCodeConfigPlan.GlobalDefault`, `otherGlobalDefault` (the
old yes/no as `.unnamed` / `.none`) and the planner's `defaultElsewhere`;
`ToolConfigSummary.keptDefault` / `replacedDefault` (never set);
`IntegrationModel.Location.yourPair`, `resolve(_:catalog:here:)` (`here`
unused), `IntegrationEndpoint.servesThePair` and `live(pairPart:)` (never
set); `ToolIntegrationStep.alreadyServes` (today's words, now used by the
start).

- ToolSetupWordsTests (a temp home with his two OpenCode files and his
  Hermes config, a faked endpoint and catalog; no tool runs, no port):
  - no global file sets a default: Darkbloom's becomes it, said on its own
    line ("New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. Switch
    back with /models."), the Undo line kept, his opencode.json untouched;
  - a default in either file stays and is named ("Your default stays
    exo/llama-3.3-70b; pick Darkbloom with /models."), and no `model` is
    written;
  - OpenCode 1's config.json sets no default (OpenCode 2 doesn't load it);
  - Hermes names the main model it replaced ("(before: gpt-6-astra via
    opencodex). Switch back: hermes model");
  - "Darkbloom already serves at http://127.0.0.1:8001/v1" for an API on
    0.0.0.0;
  - the pair's API: its models are "(your pair)", the pair's model is
    Hermes' main one, and a run again (online and offline) changes nothing.
- OpenCodeConfigPlanTests: the kept default is named (this file's wins);
  the global files merged as OpenCode 2 merges them, `null` or an
  unreadable file as an unnamed default, config.json ignored.
- HermesConfigPlanTests: the replaced main model with its provider (no
  `custom:`), none for no model, null, or Darkbloom's own; a pair's model
  is the main one.
- IntegrationModelsTests: a pair's own models are "(your pair)", the
  others keep where they run.
- StartToolIntegrationTests: both tools' new lines.

Red (prod identity, CPU-only, sandboxed): ToolSetupWordsTests 6 of 6 fail
(13 issues); the planners and IntegrationModelsTests 8 of 46 (16 issues);
StartToolIntegrationTests 1 of 16 (2 issues). ModelLoadWaitTests and
ToolAddressTests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): every model that reasons takes every reasoning effort a client sends

Red first. Journey 2a (B-J2-1): Hermes sends the owner's reasoning_effort
"max"; Qwen 3.8 27B on pair-2 answered 400 "Invalid inference request."
for "high" and "max", locally and through DevNet, and Hermes fell back to
the user's other, paid provider. Low, medium and xhigh were served.

The tests send none, minimal, low, medium, high, xhigh and max, as
reasoning_effort and as reasoning.effort, through the production prompt
pipeline for every family served here, and ask for the model's own level:
the nearest one, rounding up between two, max the highest, minimal the
lowest, none thinking off where the model can switch it off.

- Qwen 3.8 and the owned Flash-Next build: minimal low, high and max
  xhigh (its template renders low, medium and xhigh); dev refuses high,
  max and minimal. The Qwen 3.5 template family gets the same level.
- DiffusionGemma refuses max, MiMo every effort but none, Flint max,
  Nemotron Super low, minimal, xhigh and max.
- An effort that is none of the seven names is ignored, and rendered, by
  Qwen 3.5, Bonsai, Gemma 4, GPT-OSS and Nemotron Lightning; it should be
  refused. A model that doesn't reason (llama) ignores any effort.
- On one Mac's local API and on a pair leader's (the parity harness, both
  servers), max and high are refused with the untyped 400; an unknown
  effort gets no code, field or accepted names.

Local run on dev 680a2fbae5 (CPU, prod identity): ReasoningEffortValuesTests
8 tests, 39 issues; ReasoningEffortLocalAPITests 2 tests, 72 issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools: say what happened to your default model, name the URL and "(your pair)"

- OpenCode (J2-g): the planner reads the default the global files set,
  merged as OpenCode 2 merges them (`opencode.json`, then
  `opencode.jsonc`, the later winning; OpenCode 2's ConfigDiscovery.names,
  and it doesn't load OpenCode 1's `config.json`). The file Darkbloom
  edits is the last that exists, so its own `model` wins. Any default
  there means no `model` is written, and the summary names it
  (`keptDefault`); `""`, `null`, or a file that can't be read is a default
  that stays without a name. None: Darkbloom's first model becomes the
  default, and the `Changed:` line says so ("and the default model").
- The step says it on its own line instead of the end of `Use it:`:
  "New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. Switch back
  with /models.", or "Your default stays exo/llama-3.3-70b; pick
  Darkbloom with /models." (Darkbloom's own: "…; switch with /models.";
  no name: "Your default model stays as your config sets it; …"). The
  Undo line stays.
- Hermes: Darkbloom stays the main model, and the summary names the one it
  replaced (`replacedDefault`: `default`, or the `model` alias, or a bare
  ID, with its provider without `custom:`; none for no model, null, or
  Darkbloom's own): "New Hermes chats now use Darkbloom's Qwen 3.8 27B
  (before: gpt-6-astra via opencodex). Switch back: hermes model". The
  headline and `Changed:` line follow OpenCode's ("✓ Hermes can use
  Darkbloom: 1 model.", "added the "darkbloom" provider and made it the
  main model").
- J2-e: `alreadyServes` names the URL a tool uses (`LocalEndpoint.Info`'s
  `baseURL`: 127.0.0.1 for 0.0.0.0), not the bind address.
- J2-f: `IntegrationEndpoint.live` marks an endpoint that this Mac's
  running pair part serves (`ClusterPairSummary.runningPartPID()` is the
  `local.json` writer's pid, as `status` decides whose API it is), and
  `IntegrationModels.resolve(here:)` names its own models "(your pair)":
  true for a pair of any size, the same on every run, and read back
  without it (`displayName(in:)`), so offline runs keep the name. Hermes'
  main model is the nearest usable one that isn't on the network, so a
  pair's model qualifies; the refusal says "this Mac, its pair or your
  other Macs".

Green (prod identity, CPU-only, sandboxed): ToolSetupWordsTests 6/6; the
planners and IntegrationModelsTests 46/46; StartToolIntegrationTests,
ModelLoadWaitTests and ToolAddressTests 34/34; DarkbloomCLITests 1224
tests in 174 suites (the usual hardware and slow skips).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: the tools' default-model lines, the URL a start names, "(your pair)"

- local-first.md: "already serves at http://127.0.0.1:8001/v1"; a
  "Your default model" item (OpenCode's stays when any global file sets
  one, merged as OpenCode 2 merges them, config.json not read; else
  Darkbloom's, on its own line; Hermes names the main model before); where
  each model runs, "(your pair)" included; the example block's default
  line and the note after it.
- quickstart.md: the start says which default on a line of its own.
- cli-reference.md: the already-serves line names the URL
  (`alreadyServes`); the result block's default-model lines and the
  models' names.
- direct-mode.md: how the tools name `this-mac`, `my-macs` and
  `darkbloom` models, `(your pair)` on a pair's API.
- architecture/tool-integrations.md: `servesThePair`, the merged global
  default (`otherGlobalDefault`, `GlobalDefault`, `keptDefault`), Hermes'
  main model and `replacedDefault`, the step's lines; code map.
- developer/test.md: ToolSetupWordsTests and the new coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Test that the picker opens on its default; require Autopilot's mode

#1900's review: the tests pinned the rules, not that `start` uses them.
Two mutants passed every suite and would bring J-4 back with CI green.

- The TUI picker ignoring `Start.pickerPreselection` (the old "largest
  that fits"): new `ModelPickerTerminalTests.pickerOpensOnTheDefault`
  drives the raw-mode picker on `pickerDefault`'s 256 GB rows. Enter
  alone confirms qwen (room to spare, not mimo at 90% of its budget),
  the last selection (gemma), and nothing when nothing is downloaded.
  With that mutant it fails twice (built and run here); `runPicker`
  takes `memoryGb:` and `lastUsed:` for it.
- `launchDaemon` passing no mode, so Both, me first asks again:
  `resolveAutopilotChoice`'s `mode:` has no default now, so that can't
  compile. AutopilotCommandTests' 7 calls pass `.network`, which they
  had by default.
- Its comment said `darkbloom autopilot enable` enrolls Only me, which
  is refused: Autopilot is for the Darkbloom network; Both, me first
  keeps the saved answer; Only me has no Autopilot.
- `enterConfirmsPreselection`'s name no longer states the old rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Say plainly that Autopilot is for the Darkbloom network

#1900's review: the docs, the changelog and a comment said
`darkbloom autopilot enable` enrolls Only me. It is refused: on a Mac
saved as Only me, `start --autopilot` stops with `Autopilot requires a
network provider. Nothing was saved.` And `--autopilot` /
`--no-autopilot` don't decide for Only me.

- quickstart.md (step 3), cli-reference.md (darkbloom autopilot),
  model-autopilot.md and changelog.d/simpler-start.md: Autopilot is
  for the Darkbloom network, the only choice `start` asks about it for.
  Both, me first never asks and keeps the saved answer
  (`autopilot enable`, `--autopilot`, `--no-autopilot` change it). Only
  me has no Autopilot, and `autopilot enable` there says that line.
- cli-reference.md (Set up OpenCode or Hermes): no `Start.bannerShowsKey`
  any more. No start screen shows the key (`Start.localServerBanner`);
  the `--local` banner's `Your requests:` line and the tool block come
  from one Keychain read, of whether an account key is saved.
- quickstart.md (your models): the picker's default in full, with
  "else the smallest downloaded one that fits".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): me first re-routes Darkbloom work that hasn't answered

Red tests for "me first by re-routing": while the owner's request waits
for this Mac's engine, each Darkbloom request on that model that has sent
no output ends with the typed drain refusal (capacity, 503, draining),
which the coordinator re-routes to another Mac before anything reaches
its client, and the owner's request runs. A Darkbloom request that has
streamed output keeps running and finishes. Shared mode is unchanged.

- MeFirstGiveWayTests drives two encrypted coordinator requests that run
  (one streaming, one in its prompt) and a third queued behind them, on
  a two-request engine with no tensors, then the owner's request through
  the local engine.
- outputAndGivingWayExcludeEachOther: a request that sent output never
  gives way, and one that gave way sends none.

The token's claim/yield API is a stub here (claimOutput is always true,
yieldToOwner always false), so the re-route tests fail. Run locally
without a GPU, the suite then stops on MLX's missing Metal device when a
network request's terminal reads MLX's allocator; the fix adds a seam.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(provider): cluster local's own /v1/models lists the pair's limits and input

The first of the two items #1897's review left open (review-1897.md, "The two open
nits"): `cluster local`'s own list (DistributedLocalServer.localModelLimits) had no
test, so the review's mutant D7-cluster-local (the list without the pair's input)
survived every suite.

distributedLocalServerListsThePairsLimitsAndInput starts the fabricated pair
(LocalHostTestSession) behind the real application and loopback listener, with
the router `cluster local` builds (pairLeaderOutsideDarkbloom's .host config,
here with an in-memory key store), and reads GET /v1/models: the pair's model is
`this-mac`, with the profile's context (8,320) and output (128), and
input_modalities ["text"] (a pair without a media contract). localHost takes an
optional router.

Mutant D7-cluster-local (`inputModalities: nil` in DistributedLocalServer+HTTP.swift):
the test fails with 1 issue, an entry without input_modalities.

Tests (CPU only, GPU-denied sandbox), all pass: the new test,
DistributedLocalServerTests 11, DistributedLocalServerBatchReplacementTests 15,
ClusterAPIParity 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(desktop): the app's paired Start as the app posts it, through the API's decode and submit (red)

The refactor pass found that the onboarding's Start serving never starts the
pair. On a paired Mac, `startPlan.startAction` sends
`{ action: 'start', models: [], local: false }`, and the desktop API's
`submit` refuses it in `DesktopAction.validate()` ("Choose at least one
model") before anything runs. The app tests mock `backend.act`, and the
provider tests called `arguments(for:)` directly, so neither went through
`submit`.

- appStartAsPosted (provider, DesktopAppOnAPairedMacTests): the app's exact
  JSON through `DesktopHTTP.decodeAction` and `DesktopBackend.submit`, with
  `echo` in place of the CLI:
  - a paired Mac: `start` runs with the pair's arguments (`start --config`, no
    model and no local API of its own), and that start starts the pair (its
    actions ensureService and serve; launchd untouched);
  - a Mac that isn't paired: refused at once, 400 "Choose at least one model",
    and nothing runs (as today);
  - a pair with no model yet: refused at once with the CLI's one line, "No model
    was chosen for the pair yet: run `darkbloom start` in a terminal to choose
    one.", never "starting the pair".
- backend.test.ts (desktop app): the request the main process really posts
  for the onboarding's paired start, without mocking `act`: one POST to
  `/control/v1/actions`, `application/json`, body
  `{"action":"start","models":[],"local":false,"id":"<uuid>"}`, the JSON the
  provider test posts.

On 8e7d44a9ab: appStartAsPosted fails with 3 issues. The paired Mac and the
model-less pair both get "refused (400 Bad Request), nothing ran: Choose at
least one model", and no pair action runs. The unpaired case and the app's
backend test pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin Only me's wiring: where it serves, its job, what runs beside it

#1899's review: 7 of its 11 mutants passed every suite, because no test
reached the lines they changed. Seams, behaviour unchanged, and a test
for each:

- Where a start serves is one rule, `Start.singleMacServing(mode:here:
  foreground:)` (Only me here for `--here` and launchd's child, else its
  background service; the other two choices here only as launchd's
  child), and `run` switches on it. `whereOnlyMeServes` covers each case,
  so a swapped dispatch fails (D1).
- `launchOnlyMeService` installs its job through `installOnlyMeJob`.
  `onlyMeJobAsInstalled` runs it with `LaunchAgent.installLocalAndStart`
  into a temporary home, launchctl answered in the test, and reads the
  plist: a fresh Mac's first port, an updated Mac's 8000, the address,
  `--no-auth` and the models (P1).
- Only me's own server, from its construction until it listens, is
  `Start.startOnlyMeServer`, over `OnlyMeServer` (which `StandaloneServer`
  conforms to; building one needs Metal). `ProviderTermination` and the
  release confirmation are parameters; `confirmRunningRelease` is the
  network path's confirmation too. `whatRunsBesideIt`, with a stand-in
  that records each step: the idle unload always (I1); the confirmation
  and the update loop only in launchd's job of Only me's background
  service, never in `--here` or a cluster's solo part (U1, U2).
- `rewriteKeepsAddressAndNoAuth`: restart's rewrite keeps the job's own
  `--bind` (none in `[local]`) and `--no-auth`, to Both, me first and to
  Only me (B1, N1).
- `StandaloneServer.idleUnloadCheckInterval` names the idle check's
  minute, so the protocol's call and the default agree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cluster, status): a paired start says what it does, Apple's check is progress, both Macs show the pause, from now

Journey 2a on pair-2 (`validation-evidence/journey-2a.md`, steps 3 and 5):

- J2-b: a script's `start` on a pair that already serves keeps it and says so.
  `ClusterPairCommands.servingLook` takes one look at the status `cluster
  status` reads, only while this Mac's own view says the pair runs here and
  the other Mac answers. When it serves: "…: the pair already serves.", the
  result block, exit 0, and nothing is asked of either Mac. Otherwise
  "starting the pair" as before. The look waits as the wait's looks do (never
  cut short), and a start whose other Mac is away doesn't look first.
- J2-d: in a terminal, the line before the pair's screen says what that screen
  does (`ClusterPairSummary.screenLine`). On the leading Mac of a stopped pair:
  "…, which is stopped. Press Enter to start it with Qwen 3.8 27B (last used),
  or choose another mo…
…s admit, and one without it (red)

Red first for 0.10.12's third concurrency step, stacked on #1936 (the
Gemma TP width), whose sizing it reuses. GLM-5.3-Flash tensor parallel
serves a fixed eight lanes on any pair: `tensorParallelLaneAdapters`
names 8 whatever the Macs' memory, its LOAD reserves one request, and
`ClusterConfiguration.validate` refuses a GLM tensor-parallel width.
So the coordinator is told eight on a pair whose memory may hold fewer,
and a pair that holds one request is told eight too.

These checks state the behaviour wanted, with #1936's APIs:

- PlacementSetupCheck.glmTensorParallelPair (CPU runner): GLM's golden
  layout with a lane charge stated as the plan tool will state it (9 GiB
  standing in), through the guided step on the recorded M5 Ultra pair:
  both setups save the widest width both Macs admit now (8 there), each
  lane after the first adding it to every rank's need. The golden layout
  without one still saves none.
- ClusterPlacementTensorWidthTests: a GLM row whose family states a lane
  charge and no allowance saves 8, 6, 4, 2 or none as free memory falls,
  the smaller Mac decides, and the setup screen says that number or one.
- ConfigurationCheck: a GLM TP setup keeps 2, 4, 6 or 8 with serial
  prefill.
- InstalledBatchLanesCheck, DistributedInstalledLanesTests,
  DistributedInstalledCancellationTests: a GLM TP setup serves its saved
  width on its owner, its owner child and the rank, and one request at a
  time without one.

On #1936's head 0092c1f each fails: the layout's lane charge is
refused without an allowance, the width is refused at validation, and
GLM serves eight without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… requests at once as both Macs admit

GLM-5.3-Flash tensor parallel served a fixed eight lanes on any pair: its
LOAD reserved one request and the coordinator was told eight, whatever
the Macs held. It now saves a width at placement, sized by both Macs'
memory and reserved at LOAD, through #1936's mechanism:

- GLM's lane charge (`GLM5NextTensorParallelRequestCharge.laneBytes`):
  an upper bound on what `reserveLane` asks for one more lane beside
  the others at the memory plan's request: the lane's state, its DSA and
  NextN history pages three times (the pages, and the page pool's growth
  copy: old and new slabs coexist while a lane's pages are added) and a
  sliced prompt frame's held arrays. Pages at FP32 rows, as LOAD prices
  them before the pool exists. About 9.7 GB on the registered row.
- `GLM5NextPlacementFamily` states it in the layout
  (`ClusterTensorParallelFamilyPlan.laneBytes`), with the allocator bound
  its NextN head uses.
- Validation accepts a lane charge without a request allowance (1 byte to
  a worker's capacity, and within the allowance's request part where one
  is stated). The planner adds each lane after the first on top of what
  one request is priced at (the allowance, or the layout's state where
  the family states none): Gemma 4's numbers are unchanged, every
  PlacementChecks line byte for byte.
- `savesTensorParallelWidth` includes GLM, so the guided setup tries 8, 6,
  4 and 2 and saves the widest both Macs admit now (capped at 8 until the
  M5 Ultra pair qualifies it), and `ClusterConfiguration.validate`
  accepts it.
- LOAD reserves `reservedBytes(contextTokens:lanes:)`: one request's
  charge and a lane charge for each lane after the first, the figure the
  plan priced; the load line reports it (`reserved=`).
- Without a saved width GLM serves one request at a time, as every other
  tensor-parallel family (`tensorParallelBatchLanes` is gone). After the
  Darkbloom update the control leader plans each pair again by itself
  (`ClusterOnboardingUpdate`), which saves its width.

On the recorded M5 Ultra 256 GB pair one request needs 154.7 GB a rank
and eight lanes 222.6 GB of 234.4 GB admissible now, so it keeps eight;
the D6 window's load line (shard, NextN, vision, one request, buffer
cache) sums to 154.4 GB, within the plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bs with its request alone, bit for bit (red)

Red first for 0.10.12's qualification tooling (window C1). pair-check's
batch phase runs each request alone, then the waves, and fails a
tensor-parallel run whose lane tokens differ from the request alone. It
never asks for logprobs, so a lane whose arithmetic drifted without
changing a token passes: C1 could compare tokens only.

The fake worker the driver's checks launch now serves batch lanes
(`DARKBLOOM_CLUSTER_BATCH_LANES`, `ClusterWorkerLaneSession`, a cancelled
lane retiring alone), describes tensor parallel, and sends each committed
token's logprob and alternatives when a request asks for them, the same
for a request alone and in a wave; `logprobDriftFromReservation` makes
them one ulp lower from a given reservation on, with the tokens
unchanged. No check drove a wave end to end before.

The checks (`PairDriverTests`, run by QualificationChecks/run.sh):

- a tensor-parallel wave without the option records no logprobs and
  compares its tokens as before;
- with `batchLogprobs`, every batch request alone and in its wave asks
  for them, the report keeps each token's bit patterns and digest, and a
  wave's match the requests' alone;
- a wave whose logprobs drift one ulp, its tokens equal, fails the run;
- a cancelled lane matches as far as it got;
- the option is 1...20, tensor parallel and batch requests only; a
  greedy request asks with greedy sampling, a sampled one keeps its own.

On dev 0f11fbe the check bundle does not compile: `batchLogprobs`,
`batchSampling` and the report's logprob fields do not exist. The fake
worker compiles with warnings as errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e's logprobs with its request alone

For window C1 on the M5 Ultra pair, which qualifies 0.10.12's lane
widths: pair-check compared a wave's tokens with each request alone and
nothing else, so a lane whose arithmetic drifted without changing a token
passed. With `--batch-logprobs K` (1...20, tensor parallel with batch
requests):

- every batch request, alone and in its waves, asks for each committed
  token's logprob and its K alternatives (`PairConfiguration.batchSampling`:
  a greedy request with greedy sampling that asks for them alone, a
  sampled one with its own sampling); tensor-parallel workers send them on
  the committed-token channel, and a pipeline worker refuses such a
  request, so the option is refused outside tensor parallel;
- the collector keeps them, and the report each request's IEEE-754 bit
  patterns (`logprobBits`: exact, -infinity included) and their
  `logprobsSHA256`;
- each wave's are compared with the requests' alone bit for bit
  (`PairDriver.compareLogprobs`: `logprobsMatchSolo`,
  `firstLogprobDifferenceIndex`, `allLogprobsMatchSolo`); a cancelled or
  deadline-ended lane as far as it got;
- a tensor-parallel run fails when a lane's logprobs differ, after the
  token check, and the wave's log line says which held.

A request that captures logprobs decodes one token per step, as in the
product, so C1 runs each wave once without the option (rounds, tokens)
and once with it. The CLI documents the batch options; the CLI
reference, test and architecture docs describe the parity check.

QualificationChecks/run.sh (not run by CI): 85 tests pass, the 5 new ones
through two fake workers serving lanes. PairCheck.swift typechecks with
warnings as errors against this build's modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st in the width tests too

`ClusterPlacementTensorWidthTests.otherFamiliesAndUnsizedSetupsKeepTheirLanes`
still pinned GLM tensor parallel's old fixed eight
(Provider Unit Tests, shard 1, on 6067d00: the run's one issue). A GLM
setup saved without a width now serves one request at a time, as a Qwen
TP one does; its saved width is pinned by the GLM width test beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y, not always one token per step

The change's words said such a request decodes one token per step,
without speculative rounds. That holds for Qwen tensor parallel, which
drops its assistant as the product does
(`ClusterWorkerSampling.admitsSpeculativeVerification`), but GLM tensor
parallel keeps its rounds and checks their proposals by replaying the
draws (`GLM5NextTensorParallelResidentRuntime`: the `replayed` rule), and
reads each token's logprobs from the round's window. So the option's doc,
the usage text, the CLI reference and the architecture doc now say a
request that asks may decode differently, and C1 still runs each wave
without the option too. No behaviour changes.

QualificationChecks/run.sh: 85 tests pass; PairCheck.swift typechecks
with warnings as errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ow-up restores

Refactor pass of #1671 (behavior-preserving):
- SSDPrefixCachePolicy.terminalBeforePublication repeated strictFsync's body
  word for word. Both now read their flag through one private isOptedIn (1,
  true, yes or on; any case; surrounding spaces or tabs), so the two can't
  drift.
- A new test pins those words for both flags, as ephemeralAllowedWords does
  for the ephemeral opt-in: "on\n", "enabled", "2" and an unset flag stay off.
  Nothing tested the new flag's parsing before.
- The changelog fragment and ssd-kv-cache.md said a follow-up that arrives
  before the donor's write settles "prefills in full". It can't use that
  checkpoint yet, but it restores an earlier one when there is one and
  prefills the rest, as the PR's own measurements show (requests 4, 5 and 10
  restored the previous checkpoint). The words now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ought (red)

Port of jonathan308/d-inference-pr-staging#17's regression tests onto dev.
With tool_choice none on a pinned Gemma 4 prompt contract, the sampler masks
every token GemmaNoToolTokenConstraint doesn't allow. Its vocabulary leaves
out every special token but the tool markers, so <|channel> and <channel|>,
Gemma 4's reasoning delimiters, are never allowed: a request with reasoning
on can't open its thought, and the reproduced case repeated until its output
cap.

- reasoningChannelsRemainAvailableButToolAndRoleMarkersDoNot fails on dev:
  the two delimiters are not allowed at the neutral state, and nextState
  refuses them.
- partialForbiddenMarkersCannotBeSplicedAcrossChannelBoundaries passes on
  dev and must keep passing: a delimiter in the middle of a partial
  <|tool_call marker is refused.
- actualPinnedTokenizerKeepsNativeReasoningDelimiters runs only where the
  pinned Gemma QAT tokenizer is on disk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ters

Port of jonathan308/d-inference-pr-staging#17 onto dev, for 0.10.12.

GemmaTokenVocabulary decodes every special token but the tool markers to no
piece, so GemmaNoToolTokenConstraint, which samples tool_choice none on a
pinned Gemma 4 prompt contract, never allowed <|channel> or <channel|>. With
reasoning on (every effort but none since 0.10.11), Gemma couldn't open its
thought; the reproduced request repeated until its output cap.

- GemmaTokenVocabulary records the two delimiter IDs in a set of their own,
  noToolReasoningDelimiterTokenIDs. They stay out of `pieces`, so the
  required and named tool grammars, which read pieces, can't admit them.
- GemmaNoToolTokenConstraint allows them at its neutral state only, where no
  forbidden marker is partial, and a delimiter keeps that state. Inside a
  partial <|tool_call or <start_function_call it refuses them, so a marker
  can't be spliced across a boundary the reasoning parser hides.
- inference.md says so; changelog.d/gemma-no-tool-reasoning.md.

Tests: GemmaNoToolReasoningRegressionTests (previous commit) fails on dev at
the delimiters' admission and passes here; the splice test passes on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of jonathan308/d-inference-pr-staging#51's regression check onto dev.
Fan control is opt-in (sudo darkbloom fan enable), and only `darkbloom fan
status` says it is off. An M5 Ultra operator served with the GPU at 67-74 C
under macOS automatic fans and got fewer requests, without anything in the
normal flow saying fan control was never enabled.

StatusCommandRunTests now expects a "Fan control (experimental): " line in
the sandboxed `darkbloom status`. It fails on dev: there is no such line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of jonathan308/d-inference-pr-staging#51 onto dev, for 0.10.12.

- Fan.Status.report() builds the report `darkbloom fan status` prints (a
  pure extraction of its run body), and Status prints one line from it,
  after the local boot checks (Status.fanControlLine,
  StatusCommand+FanControl.swift):
  - the helper's mode when it answers;
  - "helper not answering" when it is loaded but silent;
  - "installed, helper not running; macOS automatic" after `fan disable`,
    with no advice to enable, which would reset a configured policy;
  - "unavailable (<SMC error>)" or "unsupported on this Mac";
  - otherwise "off, macOS automatic; GPU <hottest> C. Enable: sudo
    darkbloom fan enable". The command name follows the build (cliName).
- cli-reference.md and fan-control.md say so; the cost is listed: `status`
  now runs `launchctl print` on the helper's job (5 s timeout) and a
  read-only SMC read, plus the helper's 2 s status query when it is loaded.

Tests: StatusCommandRunTests (previous commit) fails on dev and passes here;
FanStatusOutputTests gains the line's six states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 19 commits November 10, 2026 21:25
… precision (red)

A cache hit on Super's complete SSD checkpoints should return exactly what a
cold prefill returns. Today Super's checkpoint precision resolves to the
provider-wide default, balanced, which codes older attention rows to 4 bits:
on the production weights a restore from 8,192 tokens moved reasoning answers
off the cold ones (3 of 3), while native checkpoints matched the chunked cold
prefill bit for bit (64 of 64 steps).

The resolution moves into NemotronSuperLocalPrefixCache.checkpointPrecision,
unchanged, so a CPU test can name it. The test fails: it resolves balanced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Super's per-model checkpoint precision now defaults to native, so a restore
from its complete SSD checkpoints continues a cold prefill bit for bit. On the
production weights (aggregate 56a1f05e) native restores from 8,192 tokens
matched the cold run in 64 of 64 logprob steps and 20 of 20 forced pairs,
while balanced ones (4-bit older attention rows) moved 3 of 3 reasoning
answers. The conv/SSM state was already exact.

The operator's per-model entry for Super and DARKBLOOM_CBV2_CHECKPOINT_QUANTIZATION
still win; the global setting, which a saved provider.toml spells out as
balanced, no longer applies to Super. Only Super's resolution changes: the
SDK's shared policy and every other model are untouched.

Cost: an 8,192-token checkpoint is about 249 MB instead of 204 MB. The SSD
tier has no per-model cap; the box-wide budget (free/2), the 4 TB/day write
cap and the per-file stage cap (7 GiB on >= 48 GiB Macs) are unchanged, and
a full 262,144-token native checkpoint (~2.6 GB) stays under the stage cap.

The gated checkpoint-profile live test gains a default arm (switch unset),
which expects the native layout, and fails when a native restore differs
from cold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ents only)

The precision helper's comment leads with the default and its reason; the
live profile test's header is rewrapped. No code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve by default

CI found the managed-slot test that pinned the old default: the coordinator
path's store took the balanced layout. With the global default `balanced`, the
slot now builds the native layout and reports native checkpoint precision,
end to end through ProviderLoop's managed load. The per-model test now sets
Super's entry to `balanced`, so it still shows the operator's setting reaching
the store (the coded layout beside the assistant's exact history).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d stay validated (red)

Red tests for GPT-OSS's tool_noncompliance on OpenRouter agent turns.
They fail on this commit, which only declares the API they use:

- `tool_choice: auto` without `strict`: an undeclared function, arguments
  off the schema and streamed argument text that does not parse are
  returned as generated (OpenAI/vLLM semantics) instead of failing the
  stream after its reasoning (GPT-OSS harmony through the service, the
  router, the validator and Super's local output).
- `strict: true`: a property that declares no type accepts any value;
  the `type: "string"` the ingress normalizer fills in is not enforced.
- Every remaining refusal names its check (`tool_check` on the
  inference_error frame and the local failure log line).

Guards that pass here and must keep passing: strict and forced choices
stay validated, a request without tools never receives a call,
parallel_tool_calls false holds, a call cut off by max_tokens ends
quietly, a turn without tools is unchanged.

Scaffold only (no behavior): ToolNoncomplianceCheck, InferenceFailure.toolCheck,
Prepared.declaredTools, ChatTemplateControls.declaredTools and a
classifier that returns nil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… caller's schema; refusals name their check

GPT-OSS fails about a third of OpenRouter's agent tool turns (4-16k
prompts) with a 422 tool_noncompliance raised after its reasoning has
streamed, so the client sees a 200 and then an error and the coordinator
cannot fail over. GPT-OSS only receives tool_choice auto.

- `tool_choice: auto` without `strict` returns the model's calls the way
  OpenAI and vLLM do (`Prepared.returnsAutoCallsAsGenerated`): an
  undeclared function and arguments off the schema pass
  `ToolConstraintValidation.validate`; a streamed call whose arguments do
  not parse keeps the raw text it already sent and is closed, so the
  response finishes with tool_calls (`NativeToolStreamRouter`). Any
  function declared `strict: true`, a request without tools, required,
  named and none choices and parallel_tool_calls false keep today's
  validation. One rule in the validator covers every family and path
  (GPT-OSS, Gemma, Qwen, Super, MiMo, GLM, Flint, Bonsai; native and MLX).
- Strict auto checks each call against the declarations as the caller sent
  them (`Prepared.declaredTools`, from the body before ingress
  normalization), so the `type: "string"` filled into a typeless property
  for the templates is no longer enforced.
- A tool_noncompliance failure carries `tool_check` (undeclared_name,
  schema, malformed, diverged, unterminated, parallel, response_format,
  forced_choice, native_output, other) on the inference_error frame and
  the local failure log line. Today's coordinator ignores the key; storing
  it is a coordinator follow-up.

Docs: inference.md (streamed auto tool calls), protocol-messages.md
(inference_error.tool_check); changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reference, the reference rows, the changelog

Text only (review-2002).
- ssd-kv-cache.md (must-fix): the managed Super slot writes
  native-paged-full-recurrent-v1 by default. The global setting does not
  apply; Super's own per-model entry or the switch selects a profile, whose
  affine layouts the paragraph keeps. Native files can be deltas on the
  target-only owner; the speculating owner's MTP history keeps complete files.
- Super in the reference rows: a provider.toml row for Super's per-model entry
  (cli-reference.md), a row in configuration.md's managed Super slot table,
  and a sentence in kv-cache-quantization.md's introduction. The rows that
  candidate (c) rewrote for Lightning are left alone, so the fold stays clean.
- Changelog: what was measured (3 of 3 ~8,600-token reasoning prompts restored
  from 8,192 = uncached, bit for bit, on an M5 Ultra; balanced changed all 3),
  the sizes at 8,192 and 30,720 tokens, and that an explicit global k4v4,
  k8v4 or k8v8 does not apply to Super either.

The pages' "Last updated" stamps are unchanged: candidate (c) restamps all
four on the same line, so a restamp here would conflict at the fold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion texts once; the new tests compile

- A call parsed from a frame that max_tokens cut off may be missing
  arguments, so it stays held to the declarations without `strict` too
  (`ToolConstraintValidation.validate(_:prepared:truncated:)`): the
  complete-call terminal passes `stopReason == "length"`, the streamed
  router the end-of-generation flag. Today such a call failed when off
  schema; it still does.
- The violation texts the validator and the streamed router throw, and
  `ToolNoncomplianceCheck(violation:)` reads, are one set of constants.
- Test fixes from the first local build: the red commit's two test files
  did not compile (a redeclared local; an argument order that could not
  bind). New test: a cut-off call is still validated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure is valid JSON

- GemmaToolConstraintTests exercises the `auto` JSON-Schema validator
  (tuples, bounds, multipleOf, patterns, Unicode identity, normalized
  boolean schemas…). Without `strict`, `auto` now returns calls as
  generated, so its automatic requests declare their tools `strict`; the
  assertions are unchanged.
- The GPT-OSS service fixture's `strict` placeholder produced invalid JSON.

Local run of the focused suites before this commit: 37 Gemma validator
tests and the 10 GPT-OSS service cases failed for these two reasons only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(0.10.12 candidate c; head 76c052d; window 11)

Plus the two (c)-only reference rows the PR could not touch without conflicts
(review-2002 §6.4): configuration.md's DARKBLOOM_CBV2_CHECKPOINT_QUANTIZATION default and
cli-reference's global engine_v2_kv_checkpoint_quantization row now name the Super slot.
… router's call list says what it holds

- CI shard 1 (run 42998445966) failed only at gptOSSAutoCallsReturnAsGenerated's
  usage expectation: its request does not set stream_options.include_usage,
  so no usage frame is sent. Every other expectation (name, raw arguments,
  finish_reason tool_calls, no error) passed for all 7 cases.
- Refactor pass: `completedToolCalls` documents that it holds the calls
  whose frame parsed and that validation accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… text

Re-pin libs/mlx-swift-lm 505e6bd87c -> ad8a5860e5 (Layr-Labs/mlx-swift-lm#402, merged into main;
independently reviewed): the SDK's first-token projection refuses text (multimodal_work) only
while a row with bidirectional media blocks still has prompt work, not for the
image row's whole life. Only Gemma 4 media has such blocks; every other
model's media is causal and was never refused this way.

The SDK diff is one projection condition plus a doc comment and tests; no
API change, so the provider builds unchanged.

Docs: the multimodal_work row in docs/reference/prediction-decision-telemetry.md.
Changelog: changelog.d/gemma-image-decode-admits-text.md (changelog.py check: 111).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2f62d5eed5ecfead08296243bc0c463a447604e6)
CI run 43001137125 on 18eac52: provider build and shard 1 green;
shard 2 failed only "auto admits finite decimal enums and enforces them
post-generation" and "typeless finite schemas keep original semantics
through normalization" (3 issues), whose request bodies declare their
tool without `strict` and expect the auto validator to refuse. They now
declare `strict`, as does the allow-all case beside them; assertions are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…10.12 candidate c; head 7bd7318; window 13)

With the review's two must-fixes (review-2003 §11): #1944's nullable-argument tests declare
"strict": true (an automatic call is otherwise returned as generated), and the changelog
bullet and inference.md sentence on typeless properties are limited to --local and GLM
(the coordinator writes type: "string" for every other model).
Syncs master into dev with the release: #1859's tree is a dev snapshot dev already holds;
#1938's diff (version 0.10.11, the CHANGELOG render, the 66 rendered fragments removed,
provider-release.md) applies unchanged. dev keeps its plain-build default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version 0.10.12; the 47 changelog.d fragments rendered into CHANGELOG.md
(scripts/changelog.py render --version 0.10.12 --date 2026-11-11, verbatim, in
filename order) under the candidate heading, with the upgrade and rollout
notes; v0.10.11 marked published (2026-11-09); the 0.10.12 section of
docs/operations/provider-release.md. Base: master dc934f9 (the 0.10.12 release branch's squash).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (SDK #403)

Pin libs/mlx-swift-lm to Layr-Labs/mlx-swift-lm#403's head fdb3c06dd4
(ad8a5860 + 2 commits): the paged KV allocator places each request
layer's pages in 16-page runs in few segments instead of reusing the
holes a retired request left across many segments. The segmented decode
binds at most 17 segments per pass, so a scattered pool needed about one
pass per 256-token partition per layer; production's paged models
decoded at 0.3-0.7x their fresh speed minutes into a busy run.

CPU model (the SDK's own allocator and planner sources): part dispatches
per decode step after the first retirement, Qwen 3.6 GPQA c=4 930 -> 10,
9B production c=3 427 -> 8. Outputs are unchanged (each attention
partition is computed as before). Changelog fragment and the paged
placement paragraph in docs/architecture/inference.md.

For provider 0.10.13. Stacked on #1970 (0.10.12 into dev). Re-pin to the
SDK merge commit once #403 merges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 11, 2026 8:27pm UTC
darkbloom-status Ready Ready Preview Nov 11, 2026 8:27pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 11, 2026 8:27pm UTC

Request Review

…ommit)

f3862379 adds a Metal test of page placement through PagedSequenceKV and
splits a helper in PagedKVFreePages; placement is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

3 active deployments
Preview – eigen-homepages-darkbloom — 8f36ebcc Deployed Nov 11, 2026 by vercel[bot]
Preview – d-inference-landing — 8f36ebcc Deployed Nov 11, 2026 by vercel[bot]
Preview – darkbloom-status — 8f36ebcc Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant