Skip to content

cluster: on a paired Mac start starts the pair, --solo serves alone, no start asks without a terminal, and status says what this Mac serves - #1892

Merged
jonathan308 merged 9 commits into
devfrom
fix/pair-start-truth
Nov 8, 2026
Merged

jonathan308 merged 9 commits into
devfrom
fix/pair-start-truth

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Status: draft, reviewed: approve with nits (review-1892-1895.md: 384 states checked, and a plain start on a
paired Mac always gives the pair). Head 3cb448c152, on dev 3d2d0707e8. Each fix has its red tests first:

Nit 4 is left: a script's start whose other Mac is away ends at exit 5, and its Next: doesn't name start --solo.
All commits are signed.

Summary

On a paired Mac, plain darkbloom start now starts the pair in every state: its screen in a terminal, its saved
model without one. stop and cluster status already promise this. darkbloom start --solo is the one way to serve
the Mac alone
, as the owner decided on 2026-11-07 (F1). start --solo, restart and update now say that the pair's
saved start "is cleared" only once it is (F5, from #1888's review). The desktop app's Start serving on a paired
Mac starts the pair, as a plain start does, and never serves that Mac alone or waits for an answer (the owner's
decision on the review). When it named another model than the pair's, one line the app shows says so.

From journey 1 on pair-2:

  • G1 (J-9): no start asks a question without a terminal.
    • On a paired Mac, a start without one, with or without --opencode or --hermes, starts the pair and reads nothing.
    • A start that names no models stops in one line that says to add --model <id> or --all, instead of waiting on
      the picker's numbered list.
  • J-5: status on a paired Mac says plainly when the Mac serves alone instead of the pair, and shows that serving's
    own lines.

What was wrong

F1 (b3-restart.md §3). darkbloom stop says Stopped on both Macs. They stay stopped after a restart; `darkbloom start` on either Mac starts the pair again. cluster status and its --json next, which agents follow, say the
same. But since 0.10.9, Start.pairStart treats a pair that doesn't run here (stopped, or its other Mac gone) as idle:

  • without a terminal, start served the Mac alone, whatever the options;
  • in a terminal, it asked first: Serve on this Mac alone or Start the pair.

On DevNet pair-2, an agent ran darkbloom-dev start without a terminal on the stopped pair. It got "…which is stopped:
serving this Mac alone", then the model picker's "No models selected". The pair never started. The service's own line
and the restart refusal pointed at darkbloom cluster to start the pair, so the words disagreed with each other too.

F5 (review-1888.md). start --solo, restart and update printed servingAloneLine ("… serving this Mac alone,
and its saved start is cleared …") before releaseLeftoverPart. Since #1888, that release first waits up to 10
minutes for a running cluster command, and on a timeout it ends with "… so nothing was stopped or started." The first
line was false whenever that wait ran out.

G1 (journey 1, J-9).

  • On pair-2, a darkbloom-dev start --opencode that got no answer (script … < /dev/null) waited forever, with no
    output, on "1. Serve on this Mac alone / 2. Start the pair". On d17f62905f that question needs both stdin and stdout
    to be terminals: there was a terminal, but nobody answered it.
  • Without a terminal, dev served the Mac alone instead (F1), and a start that named no models then reached the model
    picker's numbered list. That list reads standard input when there is no terminal (Start.fallbackPicker), and waits
    forever on input that stays open, as an agent's or a script's can.

J-5 (journey 1). On a paired Mac whose pair was stopped and which served alone, status led with "■ Stopped".

  • Single-Mac serving appeared only on line 27, as "Single-Mac serving: running beside the pair (darkbloom-dev status --solo shows it)". It wasn't beside anything: the pair was stopped, and both need the Mac's one serving lock.
  • Its Serving: line needed status --solo.

Fix

  • Start.pairStart, in order:

    1. A pairing record it can't read: as before.
    2. --solo: serves alone while the pair doesn't run here, and is refused while it does ("stop the pair first").
    3. Single-Mac options without --solo: refused by name (exit 64) in every state. The exception is the desktop app's
      Start (Start.appStartOptions: --model, --local-endpoint) without a terminal, which gives .startPair (below).
    4. Otherwise the pair: .openScreen in a terminal, .startPair without one.

    The terminal's question (.choose, chooseInTerminal, choice, answerForTesting) and the soloBlocked special
    case (soloBlocksPair) are gone, since every plain start now goes to the pair.

  • C1 stays. For --solo without a terminal, a saved Only me is refused in one line before this Mac's part is
    stopped or its saved start cleared. The local-first saved modes are untouched.

  • Words. Every line that names the way back now says start for the pair and start --solo for serving alone, and
    none points at darkbloom cluster to start the pair. That covers the service's line (ClusterPairWatch.line, shown
    by status), the Next: line of cluster status, restart's idle refusal and addendum, servingAloneLine and
    leftoverStopLine. servingAloneLine says "(the other Mac (…) isn't answering)" only while this Mac's cluster service
    runs, and so asked it (review nit 2). A started pair's line is said only while that service is down, when nothing asked.

  • "Cleared" only once true. The new Start.releaseLeftoverPartToServeAlone(pair) first prints leftoverStopLine
    ("stopping this Mac's leftover part and clearing its saved start"). Then it runs the release, waiting for a running
    command as cluster: a pair stays started when its automatic stop after an update fails #1888 made it. Only after a release does it print the new leftoverReleasedLine ("This Mac's leftover part
    of the pair stopped, and its saved start is cleared: serving this Mac alone."), with the follower's note on the Mac
    that follows. start --solo, restart and update use it. servingAloneLine no longer claims a clear, and start --solo records the solo choice (ClusterSoloChoice) only after the release.

  • No question without a terminal (G1).

    • The pair's question is gone (F1 above).

    • New Start.requireModelsNamedWithoutTerminal(mode:): a start for Darkbloom network or Both, me first that names no
      models (--model, --all) and has no terminal (stdin) says this on standard error, with no usage block, and exits
      64:

      Without a terminal, `darkbloom start` can't ask which models to serve: add --model <id> (`darkbloom models list` shows this Mac's models) or --all.
      
    • It is said right after resolveServing, before the schedule, the runtime, the preflight and any drain.

    • On a paired Mac, start --solo says it beside C1's checks, before the leftover part is stopped or its start
      cleared.

    • Only me serves the models already on the Mac and picks none, and the --foreground child never reaches the
      picker, so neither is affected.

  • status says what this Mac serves (J-5). When single-Mac serving runs on a paired Mac, a line under the pair
    block says so (Status.servingAloneLine). Its Daemon:, Serving:, Trust: and traffic lines follow, as
    status --solo prints them:

    ■ Stopped; last model Qwen 3.8 27B.
    Next: `darkbloom start` on either Mac starts the pair again.
    This Mac serves alone (single-Mac serving, process 43053), not the pair; its status is below.
    

    The "running beside the pair" line is gone. Without single-Mac serving here, status prints what it did before.

  • The merge of dev (docs: the first docs lead to local use, with one set of mode names (LS-5 docs) #1891). "Going back to serving on one Mac" keeps this PR's first sentence and docs: the first docs lead to local use, with one set of mode names (LS-5 docs) #1891's two
    commands and comments. The docs this PR touches use docs: the first docs lead to local use, with one set of mode names (LS-5 docs) #1891's names: Only me, Darkbloom network, Both, me
    first
    .

What each start does now

On a paired Mac Pair runs here Pair stopped Other Mac silent for 15 min Not served in its first 15 min, other Mac answers
start in a terminal the pair's screen the pair's screen (was: the question) the pair's screen (was: the question) the pair's screen (was: the question)
start in a script starts the pair starts the pair (was: served alone) starts the pair, waits ≤ 10 min, exit 5 (was: served alone) starts the pair
the app's Start serving (--model <id> [--local-endpoint], no terminal) starts the pair (was: refused) starts the pair (was: served alone) starts the pair, waits ≤ 10 min, exit 5 (was: served alone) starts the pair (was: refused)
start --model … in a terminal / autopilot enable refused, exit 64 refused, exit 64 (was: served alone) refused, exit 64 (was: served alone) refused, exit 64
start --solo [--model …] refused: stop the pair first serves alone stops the leftover part, then serves alone stops the part, then serves alone
start --solo without a terminal and without --model/--all refused: stop the pair first one line: add --model (exit 64) one line, part untouched (exit 64) one line, part untouched (exit 64)

On any Mac, a start without a terminal that names no models (and doesn't serve Only me) now says the same line
(exit 64). Before, it printed the numbered model list and read an answer from standard input.

The desktop app's Start on a paired Mac (the owner's decision on the review)

  • What it runs. Start serving runs darkbloom start --model <id> [--local-endpoint] --config <path> through
    DesktopWorker, with stdin /dev/null (DesktopBackend.arguments, DesktopWorker.swift:59). The app has no
    --solo.
  • Now it starts the pair, as a plain start does, in every state of the pair (Start.appStartOptions without a
    terminal give .startPair).
    • It never serves that Mac alone, and nothing reads stdin. The wait for the pair is the usual bounded one, with
      progress lines the app shows.

    • The pair serves its own model and its own way: --model and --local-endpoint change nothing there.

    • When the app named another model, a start that serves or is still loading (exit 0 or 3) ends with this line
      (ClusterPairSummary.appStartModelLine), which the app shows as the operation's message:

      This Mac serves in a pair: started the pair with Qwen 3.8 27B; `darkbloom cluster` changes its model.
      
    • appStartStartsThePair runs the app's own arguments from DesktopBackend.arguments against a stopped pair. It
      checks the pair's start (ensureService, serve), the line with another model and none with the pair's own, and no
      launchctl change.

  • Still refused:
    • start --model in a terminal, where a person can add --solo (modelInATerminalAndAutopilotAreRefused);
    • every other single-Mac option, for example Autopilot enroll (the app's, and darkbloom autopilot enable, both
      start --autopilot).
  • Before:
    • this PR's first version refused the app's Start in every state, in CLI words ("add --solo") the app's user can't act
      on;
    • from 0.10.9 to dev, it served the Mac alone while the pair didn't run there, and was refused while the pair ran.
  • Unchanged: the app's local mode (desktop start-local) refuses on a paired Mac
    (Desktop.StartLocal.pairRefusal). Its Stop and Restart run stop and restart.

Before And After

Before: behavior (v0.10.9 to dev d17f62905f)

flowchart TD
  start["darkbloom start on a paired Mac, without --solo"] --> runs{"Does the pair run here?"}
  runs -->|yes| opts1{"Single-Mac options, such as --model?"}
  opts1 -->|yes| refuse1["Refused by name, exit 64"]
  opts1 -->|no| pair1["Starts the pair: its screen in a terminal, its saved model in a script"]
  runs -->|"no: stopped, or the other Mac gone"| term{"A terminal, and no options?"}
  term -->|yes| ask["Asks: Serve on this Mac alone, or Start the pair"]
  term -->|"no: a script, the app's Start serving, autopilot enable"| alone["Serves this Mac alone"]
  words["stop and cluster status: 'darkbloom start starts the pair again'"] -.->|"false for a script"| alone
Loading

After: behavior

flowchart TD
  start["darkbloom start on a paired Mac"] --> solo{"--solo?"}
  solo -->|no| opts{"Single-Mac options, such as --model?"}
  opts -->|"only --model, --local-endpoint, no terminal: the app's Start"| app["Starts the pair with its own model; a line says so if the app named another"]
  opts -->|"any other, or in a terminal: autopilot enable, --network"| refuse["Refused by name at once, exit 64, in every state"]
  opts -->|no| pair["Starts the pair in every state: its screen in a terminal, its saved model in a script"]
  solo -->|yes| runs{"Does the pair run here?"}
  runs -->|yes| refuse2["Refused: stop the pair first"]
  runs -->|no| alone["Serves this Mac alone, after stopping a leftover part"]
Loading

Before: code flow of a release before serving alone (start --solo, restart, update)

sequenceDiagram
  participant C as start --solo, restart or update
  participant R as Start.releaseLeftoverPart
  participant S as ClusterService.releaseForSingleMac
  C->>C: print servingAloneLine ("... and its saved start is cleared ...")
  C->>R: release the leftover part
  R->>S: wait for the cluster command lock (up to 10 min)
  S-->>R: commandStillRunning
  R-->>C: "... so nothing was stopped or started", exit 1
  Note over C: The first line was false
Loading

After: code flow

sequenceDiagram
  participant C as start --solo, restart or update
  participant H as Start.releaseLeftoverPartToServeAlone
  participant R as Start.releaseLeftoverPart
  participant S as ClusterService.releaseForSingleMac
  C->>H: release before serving alone
  H->>H: print leftoverStopLine ("stopping ... and clearing its saved start")
  H->>R: release the leftover part
  R->>S: wait for the lock (up to 10 min), stop the part, clear the start
  alt released
    S-->>R: released
    H->>H: print leftoverReleasedLine ("... stopped, and its saved start is cleared: serving this Mac alone.")
    H-->>C: single-Mac serving starts
  else the command still runs after 10 min
    S-->>R: commandStillRunning
    R-->>C: "... so nothing was stopped or started", exit 1
  end
Loading

Before: G1, a start without a terminal and without --model (on a paired Mac whose pair is stopped, or any Mac)

flowchart TD
  start["darkbloom start or start --opencode, no terminal, no --model"] --> paired{"Paired Mac?"}
  paired -->|"yes, pair stopped"| alone["Serves this Mac alone (F1)"]
  paired -->|no| single["Single-Mac start"]
  alone --> picker["Numbered model list: reads standard input"]
  single --> picker
  picker -->|"input at its end"| none["'No models selected.'"]
  picker -->|"input that stays open"| hang["Waits forever"]
Loading

After: G1

flowchart TD
  start["darkbloom start or start --opencode, no terminal"] --> paired{"Paired Mac, no --solo?"}
  paired -->|yes| pair["Starts the pair; reads nothing"]
  paired -->|no| mode{"Only me, or models named?"}
  mode -->|yes| goes["Goes on; reads nothing"]
  mode -->|no| line["One line: add --model or --all; exit 64, before anything stops"]
Loading

Before and after: J-5, status on a paired Mac serving alone

flowchart LR
  subgraph before["Before"]
    b1["Pair block: Stopped"] --> b2["This Mac's settings"] --> b3["Line 27: 'running beside the pair (status --solo shows it)'"]
  end
  subgraph after["After"]
    a1["Pair block: Stopped"] --> a2["'This Mac serves alone (single-Mac serving, process N), not the pair'"] --> a3["This Mac's settings"] --> a4["Daemon, Serving, Trust and traffic lines"]
  end
Loading

Test plan

  • Red first (580c6de77d on d17f62905f): 7 filters fail with 27 issues, each for the reason below.
    • PairedMacStartTests: a plain start in each pair state; --solo; the app's arguments and Autopilot enroll; the words.
    • startWithoutATerminalStartsAStoppedPair: a script's start on a stopped pair starts it with its saved model, exit 0.
    • startInATerminalOpensAStoppedPairsScreen: the pair's screen opens, with no question.
    • appStartOnAStoppedPairIsRefused: exit 64, nothing touched.
    • soloStartSaysClearedOnlyOnceItIs, restartSaysClearedOnlyOnceItIs: no "cleared" before the wait or after a
      timeout, and the cleared line after a release.
    • ClusterPairWatchTests: the service's line.
  • Green (ba072c29f6), CPU-only, Xcode 27.2, nice -n 19:
    • the 7 red filters;
    • ClusterPairHabitCommandsTests, ClusterPairControlTests (27), UnpairedMacServesNormallyTests (14),
      ClusterPairValidatorFindingsTests (12), ClusterPairTruthTests, RestartCommandTests,
      DarkbloomCommandLookRunTests (17), DesktopActionArgumentsTests (9) and ClusterPairWatchTests (15).
  • All of DarkbloomCLITests: 1,193 tests in 174 suites pass. Metal-loading tests are skipped:
    localPreloadDisabled|LocalStartupPreloadGateTests|BenchmarkSweepExitTests. This ran on the fix before the last
    commit's test-title wording. The suites that commit touched were run again, and pass.
  • ProviderCoreTests Cluster*: 260 tests passed, 0 failed, before a Metal-needing test ended the CPU-only run.
    That is the sandbox, not this change. The only ProviderCore change is ClusterPairWatch.line's text, which
    ClusterPairWatchTests covers.
  • G1 and J-5, red first (be0aa8bddf). Standard input in these runs never answers (neverAnswering): a pipe
    this process keeps open, so a read waits, and an alarm ends a start that waits.
    • nonTerminalStartsStartThePairAndAskNothing checks that plain start, start --opencode and start --hermes
      without a terminal on a stopped pair start it. With the tool flags, one line names darkbloom cluster local.
    • soloWithoutATerminalNamesItsModels: start --solo gives the line (exit 64) and the leftover part is untouched.
    • singleMacStartWithoutATerminalNamesItsModels: the same line on a Mac that isn't paired.
    • statusSaysThisMacServesAlone: the line, then Daemon: running, and never "beside the pair".
    • On dev's code (ce9e92e030, the same as d17f62905f), the pair test fails with 7 issues: each start served
      alone, exit 1, and no pair action.
    • On this PR before the fix (f100859273), the pair test passes (F1). The other three fail: exit 1 with no line after
      the part was released; exit 1 with no line; no line and no Daemon: lines.
  • G1 and J-5, green (89f6733d4a): the four tests, and all of DarkbloomCLITests, 1,197 tests in 174 suites
    (Metal-loading suites skipped).
  • The review's nits, red first (3688e98d7a, on ac2992770c): 7 filters fail with 32 issues, each for the
    reasons below.
    • The app's Start exits 64 with the options refusal: appStartStartsThePair, and the decision tests that now pin the
      pair's start for it (PairedMacStartTests, UnpairedMacServesNormallyTests, startRefusesSingleMacOptions, the C1
      test's app half).
    • The line adds "(the other Mac (…) isn't answering)" with the service down (servingAloneSaysOnlyWhatItKnows).
  • Green at 3cb448c152: those tests, and all of DarkbloomCLITests, 1,212 tests in 175 suites (Metal-loading
    suites skipped). Two more tests that had pinned the refusal without a terminal now run in one:
    startWithAModelOnThePair and refusalsDrawNoMark.
  • make docs-check (211 files), scripts/docs-impact-check.py (22 files, coverage OK), make changelog-check
    (42), git diff --check, after each merge with dev too.
  • Not run on hardware. No darkbloom CLI runs on this Mac. A pair-2 check would be darkbloom-dev stop on the
    leader, then without a terminal darkbloom-dev start </dev/null (expect the pair to start), then the app's Start
    serving
    (expect the two lines, failed).

Components touched

  • provider-swift (Swift CLI)
  • docs

Protocol / interface changes

  • No protocol/interface changes
  • Yes: CLI behavior on a paired Mac, described above. There are no wire, config-key or flag changes.

Documentation impact

  • Canonical documentation updated:
    • cli-reference.md: the paired-Mac start section, the options table, restart;
    • two-mac-cluster.md: the commands table, the saved Only me, "Going back to serving on one Mac";
    • troubleshooting.md: the start row, and a new row for the app's refusal;
    • agent-setup.md: rule 11 and two table rows;
    • architecture/inference.md;
    • local-first.md: no terminal, no question, and Two Macs.
    • These pages use docs: the first docs lead to local use, with one set of mode names (LS-5 docs) #1891's names.

Changelog

Notes for reviewers

  • This changes behavior for 0.10.9 to 0.10.11 users, by the owner's decisions.
    • A script's or the app's start on a paired Mac whose pair doesn't run no longer serves the Mac alone: it starts the
      pair.
    • The app can't serve a paired Mac alone; the person runs darkbloom start --solo --model <id> in a terminal.
      Autopilot enroll needs --solo, which the app can't pass, so the app's enroll on a paired Mac shows the CLI's
      refusal. That is left for an app change, like the review's suggested "Start the pair / Serve this Mac alone" choice.
  • The model line applies on any Mac. A start without a terminal that names no models (and doesn't serve Only
    me
    ) no longer reads a selection from standard input, so a script that piped one in (echo 1 | darkbloom start)
    now gets the line and exit 64. Piped selection wasn't documented; --model and --all are the way to name models.
    darkbloom autopilot enable without a terminal gets the same line, and its next command is darkbloom start --autopilot --model <id>.
  • A pty with nobody at it is still a terminal. That was journey 1's exact case (script … < /dev/null). A start
    there opens the pair's screen, which waits for keys, like any terminal program.
  • A script's start with the other Mac gone waits up to 10 minutes and exits 5, the same as cluster status. It no
    longer serves alone; start --solo does that.
  • Pre-existing: the options refusal says "add --solo". For autopilot enable, which takes no --solo, the command is
    darkbloom start --solo --autopilot. The text is unchanged here.
  • Without a terminal, --model now starts the pair for a script too, not only for the app: the CLI can't tell them
    apart. The model line says which model serves.
  • start --solo without a model and without a terminal still records the solo choice before the model picker fails
    (b3-restart.md §3, minor). The record is now made after the release, never before a release that fails.
  • The cluster's own starts (--cluster-member, --distributed, the service's solo part) and launchd's --foreground
    child are never redirected, as before (startsSingleMacServing, startedByClusterService).

