diff --git a/changelog.d/app-on-a-paired-mac.md b/changelog.d/app-on-a-paired-mac.md index 9bdd3e82b3..4e89fe43d2 100644 --- a/changelog.d/app-on-a-paired-mac.md +++ b/changelog.d/app-on-a-paired-mac.md @@ -1,7 +1,7 @@ ### The app on a paired Mac offers Start serving, and its lines say what happened -- On a Mac in a two-Mac pair, the app's Autopilot was a dead end. Onboarding's **Start serving with Autopilot** first downloaded a model, then showed three lines meant for the command line, and **Retry** showed them again. Autopilot chooses the models of one Mac, so on a paired Mac it is now refused before anything downloads, in words the app shows: "This Mac serves in a pair; Autopilot isn't available for pairs yet. Use Start serving." The Autopilot page's model refresh is refused the same way. -- The app now offers **Start serving** on a paired Mac, which starts the pair. Its onboarding says "This Mac serves in a pair. Start serving starts the pair with .", and it starts the pair without naming a model or a local API of its own. When the pair has no model yet, it says so in one line: "No model was chosen for the pair yet: run `darkbloom start` in a terminal to choose one." The Mac tells the app it is in a pair, so even an app from before this offers the plain start there. +- On a Mac in a two-Mac pair, the app's Autopilot was a dead end. Onboarding's **Start serving with Autopilot** first downloaded a model, then showed three lines meant for the command line, and **Retry** showed them again. Autopilot chooses the models of one Mac, so on a paired Mac it is now refused before anything downloads, in words the app shows: the pair's state and what works there, for example "This Mac is in a pair, which is stopped; Autopilot isn't available for pairs yet. Use Start serving." The Autopilot page's model refresh is refused the same way. +- The app now offers **Start serving** on a paired Mac, which starts the pair. Its onboarding says the pair's state and what Start serving does there, for example "This Mac is in a pair, which is stopped. Start serving starts it with ." ("This Mac serves in a pair …" only while it serves), and it starts the pair without naming a model or a local API of its own. When the pair has no model yet, the page offers no Start serving: it says to choose one with “darkbloom cluster” in Terminal on the Mac that leads the pair. The Mac tells the app it is in a pair, so even an app from before this offers the plain start there. - After the app's Start on a paired Mac, its last lines say what happened. When the app named another model, the pair "serves" its own model, or "was asked to start" with it and "isn't serving" when it doesn't serve yet. Before, it said "serves in a pair: started the pair" in both cases, and also for a pair that was already running. When the app asked for a local API that the pair doesn't give this Mac, it now says "No local API was added on this Mac", with where to change how the pair serves. - When the app's runtime refuses an action, the app's notice now shows only the refusal's own words, without "Error invoking remote method …" in front of them. - When a pair's other Mac isn't answering and this Mac's part was given up after 15 minutes, a start's `Next:` line and `cluster status --json`'s `next` now also name `darkbloom start --solo` to serve this Mac alone. diff --git a/changelog.d/pair-words-and-pause.md b/changelog.d/pair-words-and-pause.md new file mode 100644 index 0000000000..bea73ceaac --- /dev/null +++ b/changelog.d/pair-words-and-pause.md @@ -0,0 +1,8 @@ +### A paired start says what it does, Apple's check reads as progress, and both Macs show the pause + +- A script's `darkbloom start` on a pair that already serves now says `…: the pair already serves.`, shows the result block and exits 0, without asking either Mac to start again. Before, it said "starting the pair". +- `darkbloom start` in a terminal no longer says "starting the pair" before a screen where nothing starts until you choose. On the leading Mac of a stopped pair it says "Press Enter to start it with Qwen 3.8 27B (last used), or choose another model." (or "Choose its model to start it."), and otherwise "opening the pair's screen". +- During a normal pair start, each Mac's new part waits about a minute for Apple's check (App Attest). Status and a script's start now say `… is not serving yet: checking both Macs with Apple.`, read as loading. Before, every healthy start said "This Mac isn't verified by Apple yet; … Don't restart either Mac until then." for both Macs. That warning now comes only once a Mac's part has run 2 minutes without the check, or its key-generation safeguard holds it back. +- While a pair that serves Both, me first is paused for you, `darkbloom status` and `darkbloom cluster status` on the Mac that follows now say so under the pair's line too, with how long and when it comes back. Before, that Mac said only "✓ Serving … through Darkbloom". The leading Mac's status carries the pause, which the other Mac already asks for, so nothing new crosses the cable. +- A pair with no model yet: a script's `darkbloom start`, and the app, now say to choose one with `darkbloom cluster` in a terminal on the Mac that leads the pair, which has the model list: ``No model was chosen for the pair yet: choose one with `darkbloom cluster` in a terminal on this Mac.`` Before, they said to run `darkbloom start` in a terminal, which on the Mac that follows opens a screen that can't choose one. +- Pause times are said from now: "paused for 10 minutes", "back in about 2 minutes if you stay idle". Before, they were clock times in the Mac's own time zone, which no line named, such as "since 21:41" read over SSH at 05:41 UTC. This applies to one Mac's `Serving:` line and to the pair's `Pair:` line. diff --git a/desktop-app/src/renderer/components/onboarding/ServingSummary.tsx b/desktop-app/src/renderer/components/onboarding/ServingSummary.tsx index 0dcb0e792a..11dd0e463b 100644 --- a/desktop-app/src/renderer/components/onboarding/ServingSummary.tsx +++ b/desktop-app/src/renderer/components/onboarding/ServingSummary.tsx @@ -17,7 +17,10 @@ function machineLine({ machine, eligibility }: Snapshot) { } function startingLine(snapshot: Snapshot, method: StartMethod, pinned: string[]) { - if (snapshot.pair) return `Starts the pair with ${pairModel(snapshot.pair)}, on both Macs.`; + if (snapshot.pair) + return snapshot.pair.state === 'serving' + ? `Keeps the pair serving ${pairModel(snapshot.pair)}, on both Macs.` + : `Starts the pair with ${pairModel(snapshot.pair)}, on both Macs.`; const ids = startModels(snapshot, method, pinned); const chosen = snapshot.models.filter((model) => ids.includes(model.id)); if (!chosen.length) return 'Choose a model in Advanced to start.'; diff --git a/desktop-app/src/renderer/components/onboarding/StartServing.tsx b/desktop-app/src/renderer/components/onboarding/StartServing.tsx index c16b526e87..24a4fb6f6f 100644 --- a/desktop-app/src/renderer/components/onboarding/StartServing.tsx +++ b/desktop-app/src/renderer/components/onboarding/StartServing.tsx @@ -8,7 +8,9 @@ import { ServingSummary } from './ServingSummary'; import { pinnedMemory, startingModel } from '../../models/selection'; import { methodFor, - pairModel, + pairBlocked, + pairLead, + pairStartable, startAction, startModels, usablePins, @@ -33,10 +35,11 @@ const copy: Record }; // A paired Mac starts its pair (`startAction`), never Autopilot, which serves one Mac: the plain -// start's page, with the pair's words. +// start's page, with the pair's words, and why there is no Start where the pair needs Terminal. const pairCopy = (pair: NonNullable) => ({ ...copy.manual, - lead: `This Mac serves in a pair. Start serving starts the pair with ${pairModel(pair)}.`, + lead: pairLead(pair), + empty: pairBlocked(pair), }); function accountLine(snapshot: Snapshot) { @@ -75,7 +78,7 @@ export function StartServing({ const recommended = method === 'autopilot' && !pins.length ? recommendedModels(snapshot.models, network) : []; const showRecommendations = recommended.length > 0; - const empty = !pair && !startModels(snapshot, method, pinned).length; + const empty = pair ? !pairStartable(pair) : !startModels(snapshot, method, pinned).length; const tooLarge = pinnedMemory(snapshot, pins).exceeds; const running = snapshot.operations.find((operation) => operation.state === 'running'); // Serving needs a linked account: an unlinked Mac goes back to link it first. @@ -86,7 +89,7 @@ export function StartServing({ {!showRecommendations && ( <>

