Skip to content

DevNet round 6b for provider 0.10.9: engine concurrency, Gemma replan, honest waits, role label, folded steps - #1802

Merged
jonathan308 merged 16 commits into
devfrom
integrate/devnet-round-6b
Nov 5, 2026
Merged

jonathan308 merged 16 commits into
devfrom
integrate/devnet-round-6b

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

DevNet round 6b for provider 0.10.9 (DevNet build B): the last fixes from tonight's tests on real hardware.

  • A pair's streams stalled while it admitted another request.
    • Before: on GLM-5.3-Flash in tensor parallel, every running stream waited while a new request was admitted.
      Darkbloom could also send one request more than the pair had room for.
    • Now: reservations run off the engine's queue, so the lanes keep streaming. A request holds its lane from
      acceptance, and the heartbeat counts it. A cancel takes effect at once.
  • A Gemma pair reloaded every half minute.
    • Before: a Gemma 4 tensor-parallel pair kept trying to switch to an 8-lane pipeline that can't return logprobs,
      stopping and reloading every 30–40 s.
    • Now: a replan that would lose an endpoint feature is refused before anything drains. A width that failed is held
      back for 2 min, then 4, up to 30, and a changed setup is tried at once.
    • Documented: Gemma TP serves one request at a time, and a cancel during the prompt keeps that lane until the
      prompt is read.
  • The 15-minute ✗ blamed Apple on two verified Macs.
    • Now: the wait says what the Macs report now, or "The coordinator didn't pair both Macs within 15 minutes".
    • q or Esc leaves the wait (the pair keeps trying), and a cluster stop from anywhere ends it on both Macs.
    • The joining Mac follows a model or mode change instead of "This Mac runs its part by itself".
  • "Which Mac is which?" Each paired Mac's screen is titled "Darkbloom cluster · Leading Mac" or
    "… · Joining Mac".
  • "A million lines in the CLI".
    • Now: in a color terminal, each finished step folds to one line ("✓ 2/4 Pair (1 min 12 s)"), keeping the questions
      with their answers, any ✗ and the outcome.
    • Each run's whole flow goes to ~/.darkbloom/cluster-setup/screens/.
    • Plain output is unchanged.

Linked issue

Closes # (DevNet round 6b; R5-8)

Test plan

