Repository navigation
Record which machine runs each build - #653
Merged
Merged
Conversation
A build now stores its paired machine's durable id (and whether that connection ran as a background service) when it is queued or rebuilt. The implementation snapshot names the machine of every build it shows, so everyone who can see a build sees where it runs. Only the build's own starter learns whether that machine is connected now. Builds stored before this have no machine and show none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
build-machine
branch
from
October 16, 2026 12:26
92f9b3a to
09e4153
Compare
MaggieAppleton
enabled auto-merge (rebase)
October 16, 2026 12:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The Build tab's new status card (next PR) shows which machine a build runs on, to everyone who can see the build. Today a build stores only its in-memory
connectionId, which means nothing after a reconnect or restart and is deliberately hidden from other people.machineId, plusmachineServicewhen that connection ran as a background service (the machine record itself does not keep this). Both are optional inbuildSchema, so builds stored before this still restore. Builds live in the document sidecar JSON, so there is no migration. They are written by the existingpersistExclusivebefore the build is acknowledged or announced.ImplementationSnapshot.buildMachinesmaps build id to{ label, service, connected? }for the builds the snapshot shows:build,live.rebuild, and the live build (live.buildId). The label is read fromstorage.machines, so a rename shows up. A build with nomachineIdor no machine record has no entry; there is no fallback.connectedis sent only to the build's own starter, the same rule aslive.builderConnected. Other people see the name and icon, never whether the laptop is online.withoutConnectionandbuilderConnectedare unchanged.plan:implementation→ the client re-readsGET /implementation, so the one snapshot read covers broadcasts as well.flowchart LR A["Build / rebuild queued<br/>on a live connection"] --> B["queueBuild / queueRebuild<br/>build.machineId = connection.machineId<br/>build.machineService = about.service"] B --> C[("Sidecar JSON<br/>persistExclusive")] C --> D["announceImplementation<br/>plan:implementation"] D --> E["GET /implementation"] E --> F["storage.machines.get(machineId)<br/>label"] F --> G["buildMachines[buildId]<br/>{ label, service }"] G --> H["Every viewer:<br/>label + icon"] G --> I["Build's starter only:<br/>+ connected"]Tests
DEMO_PERSONAS=off bun test apps/server/src/tasks/ apps/server/src/experiments/spike-host.test.ts: 157 pass.connected.builderConnected.machineIdrestores and the snapshot has nobuildMachines.machineIdsurvives closing and reopening the document.bun run types: server and protocol are clean.bun run cifails only on git-ignoredapps/web/src/design-jig/files.🤖 Generated with Claude Code