Repository navigation
doctor: a Local API section first, and no network checks on Only me (LS-6, R17) - #1906
Merged
Merged
Conversation
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>
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#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>
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>
Merged
4 tasks done
…nd tests for what nothing covered The required refactor pass (AGENTS.md) for #1906. Behaviour is unchanged: every line `doctor` prints, and when it prints it, stays as it was. - One place for each decision: - `DoctorLocalAPI.runsNetworkChecks(coordinatorOverride:)` says when the network's checks run: on every Mac but one set to Only me, and there too with `--coordinator`. `Doctor.run` used to decide it inline, and the tests only through a `diagnostics` property that nothing else read. That property now lives in the tests, built on the same function. - How the pair serves (`pairMode`) is read once. `onlyMe`, `hasLocalAPI` and the mode line follow it, or this Mac's own way when it isn't paired. - "The pair's API runs on the other Mac" is one property, used by the address and key file lines. - Billing joins the other network sections in `DoctorRunner.networkDiagnosis`, so one `networkChecks` test leaves them all out. The report groups lines by section, so where billing sits in the list changes nothing. - The tools' names and the command that sets each one up come from `IntegrationTool.displayName` and `ToolIntegrationStep.command`, the words `darkbloom --opencode` / `--hermes` print, instead of copies. - Names: `HermesConfigPlan.setUp(in:provider:)` reads a config and writes nothing, so it is now `providerEndpoint(in:provider:)`, like the `HermesEdit` method it calls. - The mode line's two cases read top to bottom: what the running provider serves, else the saved choice. - Comments say the rule that doctor never prints the key, where each read happens: of `local.json` only whether there is a key, and of the tools' configs only the path of the key's file (OpenCode's `{file:…}`, Hermes' `key_cmd`). A key written into a config is never read. - Tests, none weakened. Four new ones, and one more check, cover what no test did: - a key written into OpenCode's or Hermes' config is never shown; - `GET /health` goes to `local.json`'s address (loopback for an any-address bind, `[::1]` bracketed), and only a 200 counts; - without the network's checks the operator diagnosis drops exactly the network's lines, billing included, and keeps the rest unchanged; - a pairing record that can't be read never skips the network's checks; - `--coordinator` runs the network's checks on Only me. They pass on the PR head's sources. Each catches a mutant that the PR's tests didn't exercise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 8, 2026
…pple warning only when real, the member never guesses The required refactor pass (AGENTS.md) for #1908. Behaviour is unchanged, and the tests only gain checks: no expectation was dropped or loosened. ProviderCore: - `ClusterOnboardingAppleCheck.Mac.warns` names the rule for a real Apple warning: a Mac that reports no App Attest authorization, and is held back by its key-generation safeguard, or whose part has run 2 minutes without one, or whose part's age is unknown. A Mac with the authorization, or with no trust status yet, never warns. `look` uses it, and its check words are spelled once (`isChecking` reads the same prefix and suffix). - `ClusterOnboardingPairWait.words` decides what the pair waits for (the committed start, else Apple's check of a new part, else the coordinator's pairing); `pairLook` calls it. `isProgress` reads those words as progress. Before, the choice was inline in `pairLook`, which no test runs, and darkbloom spelled the coordinator's two phrases again (`pairingProgress`, removed: `state(ofStatus:)` calls `isProgress`). - Comments state the invariants where they hold: the pause comes only from the part that runs rank 0 and reaches the other Mac as text in the leading Mac's status (one state-file read per status, nothing per request, no new message on the link or the heartbeat); `MeFirstWords` makes its words with the clock of the Mac whose part wrote the snapshot, so two clocks never mix; only the leading Mac's look decides between Apple's progress words and the warning, and every reader reads its words. - `offeredWaitingWords` capitalizes with `ClusterOnboardingMacName.sentence`. CLI: - `localAPILines`, `servingLook` and `screenLine` say why: a Mac whose part doesn't run rank 0 never works the pause out, and only the pair's own look says a start's pair already serves. Tests: - ClusterPairStatusWordsTests: a Mac with App Attest, or with no trust status yet, never warns, whatever its age or safeguard; the warning starts at exactly 2 minutes; of two real warnings, this Mac's; the wait's words and `isProgress`. Each catches a mutant the PR's tests let through (a verified Mac warns; a Mac with no trust status warns; `>` for `>=`; the last Mac named; the wait ignores Apple's check; Apple's check outranks the committed start). - ClusterPairCommandsTests: one `startingThePair` beside `alreadyServes` and `openingScreen` instead of seven spellings; `stoppedPair(model: false)` instead of `noModelStoppedPair()`. ClusterPairBothMeFirstCLITests: one `member()` fixture; a test name no longer says "since when". Kept: `LocalFirstWords.minutes` and `idleMinutes`, which forward to `MeFirstWords`: the open #1906 adds a caller. Checks (Xcode 27.2, prod identity, nice 19, CPU only, sandboxed): all of DarkbloomCLITests minus the binary-running suites and the two Metal tests, 1,200 tests in 172 suites at the PR head and here; the touched CLI suites (158 tests); ProviderCore's touched suites, 44 tests (42 at the PR head, +2); the plain-swiftc onboarding checks (1,941) and control checks (682); the console checks, 79,395 of 79,396 (the one left runs /bin/ps, which the sandbox denies; CI runs it). A 36,620-line transcript of every word the PR's code says over many states is byte-identical at the PR head and here, once the durations in 144 lines, which `clusterStatusLines` measures from the wall clock, are masked. 16 env-gated mutants. docs-check, changelog-check and diff --check are clean; docs-impact fails its "native inference" mapping as it does at the PR head (the onboarding sources sit under ProviderCore/Inference). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 8, 2026
…un-again line - R2, Ctrl-C: `ModelLoadWait.run` asks the watch right after each look, before "nothing loading" can end the wait, so a press in the last pause stops it even when that look sees the model loaded. The step asks once more as the wait returns, before it reads the list again or writes: "Stopped before setting up OpenCode; nothing was written. Run `darkbloom --opencode` again." Past the wait Ctrl-C does what it did. `InterruptWatch.begin` sets its signal source up before it ignores the signal, so no press between the two is lost. - R3, the run-again line: `.ready` carries what the process has loaded by its own word (`warmModels`; nil without a state of its own, and for Only me's server, whose state names none). `notLoaded` names this Mac's listed models the process hasn't loaded; without its word, those listed without a context, as before. So a route that dials out, whose router lists the catalog's limits for a model that isn't loaded, no longer hides the line. - R4, the address: `ToolAddress.sameAddress` compares scheme, host and port in any case (the scheme's own port when none is given) and the path without one `/` at its end; `localhost`, `127.0.0.1` and `::1` are one host, and so is this Mac's Bonjour name (`Local.localHostName()`, as `darkbloom local` prints it) for an API on every address (`thisMacsNames`). The rule #1906's `doctor` uses, here for both. - The changelog fragment says the above, and that the wait and the notice are single-Mac for now. Green (prod identity, CPU-only, sandboxed): ModelLoadWaitTests 18/18, ToolAddressTests 10/10, StartToolIntegrationTests 16/16; DarkbloomCLITests 1234 tests in 174 suites (the usual hardware and slow skips). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng alone, one tool reader (red) #1906's independent review (review-1906.md) asked for changes once #1899 and #1904 merged. With dev merged, these tests ask for them: - The fix that starts a local API again (its port doesn't answer, or no key file holds its key) keeps the way it serves now (C1): - Only me in a terminal: "press Ctrl-C in its window, then `darkbloom start --local --here`". `restart` never stops it, and would serve the saved choice in the background (the Darkbloom network, for one); - a service serving the saved choice, or with none saved: `restart`; - a service serving another way: `start` with that way's flag (`--local`, `--me-first`, `--local-endpoint --no-me-first`); - `--solo` where a paired Mac serves alone; `restart` for the pair's own API. - A stopped service that is installed: `restart` starts it again as saved (N6); without one, `start`. - Only me's server loading its models (no local API yet) is Only me, "starting", and the network's checks are skipped; the address line says the API opens once its models are loaded (C2). A network provider waiting for its schedule stays the network. - A paired Mac serving alone (`start --solo`) is described by what serves: its own way "(this Mac serves alone, not the pair)", the network's checks by that way, and its bind failure with `start --solo --port` (C3). - A failed bind is named by the address that failed (N1). - A pair that hasn't chosen how it serves says so, with `darkbloom cluster` (N2). A tool left pointing at a local API on a Darkbloom network pair names `darkbloom cluster` (N4). - The tools are read and judged as `start` judges them (C4): - `localhost`, and this Mac's `.local` name for an API on every address, are this Mac; - another file holding the same key is the same key; - a `key_cmd` without a full path names no key file; - a config over 4 MiB is refused unread; - a Darkbloom block without an address names the tool's command. - `live` reads whether this Mac serves alone, Only me in a terminal, the service, and this Mac's names, through stand-ins (`DoctorLocalAPI.Reads`). Four tests cover lines no test did (the review's surviving mutants), and pass already: - the pair's way decides Only me while it serves (D1); - a paired Mac's saved port isn't the pair's address (D2); - `--coordinator` runs the network's checks on Only me, end to end (D3); - the key file is the running API's port's first (D5). `addressesOnThisMacCompareByPortAndPath` goes: the address rule is #1904's, and `ToolAddressTests` covers it. Seams, with today's behaviour: - `DoctorToolSetup.Found` takes `ToolAddress`'s shape (`.notSetUp`, `.entry(ToolPointer)`, `.unreadable`), still from doctor's own reader and comparison; - `DoctorLocalAPI.Facts` gains `servingAlone`, `terminalOnlyMe`, `serviceInstalled` and `thisMac`, unused; - `live` takes `Reads`, but reads none of those. 12 of the 36 tests fail, with 42 issues; `ToolAddressTests` passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s tool reader The review's changes (review-1906.md), now that #1899 and #1904 are in dev. The red commit's 12 tests pass, and so do the other 24. - A local API that doesn't answer, or whose key no file holds, is started again the way it serves now (C1, `DoctorLocalAPI.restartFix`): - Only me in a terminal (`Restart.terminalOnlyMe`): "press Ctrl-C in its window, then `darkbloom start --local --here`". `restart` never stops it, and with an older job installed it would put the Mac back on the Darkbloom network; - the background service serving the saved choice, or with none saved: `restart`; - a service serving another way than the saved choice: `start` and that way's flag, since `restart` serves the saved one; - `--solo` where a paired Mac serves alone; `restart` for the pair's API. - "— not running" with the background service installed: `restart` starts it again as saved, without `start`'s questions (N6). - Only me's server is Only me from its first load (#1899's rule, as `status` reads it): the mode line says "(starting)", the address line that the API opens once its models are loaded, and the network's checks stay skipped (C2). - A paired Mac serving alone (`ServiceDrain.soloProviderState`) is described by what serves, "(this Mac serves alone, not the pair)": Only me and the network's checks follow it, its bind failure says `start --solo --port`, and its commands take `--solo` (C3). - A failed bind names the address that failed (N1). A pair that hasn't chosen how it serves says so, with `darkbloom cluster` (N2). A tool left on a Darkbloom network pair names `darkbloom cluster` (N4). - One reader and one set of names (C4): - the mode names are #1899's `LocalFirstWords.choice`, also for the pair's; `DoctorLocalAPI.name` goes; - the tools are read by #1904's reader, which gains a form that says why a config that is there can't be read (`ToolAddress.readPointer`, `OpenCodeConfigPlan.readPointer`, `HermesConfigPlan.readPointer`; `pointer` is that without the reason, so `start` is unchanged); - each tool is judged by one check, `ToolAddress.miss`, which `start`'s notice uses too: `localhost` and this Mac's `.local` name are here, another file holding the same key is the same key, a `key_cmd` without a full path names no file, and a config over 4 MiB is refused unread; - `DoctorToolSetup` is a thin read over it; its own JSONC and YAML readers, its address rule and `HermesConfigPlan.providerEndpoint` go. - `live` reads all this through stand-ins (`DoctorLocalAPI.Reads`). The key is still never printed: the running API's is read only for whether there is one, and the tools' key files are compared, never shown. Docs: the Local API table in cli-reference.md (with a table of the restart fixes), local-first.md, troubleshooting.md, tool-integrations.md, and the changelog fragment. Checks: 1357 tests in 184 suites of DarkbloomCLITests pass (without the suites that run the built binary). Twelve env-gated mutants, each caught: the review's D1, D2, D3 and D5, which survived before, and one each for C1, C2, C3, the `.local` name, `live`'s wiring, N6, the same key, and the 4 MiB limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (red) The confirmation of #1906's review (review-1906.md, "Confirmation") found one case left, from #1894 (merged into dev at 02:01Z). On a pair's member Mac that passes the pair's API on through its own port, while the other Mac is away the relay answers 503. There `doctor` says: ✗ address — http://127.0.0.1:8002/v1 — its server runs, but port 8002 doesn't answer ↳ fix: `darkbloom restart` `status` says instead that the port answers 503 for now, that the other Mac isn't reachable, and to wait, or run `darkbloom stop`, then `darkbloom start --solo` (`ClusterPairSummary.memberAPIDown`). The test (`aRelayThatCantAnswerForThePairSaysWhyAsStatusDoes`) asks for `status`'s words in doctor's address line, as a ⚠ with no `restart`: - with the other Mac away (the relay answers 503); - with another program holding this Mac's port, where no relay runs. No seam: the test reads #1894's fields of `ClusterPairSummary`. 1 of the 37 tests fails, with 5 issues; the other 36 pass on dev `5347bc3b81`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a pair's Mac that passes the pair's API on through its own port (#1894), doctor's address line now says why that port can't answer for the pair now, as `status`, `darkbloom local` and `start --opencode` say it (`ClusterPairSummary.memberAPIDown`), as a ⚠: - with the other Mac away, the relay answers 503: "http://127.0.0.1:8002/v1 on this Mac answers 503 for now. Your pair's other Mac (…) isn't reachable; this Mac relays to it. Requests resume when it's back, or run `darkbloom stop`, then `darkbloom start --solo`, to serve this Mac alone." It was "✗ … its server runs, but port 8002 doesn't answer", fix `darkbloom restart`, which doesn't bring the other Mac back; - with another program holding its port, or while Darkbloom doesn't have the pair, the line `status` gives for each. Nothing new is read: `ClusterPairSummary.local()` already fills the relay state. A Mac serving alone (`start --solo`) isn't asked, as before. Docs: the Local API table in cli-reference.md, the list there of the commands that say these words, troubleshooting.md, and the changelog fragment. Checks: `DoctorLocalAPITests` 37/37 (the red test passes); `Doctor*`, `ClusterPairMemberRelayCLITests`, `ToolAddressTests` and `StartToolIntegrationTests` pass; 1381 tests in 186 suites of DarkbloomCLITests pass on dev `5347bc3b81` (without the suites that run the built binary). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
marked this pull request as ready for review
November 9, 2026 02:58
jonathan308
added a commit
that referenced
this pull request
Nov 9, 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
LS-6, UX audit R17: a mode-aware
darkbloom doctor. The quickstart's step 2 and the installer's first next step both rundoctor. Before this PR it checked only what Darkbloom serving needs, and said nothing about the local API.1. A
LOCAL APIsection opens the report. No line shows the key or a speed. Every problem names the next command:modestatusreads it: Only me from its first load, "(starting)" until its API listens. Else[local] mode(saved). A saved choice that doesn't serve now is named. Not chosen yet:darkbloom startasks. On a pair: the pair's way (#1899's names) and where its API runs, or "this Mac is paired, but how the pair serves isn't chosen yet" (darkbloom cluster). A paired Mac serving alone (start --solo): its own way, "(this Mac serves alone, not the pair)"addressGET /health(2 s) · ✗ port doesn't answer → the command that starts it again as it serves now (below) · ✗ the address that couldn't listen →status's own fix with the next free port (--solowhen serving alone) · Only me loading: "opens once its models are loaded" · ⚠ not running →darkbloom restartwhen the service is installed (it starts as saved), elsedarkbloom start· stopped pair · the other Mac runs the pair's API · a Mac whose own port passes the pair's API on (#1894) and can't now: ⚠ instatus's words (memberAPIDown), e.g. "answers 503 for now", the other Mac away: wait, ordarkbloom stop, thendarkbloom start --solokey file--no-auth, or before the first startOpenCode,Hermesstart's own reader and check (#1904'sToolAddress): ✓ points here · ⚠ points elsewhere, at another key file (one holding the same key is fine), or has no address →darkbloom --opencode/--hermes· ⚠ config can't be read (why) · not set up (with the command). With no local API, only a tool still pointing at one is shown →darkbloom start --choose(darkbloom clusteron a pair)The fix that starts a running local API again keeps the way it serves now:
start --local --here)darkbloom start --local --here.restartnever stops it, and would serve the saved choice in the backgrounddarkbloom restartdarkbloom start --local,--me-firstor--local-endpoint --no-me-first--solodarkbloom restart2. On Only me, the network checks are skipped. They are:
account link,mdm enrollment,coordinator health, trust);One line says why:
darkbloom network — not needed (Only me): …. "Only me" means one of:[local] mode = "local";Model fit, runtime, version, hardware and security stay.
--coordinator <url>runs the network checks anyway.darkbloom verifyis unchanged.The review's changes (after #1899 and #1904)
The independent review (
review-1906.md, on194e58a464) asked for changes, and to wait for #1899 and #1904. Both are merged. This branch mergeddevc5263deaf1(8293a2c617), then:96feeb7a4c: the tests, on seams that keep the behaviour of194e58a464. 12 of 36 fail, with 42 issues;12a920838a: the changes below.restarton Only merestartwhen the service is installed (N6)servesOnlyItsOwnerfirst, asstatusreads it: "(starting)", and the network checks stay skippedonlyMefollows it; its bind failure is shown; its commands take--soloLocalFirstWords.choice;DoctorLocalAPI.namegoes. The tools are read by #1904's reader, which gains a form that says why a config can't be read (ToolAddress.readPointer), and judged by one check forstartanddoctor(ToolAddress.miss). Doctor's own JSONC and YAML readers, its address rule andHermesConfigPlan.providerEndpointgodarkbloom cluster); a tool left on a Darkbloom network pair is tolddarkbloom clusterThe confirmation (
review-1906.md, "Confirmation") found one case left from #1894, merged after that head: on a pair's member whose relay answers 503 while the other Mac is away, doctor said "✗ … port 8002 doesn't answer", fixdarkbloom restart. This branch mergeddev5347bc3b81(8fbed03d4c), then:0870400399:aRelayThatCantAnswerForThePairSaysWhyAsStatusDoes; 1 of 37 tests fails, with 5 issues;ce51f13229: the address line saysstatus's words (ClusterPairSummary.memberAPIDown) as a ⚠, also for a port another program holds. Nothing new is read.Before / After: what you see
flowchart LR classDef bad fill:#fde2e1,stroke:#c0392b,color:#222 classDef good fill:#dff5e3,stroke:#1e8449,color:#222 classDef step fill:#e8eefc,stroke:#2e5cb8,color:#222 subgraph Before B1["darkbloom doctor<br/>(Only me user)"]:::step --> B2["⚠ account link · ⚠ trust level<br/>✗ coordinator health (offline)"]:::bad B2 --> B3["nothing about the local API,<br/>its port, key file or tools"]:::bad end subgraph After A1["darkbloom doctor"]:::step --> A2["LOCAL API first:<br/>mode · address/port · key file · OpenCode · Hermes"]:::good A2 --> A3{"Only me?<br/>(also while it loads)"}:::step A3 -->|yes| A4["network checks: not needed (Only me)<br/>model fit · runtime · version stay"]:::good A3 -->|no| A5["network checks as before"]:::good A2 --> A6["each problem: ↳ fix: the next command,<br/>never restart beside Only me in a terminal"]:::good endBefore / After: code path
flowchart LR classDef old fill:#f2f2f2,stroke:#888,color:#222 classDef new fill:#fff4d6,stroke:#b7950b,color:#222 classDef same fill:#e8eefc,stroke:#2e5cb8,color:#222 subgraph Before D0["Doctor.run"]:::old --> C0["buildCoordinatorDoctorChecks (always)"]:::same D0 --> R0["DoctorRunner.buildOperatorDiagnosis<br/>(network sections inline)"]:::old end subgraph After D1["Doctor.run"]:::new --> L1["DoctorLocalAPI.live(reads:) → lines(networkChecks:)<br/>DiagnosticSection.localAPI (first)"]:::new L1 --> T1["DoctorToolSetup.read"]:::new T1 --> T2["ToolAddress.readPointer · ToolAddress.miss<br/>(start's reader and check, #1904)"]:::new L1 --> S1["LocalEndpoint.readLiveInfo/keyFile · GET /health<br/>LocalFirstWords.choice/serving/whyNotUp (#1899)<br/>ServiceDrain.soloProviderState · Restart.terminalOnlyMe"]:::same D1 -->|"not Only me, or --coordinator"| C1["buildCoordinatorDoctorChecks"]:::same D1 --> R1["buildOperatorDiagnosis(networkChecks:)"]:::new R1 -->|networkChecks| N1["networkDiagnosis<br/>(the network sections, billing included)"]:::new endLegend: yellow is new or changed, blue is reused as it is, grey is replaced.
Validation
CPU-only, in a sandbox that denies
~/.darkbloom*, the GPU, binds and connections on 8000/47420–47423, and writes to LaunchAgents and the tools' configs. Each run gets its own home and local-API directory. Xcode 27.2,nice -n 19, prod identity. Green isce51f13229, ondev5347bc3b81; the tree tested is byte for byte the one committed.DoctorLocalAPITests(two whole-command exit tests on Only me with a stub coordinator: without--coordinator, no/healthor attestation request; with it, the network checks run)Doctor*(11 suites)ClusterPairMemberRelayCLITests(#1894'sstatuswords)ToolAddressTests,HermesConfigPlanTests,OpenCodeConfigPlanTests,StartToolIntegrationTests,ToolIntegrationTestsDarkbloomCLITestswhole, without the 7 suites that run the built binary and 2 Metal tests (CI runs them)12a920838a),DoctorLocalAPITests+ToolAddressTestseach.localname,live's reads, N6, the same key in another file, and the 4 MiB limitmake docs-check,make docs-impact-check BASE=origin/dev,scripts/changelog.py checkThe tool readers are tested against the files the real
--opencode/--hermeswriters produce in a temp home. One test sets up OpenCode withlocalhostand another key file holding the same key, and Hermes withkey_cmd: /bin/cat local_token. It checks thatstart's notice anddoctorboth find nothing wrong, and that no line holds the key.Docs
cli-reference.md: "The Local API section", with the restart fixes; the--coordinatorrow;start's tool notice points to it.troubleshooting.md: the doctor checks table.local-first.md: "Check how this Mac serves".quickstart.md: the Verify step.tool-integrations.md: doctor reads and judges the tools withstart's reader and check.doctor-local-api.md.Limitations / notes
/healthprobe dials the addresslocal.jsonnames (loopback for0.0.0.0).darkbloom --opencodesets it up)" names a command that refuses there.LocalEndpoint.keyFile, which prefers a pair's key, also one left after leaving the pair.start's notice says.DoctorLocalAPI.Reads(terminalOnlyMe,soloState,serviceInstalled) have no test of their own; a service serving Both while the saved choice is Only me is tolddarkbloom start --me-first, whererestartwould serve Only me.DoctorRunner.networkDiagnosisholds all the network sections, billing included (from the refactor pass).194e58a464(refactor-1906.md). Independent review:review-1906.md.