Run at 2df2577176. Details are in overnight/round6b/integration-validation.md.

  • DARKBLOOM_RELEASE_ENVIRONMENT=prod swift build --build-tests: build complete
  • Onboarding checks 1778/0 · control 682/0 · link 2538 · provider placement 268 · installed session passed
  • GLMImageAdmissionChecks (40), cluster PlacementChecks (1625), and every other focused runner in
    scripts/cluster-test-plan.py: passed
  • Filtered swift test, sandboxed, prod (engine core, lanes, HTTP, media, GLM parity, wedge, batch replan,
    onboarding, role and fold, round 6's cluster suites): 725 + 40 passed
  • Dev identity: build passes, and the new suites pass. The only failures are the known ClusterPairCommandsTests
    (prod-name literals) and ClusterObservabilityTests (fails on the base in dev)
  • Release Integrity, all 44 commands: 43 pass. The failure is test-threat-diagnostics.py on Python 3.14, which
    fails only locally
  • make docs-check, make changelog-check, make docs-impact-check BASE=origin/dev, git diff --check
  • On hardware: GLM TP streaming under concurrent traffic; Gemma TP pair-2 with no reload cycle; the role title and
    fold on both Macs

Components touched

  • provider-swift (Swift CLI)
  • native runtime / MLX
  • landing (Next.js)
  • enclave (Swift)
  • CI / provider release
  • docs

Protocol / interface changes

  • No protocol/interface changes. Nothing changes on the wire between the Macs or to the coordinator.
    • The heartbeat's capacity counts admitted-but-not-started requests, but its fields are unchanged.
    • New local file: the screen log, ~/.darkbloom/cluster-setup/screens/screen-<UTC>Z-<pid>.log (owner-only, the 20
      newest kept).
    • New observability lines: cluster.batch_replan refused … reason=endpoint_features and
      cluster.batch_replan failed lanes=N.
  • Yes — described above and matching side updated

Documentation impact

  • Canonical documentation updated: docs/architecture/inference.md (lanes during admission, the replan rule and
    backoff, the Gemma TP one-lane limit), docs/provider/two-mac-cluster.md (the wait, leaving it, a stop, the
    role title, the fold and the screen log)
  • No documentation needed — reason:

Changelog

  • Fragments:

    • cluster-pair-lanes-during-admission
    • cluster-pair-batch-replan-backoff
    • cluster-wait-honest-and-leavable
    • cluster-role-in-title
    • cluster-steps-fold

    make changelog-check passes.

  • No user-visible change, or an explicitly authorized release/history change.

Notes for reviewers

Branch @ tip What it does
fix/glm-tp-concurrency @ 65fe0308b6 (reviewed GO, review-glm-tp-concurrency.md) Reservations off the engine queue; a lane held from acceptance; heartbeat counts it
fix/cluster-wait-honest-and-leavable @ 47a6a5f162 Honest 15-minute ✗; q or Esc leaves; a stop ends the wait; the joining Mac follows a model change
fix/cluster-one-screen-and-role @ 20bc2c4f3c "Leading Mac" / "Joining Mac" title (2d702ae1d9); finished steps fold, and the whole flow goes to a log (20bc2c4f3c)
fix/pair-batch-replan @ a0d863aa66 (on 65fe0308b6) Replan refused when it would lose features; failed widths held back; Gemma TP one-lane docs

Resolutions, all kept both sides:

  1. PlacementChecks/Main.swift: both check calls.
  2. ClusterOnboardingLive.pairServing: the wait-fix author's own preview resolution (4eb7345d2a); round 6's held
    reasons are its holds.
  3. ClusterOnboardingTerminal.pick: Each mode's line fits the window as it is now, and redraws on resize (0.10.9) #1797's multi-row chosen option is recorded row by row for the fold. The
    question above chooseFitting (the mode question) is now kept on fold, as it is for choose.

Open question for the owner: cancelling a one-lane pair's request during the prompt (pair-batch-replan.md, options
(a) price a Gemma TP batch width, or (b) end the pair).

Before And After

flowchart LR
  subgraph Before["Before (DevNet round 6)"]
    A1[GLM TP pair admits a request] --> A2[All streams pause; capacity over-reported]
    B1[Gemma TP pair with a queue] --> B2[Replan to 8-lane pipeline, rollback, reload every 30-40 s]
    C1[Coordinator never pairs] --> C2[15-min ✗ blames Apple; q does nothing; joining Mac misses a model change]
    D1[Long setup] --> D2[Hundreds of lines; no role shown]
  end
  subgraph After["After (0.10.9)"]
    E1[GLM TP pair admits a request] --> E2[Lanes keep streaming; admitted requests counted]
    F1[Gemma TP pair with a queue] --> F2[Replan refused before drain; failed widths held back 2-30 min]
    G1[Coordinator never pairs] --> G2[Honest ✗; q/Esc leaves; stop ends both waits; joining Mac follows]
    H1[Long setup] --> H2[Leading/Joining Mac title; steps fold; full log on disk]
  end
Loading
sequenceDiagram
  participant R as Request
  participant E as Pair engine (leader)
  participant P as Batch planner/factory
  participant C as Coordinator
  R->>E: accepted: holds a lane at once
  E->>C: heartbeat counts it (no over-send)
  E-->>E: reservation off the engine queue: other lanes keep streaming
  P->>P: queue builds: propose wider plan
  alt proposal loses an endpoint feature (Gemma TP to pipeline: logprobs)
    P-->>P: refused before any drain (reason=endpoint_features)
  else proposal swapped in but fails to start
    P-->>P: restorePrevious; hold this setup and width 2 to 30 min
  end
Loading

