Repository navigation
fix(computer): compose again a build another composer recorded before deploying it - #502
Merged
earakely-scale merged 2 commits intoNov 5, 2026
Conversation
…fore it's deployed Each build's record names the digest of the code that composed it (the composer, the computers' build files, the Lume provider and the protocol's computer package). Deploy, env build and a put treat a build recorded under another digest, or none, as unstarted: it isn't deployable, a new result takes its place even when that one fails, and the deploy says why it composes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…composer's digest takes executable bits Greptile's review: a first-boot probe whose record another compose took over (another agent-env's, building) probed that record and stamped it; it now probes the build its deploy picked and records nothing. The digest hashes each file's executable bit, as a build's key does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-5256-a-change-to-a-computers-composition-code-doesnt-recompose-an
branch
November 5, 2026 17:33
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.
A computer env's composed build was reused for as long as the env's own files didn't change. So after an agent-env upgrade that composes differently, deploys silently booted computers composed the old way. On the EC2 Macs, a
prepare.shfix never reached the VM bundles until each env was composed from a fresh state. Now each build's record names the code that composed it, and a deploy composes again a build that other code recorded.What's in it
The composer's digest on every record (
env/envs/computer/utils/composed.py)composition()is a digest of the code that decides what a composed computer holds:env/envs/computer/utils,computers/(the build files, not their docs), the Lume provider, and the protocol'scomputerpackage. It's computed once per process.Record.startedandRecord.finishedwrite it into each result ascomposer.stale(result)is true for a result with another digest or none, which covers records from before this change._rankputs a stale result below everything, so any new result takes its place, even a build that fails.Record.built()leaves stale builds out of the computer it writes.Deploys,
env buildand puts compose stale builds again (composer.py,env.py)unstartedandunstarted_or_building, which deploys use, treat a stale record as one no compose started.pending, whichenv buildand puts use, treats it as left to compose. A disk's container is rebuilt with it when it's stale too.deployable_buildsnever returns a stale build. Where a run's fence keeps a deploy from composing, it refuses for want of a ready build.build_statusesthen shows each stale build asready, by another composer.Docs:
computers/README.mdstates the rule.Why this shape
The alternatives were to recompute each build's key at deploy, or to refuse the deploy. Recomputing means staging the whole build context, layers and downloads included, on every deploy. Refusing stops every run after an upgrade until someone rebuilds by hand. A digest of the composing code is cheap at deploy and never boots a stale computer. Its one cost is a recompose after an edit that changes nothing composed.
Builds keep their keys, which already cover what composes them (the provision script,
prepare/, the context, the lock), so a recompose reuses an image whose inputs didn't change.Records from before this change name no composer, so each env composes once after the upgrade.
Tested
tst/unit/env/envs,tst/unit/bundle,tst/unit/cli, the Lume provider and serialization tests pass on an EC2 Mac: 2,269 passed.ruffis clean.test_disk_recipe.pytests (KVM and the compressed disk's launcher) fail on a Mac host the same way onmain.by another composerand none is deployable.Linear: FD-5256.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; both previous findings are addressed.Summary
This PR records which composing code built each computer and rebuilds stale records before deployment.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Read build record] --> B{Current composer?} B -->|No| C[Compose again] B -->|Yes| D{Needs first-boot probe?} C --> D D -->|No| G[Boot ready build] D -->|Yes| E{Record still matches picked build?} E -->|Yes| F[Probe and save result] E -->|No| H[Probe picked build without saving result] F --> I{Probe passed?} H --> I I -->|Yes| G I -->|No| J[Refuse deploy]Reviews (2) · Last reviewed commit: "fix(computer): a first boot probes only ..." · Reviewed by Greptile