Repository navigation
fix(cluster): say Serving only once the pair is loaded, end with a clear outcome, and say why it isn't - #1764
Merged
Merged
Conversation
On 2026-11-03 the owner's M3 Ultra + M5 Max and an end user's 2x M4 Max both printed "Serving" and "Done" while nothing was loaded: a pair offered for pairing counted as tested, and register() discarded awaitReady's result. The driver now waits for a pair offered for pairing to serve (operation pairServing: rank 0's pair slot published, both ranks loaded, first request answered) before it says Serving or Done; a start that does not serve, the restart after the registration included, says why in one line and stays open with Retry, Change model, Serve locally only and Diagnostics; q exits 1. A Mac without a Darkbloom login is named before the Start step starts anything, with darkbloom login or local-only serving offered. Onboarding checks (a)-(d) fail first (30 failures on the driver as on origin/dev) and pass after (765 passed, 0 failed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rank 0's coordinator-paired part writes its pair's progress to its log (Pair: starting / serving (first request in N s) / stopped (<guidance>)), from serveCommittedStart and the pair slot's publication and retirement. Each cluster service publishes the latest line, the member's App Attest authorization from the coordinator's trust status, and whether the Mac has a Darkbloom login (ClusterServiceStatus.Child.pair, Child.appAttest, loggedIn; all optional, nil from an older build). OnboardingLive.pairServing waits up to 15 minutes for rank 0 to serve; a missing login ends it at once, App Attest, memory or a stopped start after 90 s. The status line of a registered pair says Serving only while it serves, else "<model> is not serving yet: <reason>." with what to do. missingLogins and login back the login check before the Start step. Docs: two-mac-cluster, troubleshooting, architecture/inference; changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gress From the owner's call with an end user (2x M3 Ultra and 2x M4 Max on 0.10.7): the setup "just ends", step 4 gave no sense of time, and a failure gave no reason. The Start step now opens with "Loading takes a few minutes for a large model; both Macs show progress here." and, on a color terminal, the waits draw one live row per Mac with the time since loading began (no bar or percent: no load fraction is reported). The setup ends with its outcome as a block between two rules: "✓ Serving <model> through Darkbloom on both Macs (<split>)" or "✓ Serving <model> on this Mac's local API only", with the API and test response under it, or "✗ Not serving: <reason>." with the next step before the choices. The other Mac's window says where to look and shows the same block from the cluster's status. A Mac Apple has not verified yet is named with when Darkbloom retries by itself, and to restart neither Mac. Onboarding checks (e)-(h) fail first (15 failures on the previous driver) and pass after (796 passed, 0 failed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d row
Each Mac's cluster service now also passes the end of its member's local
App Attest key-generation safeguard (ClusterServiceStatus.Child
.appAttestRetryAt, read only from the daemon state's AppAttestKeyState
.generationBlockedUntil; nil when nothing blocks it or from an older build).
The not-verified reason names that time in local time ("… retries by itself
at about 00:34. Don't restart either Mac until then."), or "within minutes".
An end user's M4 pair was refused this way for an hour after the setup's own
restart cut its leader's attestation (production telemetry, 2026-11-03).
pairLook's progress carries one row per Mac (registering, registered,
loading its share once rank 0's part reports the committed start); the
status line keeps only the wait's first line.
Docs: two-mac-cluster (Start notice, live rows, outcome block, the reason's
time), troubleshooting, architecture/inference; changelog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wait - The check runners that compile ClusterOnboardingFlow.swift (control, placement flow, diagnostics, installed session, console, GLM image admission) also compile ClusterOnboardingPairServing.swift: the driver uses its types, and those runners stopped compiling at 5a604f8. - ClusterOnboardingNotServing owns the status line, its read-back on the other Mac and the outcome's title (statusLine, reason(inStatusLine:), title(reason:)), and isMissingLogin for the remedy and the wait's hold. - One live-rows wait (waitWithRows) for the parts and for the pair; one local-only rule (ClusterOnboardingReady.servesLocallyOnly) for the outcome block and servesWords; missingLogins(peer:) shared by pairLook. - Checks: the member's status fixtures come from the producers; the screen budgets are constants with one comment; the status-line contract is asserted. Every transcript is byte-identical. - Docs and changelog: the joined line's quote, live rows, the hold's wording, the split's place; a shorter fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rves The refactor pass found the universal false success on the menu path: "Serve through Darkbloom" (and "Serve locally", and `darkbloom cluster local` on a serving cluster) waited for the parts, then printed ready.summary. With a cluster approval saved that is an offered ready, so the screen said "✓ Serving <model> (<split>): Registered with the coordinator…" for a pair that was only registered: an end user's session 2 (he pressed p on the status screen; it said Serving and nothing loaded). changeScope now ends through finishStart (registers: false), as the start does: a registered pair is awaited until it serves, a pair on the leader's API is tested, then the outcome block; otherwise ✗ with the reason and the choices. The audit of the other paths: - summary(model:) of an offered ready no longer starts with "Serving"; - the status screen says a Mac serving alone is still loading until its solo server answers (as the setup's wait already counted it); - the menu's Test on a registered pair that doesn't serve names why. awaitReady and offerDiagnostics had no caller left and are removed. Onboarding check (i) fails first on the refactor head e3c1577 (5 failures: "✓ Serving …: Registered …", exit 0) and passes after: 808 passed, 0 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers Child.pair, Child.appAttest, Child.appAttestRetryAt and loggedIn in ClusterServiceStatus: a new-to-new round trip keeps all four, a status from an older build (without them) decodes them as nil, and nil fields are left out of the JSON, so an older build reads a newer status unchanged. Ran sandboxed (no-darkbloom.sb, swift test --disable-sandbox --skip-build --filter ClusterLeaderFailoverFinishTests): 14 tests passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ntion) OnboardingLive.login() waited for `darkbloom login` with Process.waitUntilExit(), which ChildExitWaitConventionTests refuses (CI run 41748650807, Provider Unit Tests shard 3). It now starts and waits for the child through ProcessExitObserver, as the interactive sudo child in ClusterLocalNetworkAccess does: no timeout, as before (the person approves the login in the browser). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An independent validator found it, and the production pair's own rank.log confirms it (0.10.7, 457 KB: its last 16 KiB held about nine minutes of `darkbloom.distributed.request` lines). ClusterService.pairReport read only the last 16 KiB of rank.log for the latest `Pair: ` line, which a part writes once per change, so a busy pair that serves lost its `Pair: serving` line within minutes and read as not serving. The status, the outcome block and the scripted status read it. The local serving notice, written once per start, had the same tail. ClusterLogScan.lastLine reads backwards from the end in 64 KiB chunks, stops at the first match, never reads before the part's start offset (a line an earlier part wrote is never this part's; a log shorter than the offset was replaced and is read from its start) and at most 8 MiB back. pairReport and servingNotice use it; the service's own notice now reads only the running part's lines (from its start offset), as the pair line already did. No change to the log or to what writes it. lastError keeps its tail: the error is the last thing a part writes before it ends. ClusterServiceLogScanTests fail first (4 tests, 7 issues: the pair line behind 20 KiB and 1.2 MiB of requests, the notice behind 300 KiB, the bound and chunk edges) and pass after; onboarding checks stay 808/0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 4, 2026
… pair line behind any number of request lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 of 26 tasks
jonathan308
added a commit
that referenced
this pull request
Nov 4, 2026
…ale-pairing cluster: Macs paired before get Pair again, Start over and plain next steps (stacked on #1764)
jonathan308
added a commit
that referenced
this pull request
Nov 4, 2026
Brings #1763, #1765, #1764, #1770, #1772, #1767, #1768, #1769 and #1766 from dev. One conflict, in docs/provider/two-mac-cluster.md (2 hunks): before "## Undo", #1774's "Stopping and starting again", then #1770's "Pairing again"; Undo keeps #1770's opening, #1774's --service sentences, the Uninstall link, and #1772's "## Uninstall" section as written. Resolution verified in a dry run (tree 4737f00). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/provider/two-mac-cluster.md
jonathan308
added a commit
that referenced
this pull request
Nov 4, 2026
…-on-a-pair fix(cluster): on a paired Mac, darkbloom start/stop/restart/status control the pair; plain cluster status --json (stacked on #1764)
This was referenced Nov 4, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The universal bug: on every model,
darkbloom clustersaid a pair was serving and "Done" when nothing was loaded. The Start step loaded the model locally, tested it, then restarted both Macs in coordinator mode (which unloads the model and loads nothing until the coordinator forms the pair) and printed Done without checking. This PR makes the wizard say Serving only when the model is really loaded on both Macs and answered, and say why when it isn't.The real evidence
did not actually load anything and then the clustering TUI just ended on both saying it worked." The flow ends with
"you can hit it again to manage", with no clear "it's running" signal, and "if it fails, it should say why". Team
notes: show success or failure "VERY clearly"; a disclaimer and progress on step 4.
attestation by the setup's own restart. Its key-generation safeguard then refused a new key for an hour. The
coordinator logged
cluster pair not eligible … rank 0 …: liveness:private_textfor MiMo, Qwen 3.8 and Gemma(23:34:40, 23:43:40, 23:46:59Z) while both screens had said success.
parallel)… (earning through Darkbloom)", "✓ Test response in 1.14 s", "Registered with the coordinator as a cluster
member…", "Done." At 23:50:20Z neither Mac ran a
darkbloom-cluster-worker. Neither Mac had a Darkbloom login, sothe coordinator never paired them. The leader's part had ended
exit 1once on amemory_gate_refusedfrom thefollower.
ready.offered != nil),register()threw awayawaitReady's result, and the menu's Serve through Darkbloom printed the registered lineas "✓ Serving" (an end user's session 2: he pressed p on the status screen and nothing loaded).
What changes
pair slot published: both ranks loaded and the warm-up request answered.
✓ Serving <model> through Darkbloom on both Macs (<split>), with the API and test response under it;✓ Serving <model> on this Mac's local API only;✗ Not serving: <reason>.with the next step, then Retry / Change model / Serve locally only / Diagnostics. qexits 1 and never says Done.
terminal it shows one live row per Mac with its elapsed time. There is no bar: no load fraction is reported.
safeguard, read only) and "Don't restart either Mac until then".
calls a registered pair serving.
Linked issue
None filed (end-user call 2026-11-03 and the owner's own pairs).
Test plan
Validator fix
fa3865e703: a busy pair's serving line is found.pairReportread only the last 16 KiB ofrank.logfor the latestPair:line, which a part writes only when its state changes. On the production pair'sreal log, the last 16 KiB held about 9 minutes of per-request lines, so a busy, healthy pair would soon read "not
serving". A new
ClusterLogScan.lastLinereads backwards in 64 KiB chunks from the end to the first match,bounded at 8 MiB and never before the running part's start offset. The pair line and the local serving notice use
it; the log format is unchanged.
ClusterServiceLogScanTests: red, 4 tests / 7 issues (Pair: servinglost behind20 KiB and 1.2 MiB of request lines; the notice behind 300 KiB), then green. 31 tests in 5 suites pass;
onboarding checks 808/0; docs and changelog gates pass.
CI fix
0e7eed36b9(repo convention testChildExitWaitConventionTests):OnboardingLive.login()waits fordarkbloom loginwithProcessExitObserverinstead ofProcess.waitUntilExit(), asClusterLocalNetworkAccessalready does. Same behaviour, no timeout (the person approves the login in the browser). Sandboxed
ChildExitWaitConvention|ClusterLeaderFailoverFinishTests|ClusterOnboardingPeerLabelTests: 22 tests in 3 suitespass; onboarding checks 808/0; docs and changelog gates pass.
provider-swift/Tests/ClusterOnboardingChecks/run.sh:Sandboxed
swift test --filter ClusterLeaderFailoverFinishTests(14 passed, incl. the new wire test);ClusterApprovalLifetimeTests|ClusterLocalServingTests(10 passed).ClusterPlacementChecks/run-flow.sh(33),ClusterDiagnosticsChecks/run.sh(pass),GLMImageAdmissionChecks/run.sh(40), all sandboxed.swift build --target ProviderCore(exit 0).make docs-impact-check BASE=origin/dev,make docs-check,make changelog-check.ClusterConsoleChecks: the runner doesn't build on origin/dev either (
ClusterApprovalFallbackmissing from itssource list). This PR changes no console source.
Real pairs, in progress. The 0.10.8 candidate (this branch merged with the other cluster fixes) is being
installed on the owner's two pairs (M5 Ultra × M5 Ultra; M3 Ultra + M5 Max). Pass means:
darkbloom clusteron the member;Results will be added here.
Components touched
Protocol / interface changes
ClusterServiceStatus(the pair's link control) gains optionalloggedIn,child.pair,child.appAttestandchild.appAttestRetryAt. Older builds omit or ignore them, and missing fields read as unknown (committed cross-build test). No coordinator protocol change.Documentation impact
docs/provider/two-mac-cluster.md(Start step, outcome block, login check, status),docs/provider/troubleshooting.md,docs/architecture/inference.md(how the outcome is decided).Changelog
changelog.d/cluster-start-says-serving-only-when-loaded.mdand ranmake changelog-check.Notes for reviewers
cluster pair not eligiblereason is only a log line, andGET /v1/me/cluster-pairsshowswaiting: not_eligiblewithout it. This PR uses each Mac's own signals (login, App Attest authorization and its retry time, memory, the part's progress). Reasons it can't see (for exampleserves_modelor a reservation refusal) show progress until the 15-minute bound. A follow-up could carry the coordinator's reason to the Macs.ClusterConsoleChecksdoesn't build onorigin/deveither (ClusterApprovalFallbackis missing from its source list); this PR changes no console source.Before And After
Behavior
flowchart TB subgraph Before B1[Start both Macs] --> B2{waitReady} B2 -->|both members registered| B3["✓ Serving … : Registered…"]:::bad B3 --> B4["counted as tested"]:::bad --> B5["Done. (texts bundled, command ends)"]:::bad B2 -->|local API ready| B6[test] --> B7[register] --> B8["_ = awaitReady"]:::bad --> B5 end subgraph After A0{Both Macs logged in?} -->|no| A9["name the Macs: Log in / Serve locally only / Cancel"]:::warn A0 -->|yes| AN["'Loading takes a few minutes…' + one live row per Mac"] AN --> A1[Start both Macs] --> A2{waitForParts} A2 -->|registered| A3{rank 0: pair slot published?} A3 -->|yes| A4["── ✓ Serving … through Darkbloom on both Macs ──"]:::good --> A5[Done]:::good A3 -->|"no: login / Apple (retries at ~HH:MM) / memory / part ended"| A6["── ✗ Not serving: reason + next step ──"]:::warn A2 -->|local API ready| A7[test] --> A8[register once] -->|parts restart| A2 A7 --> A4 A6 --> A10["Retry · Change model · Serve locally only · Diagnostics"]:::warn A10 -->|q| A11["Not serving yet … exit 1"]:::warn end classDef bad fill:#fdd,stroke:#c00,color:#000 classDef good fill:#dfd,stroke:#080,color:#000 classDef warn fill:#ffd,stroke:#a80,color:#000Code flow
flowchart LR subgraph Before c1[chooseAndServe] --> c2[awaitReady] --> c3[print summary] --> c4["register: _ = awaitReady"] --> c5[Done] end subgraph After d0[checkLogins] --> d1[chooseAndServe] --> d2[finishStart] --> d3[startOutcome] d3 --> d4["waitForParts / awaitPairServing<br/>ClusterOnboardingLoadRows → console.workingRows"] d4 --> d6[OnboardingLive.pairLook] d6 --> d7["ClusterServiceStatus.child.pair / appAttest / appAttestRetryAt / loggedIn"] d7 --> d8["rank.log 'Pair:' lines ← ProviderLoop.reportPair<br/>daemon state appAttest.key (read only)"] d3 --> d9["register → Bool"] d2 --> d10["console.result ✓/✗ block · notServing choices"] endRefactor Pass
e3c15773ba(
overnight/refactor-start-truth.md). It fixed six check runners this branch had broken, gave one source to thenot-serving words and the status-line contract, and made one live-rows wait and one local-only rule. All 24
transcripts stayed byte-identical; onboarding went 796 → 799.
c8f1892089behavior,30187cb405test), reviewed against its invariants:A dedicated refactor pass reviewed the whole branch. Its result is one signed, behavior-preserving commit,
e3c15773ba, with these changes:ClusterOnboardingFlow.swiftwithout the new
ClusterOnboardingPairServing.swift(control, placement flow, diagnostics, installed session,console, GLM image admission). Each now lists the file.
ClusterControlCheckswent from failing to compile to229/0. CI runs only the onboarding runner, so CI did not catch it.
ClusterOnboardingNotServing.statusLine/reason(inStatusLine:)(the leader's status and the other Mac's ✗ block),
title(reason:), andisMissingLogin(the remedy and thewait's 90 s hold).
waitWithRows) for the parts and the pair, and one local-only rule(
ClusterOnboardingReady.servesLocallyOnly) for the outcome block andservesWords.(shows 64).
shortened the fragment.
swift build --target ProviderCoreOK.make docs-check,make docs-impact-check,make changelog-checkOK.ClusterServiceStatuswire compatibility verified with a harness built from the HEAD and origin/dev structsources.
c8f1892089: the menu's "Serve through Darkbloom" (changeScope) now ends through the same outcome as the start.Every other path that prints "Serving", "✓" or "Done" was audited and routed the same way.
30187cb405: a committed cross-build test for the four new status fields.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.