Repository navigation
feat(computer): keep Windows disks and their bases in the image store - #531
Conversation
…, as Linux disks do A composed Windows disk is pushed to the env's image store under its key and recorded pinned; a compose of the same inputs on any machine reuses it, and a deploy pulls it. A base is pushed under a tag of its recipe, with the key to its admin, so a machine without it pulls it to compose a layer instead of installing Windows, and fetches no ISO to find it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…local base the image store lacks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
E2ESet-up: an EC2 c8i.4xlarge with nested KVM, running
About the new-key run. Its first gate-3 probe failed one check, "a recording's segments match their files" (4 frames over 0.59 s of a 2 s recording). At that moment the box was also exporting and compressing the 11.6 GB base for the Modal chaos test, on every core. The rerun on a quiet box treated the failed build as pending, reused the disk the store holds (a failed disk is no longer deleted), and passed gate 3 in 55 s and the probe in 112 s. The recording check under host load goes to W9 (FD-5330). At the end, the registry held |
…dows names derived from a key in one place - pin_if_served beside pin_digest replaces the composer's _served and Registry's own copy of it; _image_store gets the env's store with its repository for _stored and the Windows compose alike. - base_names and disk_names name a base or disk from its key, here and in the store; compose takes the key rather than both names. - labels is imported as image_labels, no longer shadowed by compose's parameter and Registry's method. - The ISO label nothing read, and the sha256 helper only it used, are gone; Registry's store is an ImageStore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What this does
Part of FD-5321, related to FD-4538 (decision 14). Windows disks are now kept in the image store, as Linux disks are. Until now they stayed in the Docker of the machine that composed them.
windows-base-<key>), with its evaluation's expiry and the ISO's sha256 as labels. A machine without the base pulls it rather than installing Windows (about 15 minutes) and fetching the ISO (about 6 GB).agentadmin, so the base image holds that key at/disk/admin.key. A machine that pulls the base takes the key out of it.Removed:
held,removeandimage_id. A disk that fails its probe is no longer deleted from this machine, because the store keeps it. Its record says it failed, the same as for Linux disks.Security note
The admin key lives in the base image, in the user's own image store. The guest's ssh is only ever reached on the composing machine's loopback while a layer is being composed. A deployed computer forwards only the driver's port, not ssh. Only the base, the layer's disk and the guest file go into a launcher image or a remote sandbox, never
/disk/admin.key.Tested
tst/unit/env/envs/test_computer_windows.py(56 tests) with a fake registry. New cases cover:🤖 Generated with Claude Code


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Windows bases and composed disks now live in the environment's image store.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Choose Windows base] --> B{Valid local base?} B -->|Yes| C[Push if missing from store] B -->|No| D{Valid stored base?} D -->|Yes| E[Keep pinned base reference] D -->|No| F[Install and push base] C --> G{Composed disk stored?} E --> G F --> G G -->|Yes| H[Reuse pinned disk] G -->|No| I[Prepare base locally and compose] I --> J[Push and pin disk] H --> K[Probe and record result] J --> KReviews (3) · Last reviewed commit: "refactor(computer): one store lookup for..." · Reviewed by Greptile