Refactor Pass

  • glm-tp: its own refactor commit 65fe0308b6 ("publish a pair's capacity once its admission is settled"),
    reviewed in review-glm-tp-concurrency.md.
  • The integration pass, for the commits that never had one: the wait fixes (2), the replan (3), the role label
    (1) and the fold (1).
    • I read the full source diffs.
    • Each rule lives in one place: ClusterOnboardingPairWait, ClusterOnboardingStopped,
      DistributedAutomaticBatchFailures, DistributedAutomaticBatchPlanner.keepsEndpointFeatures,
      ClusterOnboardingDriver.title(_:), and the fold's record.
    • No behaviour-preserving change was worth a commit, so I made none.
    • No blocker was found, so there is no fix commit.
  • Final focused validation at 2df2577176:
    • runners: onboarding 1778/0, control 682/0, link 2538, placement 268 + 1625;
    • Swift suites: prod 725 + 40 passed, dev's new suites passed;
    • Release Integrity 43 of 44 (the one failure is local only); docs and changelog checks clean.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

jonathan308 and others added 16 commits November 4, 2026 16:41
…enly

The M5 Ultra pair's mode question offered GLM-5.3-Flash's pipeline as
"this Mac 1 layer / the other Mac 44 layers". On the recorded M5 Ultra,
both Macs sampled idle, the forced pipeline is cut 24 (24 / 21 layers),
both ranks loading now and admitting 65,536 tokens: a split that
degenerate comes from a Mac whose sample admitted about 10 GB, not from
the planner's arithmetic. This check pins the even split on idle Macs.

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

A pair's reservation holds the engine queue until both ranks answer at
their next step boundary. Every running lane's token is answered on that
queue, and rank 0 waits a bounded time each step for those answers, so
a reservation stalls every lane. And a request reserving, or waiting to,
is counted nowhere: the heartbeat advertises its lane as free, the
coordinator sends one more, and the engine refuses it for capacity.

Four checks, red on this base:
- a running lane's token waits for another request's reservation;
- a capacity read counts neither the request reserving nor the one
  queued behind it (`waitingRequests` 0);
- a request beyond the lanes waits for that reservation before it is
  refused;
- the heartbeat's `num_waiting` is 0 while a request is being reserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t is being admitted

A GLM-5.3-Flash tensor-parallel pair on branch.81 decoded at 7.5 tok/s
(min 2.7) under DevNet's soak and refused 6 dispatched requests for
capacity. Two causes in DistributedCBv2Engine, both on the pair's one
serial queue:

- A reservation ran on the engine queue and held it until both ranks
  answered at their next step boundary. Every running lane's token is
  answered on that queue, and rank 0 waits a bounded time each step for
  those answers, so a reservation stalled every lane and the step that
  answers it. Since R4-9 the bridge awaits admissions, so several queue
  back to back. Reservations now wait on `admissionQueue`, one after
  another; the engine queue only checks, holds a lane and completes the
  admission.
- A request waiting for its reservation, or in it, was counted nowhere:
  the published capacity said its lane was free, the coordinator sent
  one more, and the lane check refused it. A submission now holds a lane
  from acceptance (`holdLane`, `admitting`): the lane check counts it and
  `capacity()` reports it as `waitingRequests` (heartbeat `num_waiting`).

A cancel of another request now lands at once; a cancel of a request in
its reservation, or waiting for it, stops it once admitted; a shutdown
waits for a reservation in flight and stops its request.

The R4-9 check that pinned a cancel waiting for another request's
reservation now pins it landing at once.

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

`releaseLane` published the capacity on its own, so `complete` published a
snapshot with the admitted request's lane free and not yet in `actives`, and
published again a moment later. The caller now publishes once: `complete` on
return (as it already did), the refused reservation after its release. The
same queue turn, so the lane check and every count are unchanged. Also the
bridge's comment on `submitAwaitingQueue` no longer says a reservation holds
the pair's queue.

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

The owner, 2026-11-05: "at the top of the Dark Bloom logo, if it's darkbloom
cluster, put lead and or member … So the user always knows which machine is
the leader, and which is the member."

- A paired Mac's opening (darkbloom cluster, and the screen start, stop,
  restart and update open in a terminal) is titled "Darkbloom cluster ·
  Leading Mac" or "Darkbloom cluster · Joining Mac" (ClusterOnboardingDriver
  .title(_:)), the screens' own words for the two Macs. Beside the mark it is
  the second row; without room for the mark, the heading line; in plain
  output, the first line, once. It is read from the saved role at each run, so
  a lead that moved is named as it is now.
- A first setup, before the two Macs pair, keeps "Darkbloom cluster" alone; the
  pairing's own line then says which Mac leads.