Refactor Pass

Status: done (3722107f66, by the refactor pass). It changes no behaviour, and no test expectation is removed or
loosened.

  • Start.requireModelsNamedWithoutTerminal(mode:) is the one models check, used twice.
  • ClusterPairSummary.leftoverPartHere is the one predicate for a leftover part, used by start --solo, restart,
    update and stop.
  • The comments are in plain words.

The review then checked the head (review-1892-1895.md): it approves with nits. The fixes since (3688e98d7a,
3cb448c152) touch the app's Start decision, one line and the docs, and are covered by the tests above.

jonathan308 and others added 2 commits November 7, 2026 12:13
…es alone, and "cleared" only once true (red)

The owner's rule (2026-11-07): on a paired Mac, `darkbloom start` (terminal or
not) starts the pair again, as `stop` and `cluster status` already say, and
`darkbloom start --solo` is the one way to serve this Mac alone (b3-restart.md
§3). On DevNet pair-2, a script's `start` on the stopped pair served this Mac
alone and stopped at the model picker.

- PairedMacStartTests: a plain start gives `.startPair` (`.openScreen` in a
  terminal) whether the pair is stopped, given up here, loading or running.
  `--solo` serves alone wherever the pair doesn't run here. Single-Mac options
  without `--solo` (the app's Start `start --model <id> --config <path>`,
  Autopilot enroll) are refused by name. The words name `start` for the pair
  and `start --solo` for serving alone: restart's idle refusal, `cluster
  status`'s next line, and `servingAloneLine`, which no longer says "cleared"
  before anything is.
- CLI runs:
  - a script's `start` on a stopped pair starts it with its saved model (exit 0);
  - `start` in a terminal opens the pair's screen with no question first;
  - the app's Start there is refused at once (exit 64) and touches neither the
    pair nor launchd.
- The saved start is said cleared only once it is (#1888 review nit):
  `start --solo` and `restart` print the progressive line, then the wait, and
  never "its saved start is cleared" when the running cluster command outlasts
  the wait. After a release the cleared line comes after it.
- ClusterPairWatchTests: the service's line names `start --solo` and `start`.

On d17f629: 7 filters fail with 27 issues, each for the reason above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… serves alone, and "cleared" only once true

The owner's rule (2026-11-07): on a paired Mac, `darkbloom start`, in a
terminal or not, starts the pair again, and `darkbloom start --solo` is the
one way to serve this Mac alone. Since 0.10.9 a `start` without a terminal
on a pair that didn't run here served the Mac alone, and one in a terminal
asked first, while `stop`, `cluster stop --help` and `cluster status` said
`darkbloom start` starts the pair (b3-restart.md section 3; on DevNet pair-2
a script's `start` served the Mac alone and stopped at the model picker).

- `Start.pairStart`: unreadable pairing as before; `--solo` serves alone while
  the pair doesn't run here and is refused while it does (C1's refusals of a
  saved Only me without a terminal stay, before anything is stopped); single-
  Mac options without `--solo` are refused by name (exit 64) in every state;
  otherwise the pair's screen in a terminal, its saved model without one.
  The terminal's question (`.choose`, `chooseInTerminal`, `choice`), the
  `soloBlocked` special case and `soloBlocksPair` are gone: every plain start
  is the pair's now.
- The desktop app's Start serving (`start --model <id> --config <path>`,
  stdin /dev/null) on a paired Mac is refused at once with the two lines the
  app shows as the failed operation (exit 64), before C1's check, the pair or
  launchd is touched; it never waits. Before, it served the Mac alone while the
  pair didn't run here. `autopilot enable` likewise.
- Words: `start` for the pair and `start --solo` for serving alone in the
  service's line (`ClusterPairWatch.line`), `cluster status`'s Next line,
  restart's idle refusal and addendum, `servingAloneLine` and
  `leftoverStopLine`; none sends to `darkbloom cluster` to start the pair.
- "Its saved start is cleared" only once it is (#1888 review): new
  `Start.releaseLeftoverPartToServeAlone` says `leftoverStopLine`, then
  releases (waiting for a running cluster command, as #1888 made it), then
  `leftoverReleasedLine`, with the follower's note on a member. `start --solo`,
  `restart` and `update` use it; `servingAloneLine` no longer claims a clear,
  and `start --solo` records the solo choice only after the release.
- Tests: the red tests pass; existing tests that pinned the 0.10.9 design
  (scripts and the app serving alone, the terminal's question) now pin the
  rule. Docs: cli-reference, two-mac-cluster, troubleshooting, agent-setup,
  architecture/inference; changelog fragment, and #1887's pending fragment's
  quoted commands brought to the new words.

Green (CPU-only, Xcode 27.2): all of DarkbloomCLITests, 1193 tests in 174
suites (Metal-loading suites skipped), and ProviderCoreTests'
ClusterPairWatchTests (15).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 7, 2026
Review of #1891: docs must match the code at every merge, so no rendered
sentence may promise unmerged work.

- Every sentence that described LS-1..LS-4 or R-FULL as present now says
  what dev does: Only me serves the downloaded models in its Terminal
  window, with no model list or memory question, and stops a background
  service first; `darkbloom start --choose` switches; ports are
  `[local] port` or 8000 for `--local`, `--local-endpoint` and the app, the
  first free from 8001 for the question and `--me-first`; a pair's Both has
  no member relay; tools wait 30 s for the local API and take the catalog's
  limits until a model loads ("run it again" is back). The target sentences
  stay only as `<!-- pending LS-n: … -->` / `<!-- pending R-FULL: … -->`.
- A fresh shell doesn't have the installer's PATH line: the README, the
  quickstart and installation say "exec $SHELL -l, or open a new Terminal
  window", and the installer's last line prints the full path,
  `Next: ~/.darkbloom/bin/darkbloom start --opencode`.
- No doc describes the new installer lines as what `curl | bash` prints:
  the served copy is the old script until the platform updates it.
- A mode flag isn't saved, but the LaunchAgent keeps it until the next
  `start` (local-first, the cli-reference rows and step 1, configuration).
- OpenCode's default model: unchanged only when its config already sets
  one; otherwise Darkbloom's first model, as the `Use it:` line says.
- The quickstart's order is Terms, the question, then the checks; the two
  optional questions say to answer n; the agent-setup pair port and
  two-mac-cluster's Both section, member status lines included, are dev's
  again; two-mac-cluster's edits are kept small beside #1892.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 3 commits November 7, 2026 14:28
…t-truth

One conflict, in docs/provider/two-mac-cluster.md ("Going back to serving on
one Mac"), where both sides give the same two commands. Resolved with this
branch's first sentence (on a paired Mac, plain `darkbloom start` always
starts the pair, in a terminal or not, also after `darkbloom stop`) and
#1891's commands and comments (`darkbloom stop` on either Mac stops the pair
on both; then `darkbloom start --solo` on each Mac serves that Mac alone).

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

Journey 1 on pair-2 (`local-first/validation-evidence/journey-1.md`):
- J-9 / G1: `darkbloom start --opencode` that got no answer hung on "Serve on
  this Mac alone / Start the pair". The owner's rule: no start ever asks a
  question without a terminal.
- J-5: on a paired Mac that served alone, `status` said only "Single-Mac
  serving: running beside the pair (`status --solo` shows it)", 27 lines down,
  with no `Serving:` line.

Standard input in these runs never answers (`neverAnswering`: a pipe this
process keeps open, so any read waits; an alarm ends a start that reads).

- A start without a terminal on a paired Mac whose pair is stopped starts the
  pair and reads nothing, plain and with --opencode or --hermes. The pair here
  serves through Darkbloom only, so each tool flag ends with the one line that
  names `darkbloom cluster local`, and Darkbloom keeps serving.
- `start --solo` without a terminal and without --model asks nothing: one line
  that names --model or --all (exit 64), before this Mac's leftover part is
  stopped.
- On a Mac that isn't paired, the same start says the same line instead of
  waiting on the picker's numbered list.
- `status` on a paired Mac that serves alone says so under the pair block, then
  shows single-Mac serving's own lines, and never "beside the pair".

On #1892's head f100859: the pair test passes (F1 removed the question),
and the other three fail for the reasons above (exit 1 instead of 64 with no
line, after the leftover part was released; no line and no Daemon lines in
status). On d17f629 the pair test fails too (the start serves alone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… what this Mac serves

Journey 1 on pair-2 (`local-first/validation-evidence/journey-1.md`):

- G1 / J-9: no start ever asks a question without a terminal. F1 already
  removed the pair question ("Serve on this Mac alone / Start the pair"): a
  start on a paired Mac without a terminal, with or without --opencode or
  --hermes, starts the pair and reads nothing. The last question a start asked
  without one was the model picker's numbered list (no --model, no --all, for
  Darkbloom network or Both, me first). It read standard input and waited
  forever on one that stays open. That start now stops in one line on standard
  error and exits 64: "Without a terminal, `darkbloom start` can't ask which
  models to serve: add --model <id> (`darkbloom models list` shows this Mac's
  models) or --all." (`Start.modelsRefusalWithoutTerminal`).
  - It is said after `resolveServing`, before the schedule, the runtime, the
    preflight and any drain. On a paired Mac, `start --solo` says it with
    C1's checks, before its leftover part is stopped or its start cleared.
  - Only me picks no models, and the --foreground child never reaches the
    picker, so neither is affected.
- J-5: on a paired Mac that serves alone (single-Mac serving runs here; the
  pair and it share the one serving lock), `status` says so under the pair
  block: "This Mac serves alone (single-Mac serving, process <N>), not the
  pair; its status is below." (`Status.servingAloneLine`). Single-Mac serving's
  own Daemon, Serving, Trust and traffic lines follow, as `status --solo` shows
  them. It no longer says "running beside the pair" at the end, and without
  single-Mac serving here nothing changes.
- Docs, in #1891's names: cli-reference (how this Mac serves, status),
  local-first (no terminal, no question; two Macs), two-mac-cluster (going
  back to one Mac; status), troubleshooting (the new line), agent-setup
  (rule 11 and its row); the changelog fragment.

Green (CPU-only, Xcode 27.2): the four new tests, and all of
DarkbloomCLITests, 1197 tests in 174 suites (Metal-loading suites skipped).

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

vercel Bot commented Nov 7, 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 8, 2026 3:37am UTC
d-inference-console-ui-dev Error Error Nov 8, 2026 3:37am UTC
d-inference-landing Ready Ready Preview Nov 8, 2026 3:37am UTC
darkbloom-status Ready Ready Preview Nov 8, 2026 3:37am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 8, 2026 3:37am UTC

Request Review

…icate, plain comments

The refactor pass (AGENTS.md) on #1892. Behaviour is unchanged, and no test
expectation is removed or loosened.

- `Start.requireModelsNamedWithoutTerminal(mode:)` replaces
  `modelsRefusalWithoutTerminal(terminal:)` and its two copies in `run()` of
  "print the line, exit 64" (the paired `start --solo` check, and the one after
  `resolveServing`). Its guard is exactly what reaches the model picker: not
  Only me, not launchd's --foreground child, no --model, no --all, and standard
  input not a terminal. Its doc states the rule: no start asks without a
  terminal.
- `ClusterPairSummary.leftoverPartHere` (the pair doesn't run here, yet its
  saved start and this Mac's cluster service are left) replaces
  `Update.leftoverPartHere` and the same condition spelled out in `start
  --solo`, `restart` and `stop`. The four callers of the leftover release now
  read alike.
- Doc comments: `PairStart.serveAlone` says its note is said only where no
  leftover part runs; otherwise the release's own lines are said, "cleared"
  only once it is. `servingAloneLine` and `pairIdle` likewise.
- Tests: comments in plain words, without ticket names, and true to the code.
  The stale pair's one line is never said before a release, and a script's
  `start --solo` meets the saved Only me while the app's Start meets the
  options refusal. `goOnline` is now `appStart`. `updateChoice` checks the
  predicate on the summary, with this Mac's cluster service down too. New:
  without a terminal, Only me and launchd's child are not refused for naming
  no models. That was the one mutant no test caught.
- Docs: cli-reference names the new function.

Checks (Xcode 27.2, prod identity, nice 19, CPU only, sandboxed): all of
DarkbloomCLITests, 1,198 tests in 174 suites (1,197 at the PR head), and
ClusterPairWatchTests (15). Ten mutants, each caught. docs-check,
docs-impact (base ce9e92e), changelog-check and diff --check are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 3 commits November 7, 2026 19:14
…ruth

No conflicts. #1895 brings F2 (the following Mac's verdict), which this branch's
words (`start --solo` / `start` in `ClusterPairWatch.line`) sit beside;
#1896's one port per Mac and #1889's memory replan touch none of this branch's
decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t answering" only when asked (red)

The owner's decision on #1892's review (nit 1): the desktop app's Start serving
(`DesktopBackend.arguments`: `start --model <id> [--local-endpoint] --config
<path>`, standard input /dev/null) has no --solo, so on a paired Mac it starts
the pair, as a plain start does. It never serves this Mac alone and never
hangs. When it asked for another model than the pair's, one line the app shows
says which model the pair started with and that `darkbloom cluster` changes it.

- appStartStartsThePair runs the app's own arguments, from
  `DesktopBackend.arguments`, against a stopped pair. With another model it
  starts the pair (ensureService, serve) and ends with that line. With the
  pair's model it says nothing more. It touches no launchctl and reads no input.
- modelInATerminalAndAutopilotAreRefused: in a terminal `start --model` stays
  refused by name (the person can add --solo); Autopilot enroll stays refused.
- servingAloneSaysOnlyWhatItKnows (nit 2): a started pair's serving-alone line
  is said only while this Mac's cluster service is down, when nothing asked
  the other Mac, so it never says the other Mac "isn't answering"; with the
  service up and the other Mac silent, it still does.
- The tests that pinned the app's refusal now pin the pair's start:
  startRefusesSingleMacOptions, the C1 test's app half (it never meets the
  saved Only me), and PairedMacStartTests and UnpairedMacServesNormallyTests'
  decisions.

On ac29927: 7 filters fail with 32 issues, each for these reasons (the
app's Start exits 64 with the options refusal; the line adds "(the other Mac
(…) isn't answering)").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nswering" only when asked

#1892's review, nits 1-3, with the owner's decision on nit 1:

- The desktop app's Start serving (`DesktopBackend.arguments`: `start --model
  <id> [--local-endpoint] --config <path>`, no terminal) on a paired Mac starts
  the pair, as a plain `start` does, in every state of the pair. It never
  serves that Mac alone and never waits for an answer.
  - `Start.appStartOptions` (`--model`, `--local-endpoint`) without a terminal
    give `.startPair`.
  - In a terminal, where a person can add --solo, `start --model` stays refused
    by name, and so do other single-Mac options such as `--autopilot` anywhere.
  - The pair serves its own model and its own way. When the app named another
    model, a start that serves or is loading (exit 0 or 3) ends with one line
    the app shows: "This Mac serves in a pair: started the pair with <the
    pair's model>; `darkbloom cluster` changes its model."
    (`ClusterPairSummary.appStartModelLine`).
- `servingAloneLine` says "(the other Mac (…) isn't answering)" only while this
  Mac's cluster service runs and so asked it, as `restart`'s sentence already
  does. A started pair's line is said only while that service is down, when
  nothing asked.
- agent-setup: the stale **Serve on this Mac alone** is gone from the row on
  single-Mac serving that blocks the pair (and its missing full stop). Rule 11
  and the start paragraph say what `--model` does now.
- Docs: cli-reference (paired start, options table, the serving-alone line),
  two-mac-cluster, local-first, troubleshooting (the refusal row, and a row for
  the app's line), agent-setup; the changelog fragment. #1884's pending
  fragment now says `start --solo` for the saved Only me's refusal.
- Two more tests pinned the refusal without a terminal and now run in one:
  `startWithAModelOnThePair` and `refusalsDrawNoMark`.

Green (CPU-only, Xcode 27.2): the red commit's tests, and all of
DarkbloomCLITests, 1212 tests in 175 suites (Metal-loading suites skipped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308
jonathan308 marked this pull request as ready for review November 8, 2026 04:15
@jonathan308
jonathan308 merged commit 9f41e9c into dev Nov 8, 2026
25 of 27 checks passed
jonathan308 added a commit that referenced this pull request Nov 8, 2026
Brings #1896, #1889, #1895 and #1892 in, so the review's fixes for #1896's
new long-form line apply to today's code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
…ding 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>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
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>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
#1892 (F1): on a paired Mac a plain `start`, the app's Start included,
starts the pair. This PR: a saved Only me needs no terminal. The rule
the conflicts are resolved with (the orchestrator's): pair membership
wins. On a paired Mac a plain `start`, with or without a terminal,
starts the pair; `[local] mode` is single-Mac serving's, so it applies
where the Mac isn't paired, or with `--solo`.

- ClusterPairCommandsTests: the pair's saved Only me without a terminal.
  The app's Start starts the pair (ensureService, serve; the part is not
  released; no refusal). `start --solo` serves this Mac alone, Only me in
  the background: the part is released first and the start goes ahead,
  never refused (#1892's test expected the refusal Only me no longer has).
- StartModelSelection: both, #1892's `requireModelsNamedWithoutTerminal`
  and this PR's `selectStartupModels` doc; its comment now says Only me
  without a terminal takes the last selection, never the picker.
- local-first.md: this PR's bullets (the saved choice at login, restart
  and update; scripts and the app serve it, Only me included, asking
  nothing) with #1892's "The models:" and "On a Mac in a pair" bullets,
  which now add that the saved choice applies with `--solo`.
- troubleshooting.md: #1892's row and this PR's no-model row.
- two-mac-cluster.md: a saved Only me is this Mac's alone: `--solo`
  serves it in the background; without `--solo`, `start` starts the pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
#1892 (f1-pair-start: on a paired Mac `start` starts the pair, `--solo` serves alone, and the app's Start starts the
pair) landed after the dev merge above. One conflict, in StartCommand+Tools.swift: setUpToolsBesidePair's doc and
signature. This branch's signature and doc are kept, with #1892's sentence that the app's Start options
(Start.appStartOptions) don't change what the pair serves. #1892's two calls, setUpToolsBesidePair(), take the
defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
…1901; #1892) into rfull/local-capabilities-prefill-progress

No textual conflicts. Both behaviours kept:
- #1893's paged-slot admission refusal (6d8cbab) throws before any stream exists, before
  the bridge's accept(promptTokens:) (EngineV2Bridge+Submission.swift), so a streamed request
  it refuses gets its 503 and starts no prefill-progress timer, like the shared KV refusal.
- #1901's `darkbloom --opencode`/`--hermes` shortcut keeps `start --opencode` working, which
  #1897's docs name; its tool-integration changes are messages only, and the served-here rule
  in IntegrationModels is untouched.
- #1892 (pair start) touches neither the model lists nor the progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 8, 2026
…where it starts the pair

On a paired Mac the app's Start sends `{ action: 'start', models: [],
local: false }`, and `DesktopAction.validate()` refused it before anything
ran: "Choose at least one model". So the onboarding's Start serving never
started the pair.

- `DesktopAction.validate(startsThePair:)` takes a `start` without models
  (and without `local`) only when `startsThePair` says that start starts this
  Mac's pair. Its default, `false`, keeps every other start as it was.
- `DesktopBackend.submit` asks `DesktopBackend.startsThePair` with
  `ClusterPairSummary.local()`, read only for such a start. It uses `paired`,
  the test `start` makes:
  - on a paired Mac the request is taken, and `start --config <path>` runs; the
    CLI starts the pair with its own model, as F1 (#1892) decided;
  - on a Mac that isn't paired it is refused at once, as before: 400 "Choose at
    least one model";
  - a pair with no model yet is 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.", instead of running a start that would say "starting the
    pair" first;
  - an unreadable pairing record counts as paired, as in `start`, which then
    refuses without --solo in its own words.
  Local mode and `switch` still name their models.
- Tests: the red commit's appStartAsPosted passes; new
  startWithoutModelsOnlyStartsAPair pins the rule (not paired, paired, an
  unreadable record, no model; local mode and switch still refused).
- Docs: developer/desktop-app.md (a start with no models), the desktop control
  API's `start` row, and the changelog fragment (the one line for a pair with no
  model).

Checks (Xcode 27.2, prod identity, nice 19, CPU only, sandboxed):
DarkbloomCLITests, 1,196 tests in 171 suites, without the suites that run the
built binary and the two Metal tests. The desktop app: 675 tests in 101 files,
tsc --noEmit and prettier --check. docs-check, docs-impact (base 9f41e9c),
changelog-check and diff --check are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 added a commit that referenced this pull request Nov 9, 2026
* 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…

This branch had an error being deployed

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