{text.lead}

- + {!(pair && empty) && } )} {serving.rejected && method === 'manual' && ( diff --git a/desktop-app/src/renderer/components/onboarding/startPlan.ts b/desktop-app/src/renderer/components/onboarding/startPlan.ts index b16a826d10..36d7ee1376 100644 --- a/desktop-app/src/renderer/components/onboarding/startPlan.ts +++ b/desktop-app/src/renderer/components/onboarding/startPlan.ts @@ -24,8 +24,52 @@ export function startModels(snapshot: Snapshot, method: StartMethod, pinned: str return model ? [model.id] : []; } +type Pair = NonNullable; + // How onboarding names the pair's model: its name, or "its model" before the pair has one. -export const pairModel = (pair: NonNullable) => pair.model ?? 'its model'; +export const pairModel = (pair: Pair) => pair.model ?? 'its model'; + +// Whether Start serving can start the pair. A pair with no model yet, or whose pairing record can't +// be read, needs Terminal first, so the page offers no Start there and says why: the runtime +// refused that Start (#1905's review). +export const pairStartable = (pair: Pair) => pair.model !== null && pair.state !== 'unreadable'; + +// Why the page offers no Start serving on this pair (`pairStartable`), under the button. +export const pairBlocked = (pair: Pair) => + pair.state === 'unreadable' + ? 'Check the pairing in Terminal first.' + : 'Choose the pair’s model in Terminal first.'; + +// Where the pair's model is chosen: on the Mac that leads it. +const leadingMac = (pair: Pair) => + pair.leads === true + ? 'on this Mac' + : pair.leads === false + ? 'on the other Mac, which leads the pair' + : 'on the leading Mac'; + +// The pair as it is, from the runtime's own view, then what Start serving does there: "serves" only +// when the runtime says it serves (#1905's review). An older runtime says no state: its words are +// true in every state. +export function pairLead(pair: Pair): string { + if (pair.state === 'unreadable') + return 'This Mac’s pairing record couldn’t be read, so it may be in a pair. Run “darkbloom cluster” in Terminal on this Mac to check it.'; + if (pair.model === null) + return `This Mac is in a pair that has no model yet. Choose one with “darkbloom cluster” in Terminal ${leadingMac(pair)}, then come back to Start serving.`; + const model = pair.model; + switch (pair.state) { + case 'serving': + return `This Mac serves in a pair with ${model}. Start serving keeps it serving.`; + case 'started': + return `This Mac is in a pair, started with ${model}. Start serving makes sure it serves.`; + case 'not_running': + return `This Mac is in a pair that isn’t running here. Start serving starts it with ${model}.`; + case 'stopped': + return `This Mac is in a pair, which is stopped. Start serving starts it with ${model}.`; + default: + return `This Mac is in a pair. Start serving starts the pair with ${model}.`; + } +} // On a paired Mac a start starts the pair, never this Mac alone, and the pair serves its own model // and its own local API, so the action names neither. diff --git a/desktop-app/src/shared/contracts.ts b/desktop-app/src/shared/contracts.ts index 8d4784c9d5..0a48d3dde3 100644 --- a/desktop-app/src/shared/contracts.ts +++ b/desktop-app/src/shared/contracts.ts @@ -89,10 +89,15 @@ export interface Snapshot { account_revision?: string; resource_revision?: string; capabilities?: string[]; - // The two-Mac pair this Mac is in, with its model (the name, else the ID; null until the pair - // has one). Null when this Mac isn't paired; absent from older runtimes. Start serving starts - // the pair. - pair?: { model: string | null } | null; + // The two-Mac pair this Mac is in: its model (the name, else the ID; null until the pair has + // one), its state from this Mac's own view, and whether this Mac leads it, so chooses its model + // (null when not known). Null when this Mac isn't paired; absent from older runtimes, and + // `state` and `leads` from runtimes before they were reported. Start serving starts the pair. + pair?: { + model: string | null; + state?: 'serving' | 'started' | 'not_running' | 'stopped' | 'unreadable'; + leads?: boolean | null; + } | null; account?: { signed_in: boolean; email?: string | null; diff --git a/desktop-app/tests/actionRefusal.test.tsx b/desktop-app/tests/actionRefusal.test.tsx index 93f0af58f8..e1b640c23f 100644 --- a/desktop-app/tests/actionRefusal.test.tsx +++ b/desktop-app/tests/actionRefusal.test.tsx @@ -14,7 +14,7 @@ afterEach(() => { // with no model yet. The real `useBackend` and failure toast show only the action's own words. it('shows a refused action’s own words in the failure toast, without Electron’s prefix', async () => { const words = - 'No model was chosen for the pair yet: run `darkbloom start` in a terminal to choose one.'; + 'No model was chosen for the pair yet: choose one with `darkbloom cluster` in a terminal on this Mac.'; const refusal = new Error(`Error invoking remote method 'backend:act': Error: ${words}`); (window as any).darkbloom = { status: async () => ({ state: 'ready' }), diff --git a/desktop-app/tests/onboarding.test.tsx b/desktop-app/tests/onboarding.test.tsx index 4d8b29d329..53bb970e89 100644 --- a/desktop-app/tests/onboarding.test.tsx +++ b/desktop-app/tests/onboarding.test.tsx @@ -257,7 +257,9 @@ it('starts without overriding an automatic-update opt-out', async () => { it('offers Start serving for the pair on a paired Mac, never Autopilot', async () => { const { done } = toStartPage(pairedMac()); expect( - screen.getByText('This Mac serves in a pair. Start serving starts the pair with Qwen 3.8 27B.'), + screen.getByText( + 'This Mac is in a pair, which is stopped. Start serving starts it with Qwen 3.8 27B.', + ), ).toBeVisible(); expect(screen.getByText('Starts the pair with Qwen 3.8 27B, on both Macs.')).toBeVisible(); expect(screen.getByText('The pair keeps its model loaded until you change it.')).toBeVisible(); @@ -272,3 +274,41 @@ it('offers Start serving for the pair on a paired Mac, never Autopilot', async ( expect(api.act).not.toHaveBeenCalled(); await waitFor(() => expect(done).toHaveBeenCalled()); }); + +// The pair as it is: a pair that serves is kept serving, and the page says so (#1905's review). +it('says a serving pair serves, and that Start serving keeps it', () => { + toStartPage(pairedMac({ state: 'serving' })); + expect( + screen.getByText( + 'This Mac serves in a pair with Qwen 3.8 27B. Start serving keeps it serving.', + ), + ).toBeVisible(); + expect(screen.getByText('Keeps the pair serving Qwen 3.8 27B, on both Macs.')).toBeVisible(); + expect(screen.getByRole('button', { name: /^Start serving/ })).toBeEnabled(); +}); + +// A pair with no model yet, or a pairing record that can't be read: Start serving would be refused, +// so the page says what works first, in Terminal, and offers no Start (#1905's review). +it('offers no Start serving where the pair needs Terminal first, and says why', () => { + const noModel = toStartPage(pairedMac({ model: null, leads: false })); + expect( + screen.getByText( + 'This Mac is in a pair that has no model yet. Choose one with “darkbloom cluster” in Terminal on the other Mac, which leads the pair, then come back to Start serving.', + ), + ).toBeVisible(); + expect(screen.getByRole('button', { name: /^Start serving/ })).toBeDisabled(); + expect(screen.getByText('Choose the pair’s model in Terminal first.')).toBeVisible(); + expect(screen.queryByRole('region', { name: 'What happens next' })).not.toBeInTheDocument(); + fireEvent.click(screen.getByRole('button', { name: /^Start serving/ })); + expect(backend.act).not.toHaveBeenCalled(); + expect(noModel.done).not.toHaveBeenCalled(); + cleanup(); + toStartPage(pairedMac({ model: null, state: 'unreadable', leads: null })); + expect( + screen.getByText( + 'This Mac’s pairing record couldn’t be read, so it may be in a pair. Run “darkbloom cluster” in Terminal on this Mac to check it.', + ), + ).toBeVisible(); + expect(screen.getByRole('button', { name: /^Start serving/ })).toBeDisabled(); + expect(screen.getByText('Check the pairing in Terminal first.')).toBeVisible(); +}); diff --git a/desktop-app/tests/onboardingFixtures.ts b/desktop-app/tests/onboardingFixtures.ts index 76c0072cf3..02d1054060 100644 --- a/desktop-app/tests/onboardingFixtures.ts +++ b/desktop-app/tests/onboardingFixtures.ts @@ -58,12 +58,13 @@ export function snapshot(overrides: Partial = {}): Snapshot { }; } -// A Mac in a two-Mac pair, as the runtime reports it: it names the pair and its model, and offers -// no Autopilot, which serves one Mac. -export const pairedMac = () => +// A Mac in a two-Mac pair, as the runtime reports it: it names the pair, its model, its state from +// this Mac's own view and whether this Mac leads it, and offers no Autopilot, which serves one Mac. +// Here the leading Mac of a stopped pair, unless `pair` says otherwise. +export const pairedMac = (pair: Partial> = {}) => snapshot({ capabilities: ['account-signin', 'account-signout', 'request-history'], - pair: { model: 'Qwen 3.8 27B' }, + pair: { model: 'Qwen 3.8 27B', state: 'stopped', leads: true, ...pair }, }); // As the runtime reports it: the only catalog model does not fit, so it is not eligible. diff --git a/desktop-app/tests/onboardingStartPlan.test.ts b/desktop-app/tests/onboardingStartPlan.test.ts index 995476d741..85c8105488 100644 --- a/desktop-app/tests/onboardingStartPlan.test.ts +++ b/desktop-app/tests/onboardingStartPlan.test.ts @@ -1,5 +1,11 @@ import { describe, expect, it } from 'vitest'; -import { methodFor, pairModel, startAction } from '../src/renderer/components/onboarding/startPlan'; +import { + methodFor, + pairLead, + pairModel, + pairStartable, + startAction, +} from '../src/renderer/components/onboarding/startPlan'; import { pinnedMemory, startingModel } from '../src/renderer/models/selection'; import { models, pairedMac, snapshot } from './onboardingFixtures'; @@ -124,4 +130,47 @@ describe('a paired Mac', () => { expect(pairModel({ model: 'Qwen 3.8 27B' })).toBe('Qwen 3.8 27B'); expect(pairModel({ model: null })).toBe('its model'); }); + + // #1905's review: the page said “This Mac serves in a pair” whatever the pair's state. + it('says the pair as it is, and what Start serving does there', () => { + const pair = pairedMac().pair!; + expect(pairLead({ ...pair, state: 'serving' })).toBe( + 'This Mac serves in a pair with Qwen 3.8 27B. Start serving keeps it serving.', + ); + expect(pairLead({ ...pair, state: 'started', leads: false })).toBe( + 'This Mac is in a pair, started with Qwen 3.8 27B. Start serving makes sure it serves.', + ); + expect(pairLead({ ...pair, state: 'not_running' })).toBe( + 'This Mac is in a pair that isn’t running here. Start serving starts it with Qwen 3.8 27B.', + ); + expect(pairLead(pair)).toBe( + 'This Mac is in a pair, which is stopped. Start serving starts it with Qwen 3.8 27B.', + ); + // A runtime from before the state was reported: words that are true in every state. + expect(pairLead({ model: 'Qwen 3.8 27B' })).toBe( + 'This Mac is in a pair. Start serving starts the pair with Qwen 3.8 27B.', + ); + }); + + // #1905's review: a pair with no model yet was offered Start serving, which the runtime then + // refused. Its model is chosen in Terminal, on the Mac that leads the pair. + it('says what works first where Start serving can’t start the pair', () => { + const pair = pairedMac().pair!; + expect(pairLead({ ...pair, model: null })).toBe( + 'This Mac is in a pair that has no model yet. Choose one with “darkbloom cluster” in Terminal on this Mac, then come back to Start serving.', + ); + expect(pairLead({ ...pair, model: null, leads: false })).toBe( + 'This Mac is in a pair that has no model yet. Choose one with “darkbloom cluster” in Terminal on the other Mac, which leads the pair, then come back to Start serving.', + ); + expect(pairLead({ model: null })).toBe( + 'This Mac is in a pair that has no model yet. Choose one with “darkbloom cluster” in Terminal on the leading Mac, then come back to Start serving.', + ); + expect(pairLead({ model: null, state: 'unreadable', leads: null })).toBe( + 'This Mac’s pairing record couldn’t be read, so it may be in a pair. Run “darkbloom cluster” in Terminal on this Mac to check it.', + ); + expect(pairStartable(pair)).toBe(true); + expect(pairStartable({ model: 'Qwen 3.8 27B' })).toBe(true); + expect(pairStartable({ ...pair, model: null })).toBe(false); + expect(pairStartable({ model: null, state: 'unreadable', leads: null })).toBe(false); + }); }); diff --git a/docs/architecture/inference.md b/docs/architecture/inference.md index 5ebf377c27..d2b62a9963 100644 --- a/docs/architecture/inference.md +++ b/docs/architecture/inference.md @@ -380,10 +380,27 @@ without a login is named before the Start step setup ends with the outcome block (`ClusterOnboardingConsole.result`, `ClusterOnboardingReady.outcome`). The other Mac's `darkbloom cluster` shows the same block from the status line (`ClusterOnboardingNotServing.statusLine`, -`ClusterOnboardingDriver.showOutcome`). A member's missing App Attest names its -local key-generation safeguard's end +`ClusterOnboardingDriver.showOutcome`). A member without App Attest is what the +pair waits for while its part is new: the coordinator's first trust status for +a part carries none, and the authorization lands about a minute after the part +registers. Until a Mac's part has run `ClusterOnboardingAppleCheck.slowSeconds` +(2 minutes) without one, the status line's reason is the wait's own words, +"checking both Macs with Apple" or the one Mac +(`ClusterOnboardingAppleCheck.look`, `ClusterOnboardingPairWait.words`), which +every reader takes as progress (`ClusterOnboardingPairWait.isProgress`): loading +in `cluster status` on both Macs, and "Checking …" on the Mac that joined +(`ClusterOnboardingDriver.offeredWaitingWords`). Only the leading Mac's look +decides it. The warning `ClusterOnboardingNotServing.notVerified` names a Mac +once that wait is over, at once when its local key-generation safeguard holds +it back, with that safeguard's end (`ClusterServiceStatus.Child.appAttestRetryAt`, read from the daemon state's -`AppAttestKeyState.generationBlockedUntil`). +`AppAttestKeyState.generationBlockedUntil`), and for a part whose age isn't +known (`ClusterOnboardingAppleCheck.Mac.warns`). While the pair serves Both, me +first, the leading Mac's status adds the owner's pause under its serving line, +read once per status from the state file of its part when that part runs rank 0 +(`OnboardingLive.pauseLines`, words from `MeFirstWords.pairLines`, said from now +in that Mac's clock): the Mac that follows shows it from that status, with +nothing more on the link or the heartbeat, and nothing per request. How the approval is fetched, matched, checked on each Mac and saved: [coordinator-paired member](../reference/configuration.md#coordinator-paired-member). diff --git a/docs/architecture/owner-pause.md b/docs/architecture/owner-pause.md index 16418e54dc..6d432f97c1 100644 --- a/docs/architecture/owner-pause.md +++ b/docs/architecture/owner-pause.md @@ -1,6 +1,6 @@ # Owner pause ("me first") -> Last updated: 2026-11-07 +> Last updated: 2026-11-08 How a provider that serves Darkbloom and its owner from one Mac stops taking Darkbloom work while the owner uses the Mac through its local API, and returns @@ -138,6 +138,7 @@ sequenceDiagram | Racing dispatches | The leader's client forwards them while the slot exists, and `rejectIfDraining` refuses them with `capacity / 503 / draining` before they reach the pair | | The idle time | The resume timer, and the member beat (`clusterMemberHeartbeat`, every 5 s), because a member runs no idle monitor. A stopping leader cancels the timer | | Every other member | Untouched. It runs no local API, so nothing calls the hook and me first stays off; its heartbeat stays control-only `draining` with no busy fields | +| What each Mac says | The leader's status lines, which every `status` on the other Mac asks for over the cable anyway, carry the pause under the pair's serving line (`OnboardingLive.pauseLines`, read from the leader part's own state file, `MeFirstWords.pairLines`): `Pair: you first — Darkbloom paused for 1 minute (…; back in about 2 minutes if you stay idle)`. Times are said from now, never as a clock time. Nothing is added to the heartbeat or the link | | Ranks | Nothing counts them: the leader is the slot's host, a role, not a rank | | `darkbloom cluster local` | Unchanged: no member loop and no coordinator, so nothing to pause | @@ -191,6 +192,9 @@ The pause is event-driven: - With me first off, `noteLocalUse` returns at once, and no timer or task exists. - On a pair's leader, the member beat that already runs every 5 seconds adds one O(1) check, and the hook adds one call to each local request. +- A `status` on either Mac of a pair reads the pause once, from the leader + part's state file, in the leader's status the other Mac already asks for: no + new message, and nothing per request. ## Invariants diff --git a/docs/developer/desktop-app.md b/docs/developer/desktop-app.md index d80c0d8341..307e9866ae 100644 --- a/docs/developer/desktop-app.md +++ b/docs/developer/desktop-app.md @@ -444,19 +444,35 @@ from a first install, and cancels a link in progress. - **Fallback.** A runtime that rejects `autopilot` by name keeps the starting model selected and offers "Choose models manually". That path uses the existing `start` action with the chosen models. -- **A paired Mac.** The snapshot names the pair (`Snapshot.pair`) and reports no - `autopilot` capability, so the page offers **Start serving** for the pair: "This - Mac serves in a pair. Start serving starts the pair with ." It sends +- **A paired Mac.** The snapshot names the pair (`Snapshot.pair`: its model, its + state from the runtime's own view, and whether this Mac leads it) and reports + no `autopilot` capability, so the page offers **Start serving** for the pair. + Its lead says the pair as it is, then what Start serving does there + (`startPlan.pairLead`): "This Mac serves in a pair with . Start serving + keeps it serving." only when the runtime says it serves; "This Mac is in a + pair, which is stopped. Start serving starts it with ."; "… that isn't + running here …"; "This Mac is in a pair, started with . Start serving + makes sure it serves." on the Mac that follows, whose runtime can't tell. A + runtime that reports no state gets "This Mac is in a pair. Start serving starts + the pair with .", true in every state. It sends `{ action: 'start', models: [], local: false }`, with no model and no local API of its own, since the pair serves its own (`startPlan.ts`), and hides the advanced model choice. An app from before this reads the missing capability as a runtime without Autopilot, and offers the plain start too. +- **A pair that needs Terminal first.** With no model yet, or a pairing record + that can't be read, Start serving would be refused (`pairStartable`). The page + says the Terminal step instead ("… Choose one with “darkbloom cluster” in + Terminal on this Mac, then come back to Start serving." or "… on the other Mac, + which leads the pair, …"; "Run “darkbloom cluster” in Terminal on this Mac to + check it."), disables Start serving with why under it (`pairBlocked`), and + leaves out the summary. - **A start with no models.** The runtime takes it only on a paired Mac (`DesktopBackend.startsThePair`, the same test `start` makes), where its `start` starts the pair with the pair's own model. On a Mac that isn't paired it is refused at once, as before: "Choose at least one model". A pair with no model yet is refused at once with the CLI's one line for that, which the app - shows: ``No model was chosen for the pair yet: run `darkbloom start` in a terminal to choose one.`` + shows: ``No model was chosen for the pair yet: choose one with `darkbloom cluster` in a terminal on this Mac.`` + (``… on the other Mac (…).`` on the Mac that follows). `DesktopAppOnAPairedMacTests` posts the app's exact JSON through `DesktopHTTP.decodeAction` and `submit`, and `backend.test.ts` pins that JSON as the main process posts it. diff --git a/docs/provider/agent-setup.md b/docs/provider/agent-setup.md index 51a7f75004..4583411714 100644 --- a/docs/provider/agent-setup.md +++ b/docs/provider/agent-setup.md @@ -692,18 +692,27 @@ otherwise ([stopping and starting again](two-mac-cluster.md#stopping-and-startin | List the cluster commands | Any Mac | `darkbloom cluster --help` | `darkbloom start` without a terminal needs a model chosen earlier. Otherwise -it says ``No model was chosen for the pair yet: run `darkbloom start` in a -terminal to choose one.`` and exits with status 1. Other single-Mac options +it says ``No model was chosen for the pair yet: choose one with `darkbloom +cluster` in a terminal on this Mac.`` (on the Mac that follows: ``… on the +other Mac (…).``, which leads) and exits with status 1. Other single-Mac options are refused there by name, without `--solo` (exit status 64); `--model ` (and `--local-endpoint`), the desktop app's Start, start the pair with its own model and end with ``This Mac serves in a pair: the pair serves ; `darkbloom cluster` changes its model.`` when that isn't `` (after exit status 3: ``This Mac is in a pair: the pair was asked to start with , and isn't serving (above); …``). -Without a terminal it looks like this: +Without a terminal, a stopped pair's start looks like this. `checking both +Macs with Apple` is the usual first minute of each part, not a failure: wait +through it. On a pair that already serves, the first line is ``…: the pair +already serves.``, the result block follows at once, and nothing is asked of +either Mac. ```text This Mac is in a two-Mac cluster with the other Mac (Apple M5 Max, 128 GB): starting the pair. + Qwen 3.8 27B: registering both Macs with the coordinator for pairing. + Waiting until the pair serves (up to 10 min). + Qwen 3.8 27B is not serving yet: checking both Macs with Apple. + Qwen 3.8 27B is not serving yet: the coordinator paired both Macs. ✓ Serving Qwen 3.8 27B through Darkbloom on both Macs (tensor parallel). Model: Qwen 3.8 27B · tensor parallel · M3 Ultra 50% / M5 Max 50% Macs: this Mac (Mac Studio) leads · the other Mac (Apple M5 Max, 128 GB) follows @@ -796,7 +805,7 @@ port setup and the shared models for the other app, so it asks for no password | Signal | Cause | Do | |---|---|---| -| The console says the Mac is waiting for verification, or `✗ Not serving: isn't verified by Apple yet; Darkbloom retries by itself at about HH:MM. Don't restart either Mac until then.` | Apple's App Attest has not verified that Mac yet. The coordinator sends work only to verified Macs, and pairs only those | Run `darkbloom doctor` on that Mac. If `app attest key — no usable key; the local key-generation safeguard clears in