- Rendering only: no screen's text below the title changes.

Onboarding checks: 1589 passed, 0 failed (the new role checks, both Macs at 80
and 40 columns and plain, failed 12 on the base; one older check updated to
the new title). Filtered swift test (ClusterOnboarding|ClusterPairCommands|
DarkbloomCommandLook), sandboxed: prod 28 + 105 tests passed. Dev: 28 passed;
ClusterPairCommands has 72 issues in dev identity, the same 72 on the base
without this change (its expectations name `darkbloom`, the dev build says
`darkbloom-dev`). docs-check and changelog-check OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…can be left, ends on a stop; the joining Mac follows a model change

DevNet pair-2 (branch.81/82, 2026-11-05):
- The 15-minute ✗ blamed Apple verification on two authorized Macs (the
  coordinator refused serves_model): pairServing kept the first reason it ever
  saw. ClusterOnboardingPairWait decides look by look; at the bound with nothing
  reported it says the coordinator didn't pair both Macs within 15 minutes (its
  own reason when known, e.g. #1799's catalog refusal). A trust word on Macs
  that report their authorization is the coordinator's, never Apple's.
- q/Esc did nothing in the coordinator's wait: awaitPairServing now leaves on
  them, saying the pair keeps trying and to check with `darkbloom status`.
  A `cluster stop` from anywhere ends the leader's wait at once (its saved start
  is off) and the joining Mac's once the leader's status stays Stopped 20 s:
  'Stopped (by `darkbloom cluster stop` on one of the Macs) …'.
- R5-8: `darkbloom cluster` on the joining Mac follows a start the leading Mac
  publishes (a model or mode change, a Retry) instead of 'This Mac runs its
  part by itself … Close'.

Onboarding checks (WaitHonestChecks.swift) failed first: 8 behaviour failures
against 88740bd's flow, the pure checks by compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ining Mac following a model change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le flow goes to a log

The owner, 2026-11-05: "Is there any way to also capture all of the flow in
one space, instead of the next line keeps dragging down … instead of keep
dropping down a million lines in the CLI."

In a color terminal at least 40 columns wide (ClusterOnboardingTerminal only):
- When the next step's heading comes, the step that finished folds to one line,
  "✓ 2/4 Pair (1 min 12 s)", above the lines that stay: the question before
  each choice with the answer taken (the pairing code among them) and any
  outcome block. The last step and the outcome stay whole.
- It folds only when all of the step is still in the window (its rows, counted
  at the window's width now, under the window's height now): rows that
  scrolled off can't be redrawn, so a taller step is left as it is. A step that
  showed a ✗, or during which another command wrote to the terminal (sudo,
  darkbloom login, through `suspended`), never folds.
- Each run's whole flow, plain and line by line, goes to
  ~/.darkbloom/cluster-setup/screens/screen-<UTC time>Z-<pid>.log (owner-only,
  the 20 newest kept). Its path is the last line ("Full log: …"); a ✗ block
  names it instead.
- Plain output (pipes, NO_COLOR, TERM=dumb, narrower than 40 columns) is byte
  for byte unchanged, and writes no log.
- Both Macs; the role title (2d702ae) and the joining Mac's progress rows
  are unchanged. No screen text changes, so other branches' text merges.

Onboarding checks: 1630 passed, 0 failed. The new fold checks (leading Mac at
80 and 40 columns and through a resize, joining Mac at 80, a step taller than
the window, plain unchanged and no log, the ✗ block's log line), checked on a
small terminal emulator of the raw output, failed 14 on the base with only the
interface; one older check's bloom test now matches the bloom's own redraw.
Filtered swift test (ClusterOnboarding|ClusterPairCommands|DarkbloomCommandLook),
sandboxed: prod 28 + 105 passed. Dev: 28 passed; ClusterPairCommandsTests keeps
its 72 dev-identity issues, as on the base (`darkbloom` vs `darkbloom-dev`).
docs-check and changelog-check OK.

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

Pair-2 (M3 Ultra + M5 Max, Gemma 4 26B tensor parallel served locally)
logged proposal lanes=8 -> prepared -> rollback_prepared every ~35 s,
each cycle draining the lane and reloading the old setup (~15 s).

Gemma has no tensor-parallel batch quote, so queued demand priced an
8-lane pipeline. The local server swaps in only a session with the same
endpoint contract, and Gemma captures committed-token logprobs in
tensor parallel only, so the swap fails after the drain, and nothing
remembers the failure.

Four checks, red against stubs that keep today's behaviour:
- the planner's endpoint predicate allows a tensor-parallel Gemma
  generation to be replaced by a pipeline;
- it disagrees with the session profiles the server compares;
- a replacement that failed after release is allowed again at once;
- the factory proposes a width that just failed.

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

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

# Conflicts:
#	libs/darkbloom-cluster/Tests/PlacementChecks/Main.swift
…round 6b integration

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

# Conflicts:
#	provider-swift/Sources/ProviderCore/Inference/Distributed/Onboarding/ClusterOnboardingLive.swift
… 6b integration

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

# Conflicts:
#	provider-swift/Sources/ProviderCore/Inference/Distributed/Onboarding/ClusterOnboardingTerminal.swift
…embers a failed width

Pair-2 (M3 Ultra + M5 Max, Gemma 4 26B tensor parallel served locally)
repeated proposal lanes=8 -> prepared -> rollback_prepared every ~35 s.
Each cycle drained the lane, adopted a setup on both Macs, failed, and
reloaded the old setup (load_ns ~15 s), so queued requests waited
minutes (4 at once: 118 s; a health request: 412 s).

- Gemma has no tensor-parallel batch quote, so its batch scope prices
  only the pipeline, and the planner proposed an 8-lane pipeline. The
  local server swaps in only a session with the same profile, and Gemma
  captures committed-token logprobs in tensor parallel only, so
  `prepareGeneration` refused it (`replacementIdentityChanged`) after
  the drain. The planner now refuses a width whose mode changes the
  endpoint contract before anything drains
  (`keepsEndpointFeatures`; `cluster.batch_replan refused`,
  `reason=endpoint_features`).
- Nothing remembered a replacement that failed after release. The
  factory now records it when the host asks for the restore
  (`cluster.batch_replan failed`), and proposes that setup and width
  again only after 2 minutes, doubling per repeat, at most 30; a
  changed setup is tried at once (`DistributedAutomaticBatchFailures`).

The memory-based width choice is unchanged: only widths both Macs admit
now are proposed. The logprobs rule, the factory's Gemma eligibility and
the binding check date from 8197ff9 (v0.10.6), not 0.10.9.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ncel in its prompt keeps that lane

Option (a), pricing a Gemma tensor-parallel batch width, is not safely
possible in this window. Gemma's TP runtime does run batched lanes
(`Gemma4TensorParallelLaneReservation`, `pagedHost(lanes:)`, the lane
contract), but nothing prices them: there is no Gemma tensor batch
quote (`ClusterPlacementTensorBatchQuote.runtimeModelIDs` is Qwen
only), no saved `batchLanes` for Gemma TP (`ClusterConfiguration`), and
the TP-to-TP replacement path (incumbent shares) is Qwen only.

The wording was already truthful: the mode question and the setup's
lanes come from `DistributedInstalledPlan.batchLanes`, which gives
Gemma TP its default of one. Two guard checks pin it (green on this
base; no source changes here), and the docs now state the known
limitation: at one lane a cancel during the prompt is a clean stop at
the first token, so the lane is held until the prompt is read (~68 s
for 15.8K tokens on pair-2), as on a GLM pipeline.

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

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

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference Error Error Nov 5, 2026 2:34am UTC
d-inference-console-ui-dev Error Error Nov 5, 2026 2:34am UTC
d-inference-landing Ready Ready Preview Nov 5, 2026 2:34am UTC
darkbloom-status Ready Ready Preview Nov 5, 2026 2:34am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 5, 2026 2:34am UTC

Request Review

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference-landing — 2df25771 Deployed Nov 5, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 2df25771 Deployed Nov 5, 2026 by vercel[bot]
Preview – darkbloom-status — 2df25771 Deployed Nov 5, 2026 by vercel[bot]
Preview – d-inference — 2df25771 Deployed Nov 5, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 2df25771 Deployed Nov 5, 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