Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fdc003f. Configure here.
fdc003f to
9af5783
Compare
|
QA update on reviewed head
Important scope: the registry blobs were seeded via the disk-streaming handler, so this validates large real HTTP pull/materialization, not large-layer PATCH upload. It also does not prove cold boot or live GuestService provisioning/lifecycle. No existing instance was started, stopped or reprovisioned by these tests. Keep draft pending the remaining gates. |
|
Follow-up live QA: the artifact from the earlier real HTTP materialization run now passed normal authenticated API create/cold boot on Apple silicon with the source registry offline, actual macOS27.0.1/26A434 SSH readiness, template CPU/RAM inheritance, duplicate-identity409, live API restart recovery without guest reboot, and HTTP stop/start with persistent guest marker. Full immutable materialized base disk+aux SHA256 stayed identical after testing. Original instance/API/storage untouched; isolated QA VM/API ended stopped and QA slot released. Stop used system-agent-disabled fallback, not verified root-agent graceful shutdown. Combined reviewed PR1–3 + PR4 patches tested; reviewer branches not rewritten. See runtime issue/result detail: #498 (comment). Separately, actual26.22GiB streaming monolithic POST upload to empty production-registry-handler destination plus independent blob/manifest validation passed; default PATCH is still buffered/unproven, and that destination was not freshly pulled/booted: #503 (comment). |
4d9bc18 to
4888603
Compare
|
Simplification update at 4888603: OCI uses the shared bounded bundle decoder; permanent TestFinalizationRollbackPreservesUninstalledManifest fixes the reproduced regression where rollback deleted an existing manifest that had never been installed. Focused image regressions passed 3 race runs; no new real upload/pull/boot claim. All PRs remain draft. This is source-level/synthetic validation, not a new live boot or production build proof. Default Codex independent review was attempted but is still blocked by authentication (HTTP401). Published atomically after checking reviewer heads with explicit per-ref force-with-lease; prior heads preserved locally. |
1251134 to
664011b
Compare
664011b to
960e5a7
Compare
960e5a7 to
aa7872f
Compare
aa7872f to
1c18e1b
Compare
1c18e1b to
1bbff4f
Compare
1bbff4f to
4d958fa
Compare
4d958fa to
91a10b8
Compare
05432b5 to
b10e816
Compare
b10e816 to
700c1bb
Compare
700c1bb to
c884792
Compare
8850b76 to
b4c4f08
Compare
b4c4f08 to
2392289
Compare
c3ffb35 to
14bbe51
Compare
hiroTamada
left a comment
There was a problem hiding this comment.
reviewed — two issues worth addressing:
- P2 —
lib/images/macos_machine.go:53: validate explicit platforms before reusing in-flight pulls. while adarwin/arm64tag pull is running, requesting the same tag withlinux/arm64succeeds and returns the in-flight Darwin record. the new guard skips every non-ready record. can we reject incompatible explicit platforms on that reuse path too? reproduced with a local registry and a paused layer download. - P2 —
lib/images/macos_unpack.go:82-83,112-113: bound logical expansion of sparse tar entries. GNU PAX sparse entries surface as regular files, buttar.Readersynthesizes hole bytes without consuming the underlying byte budget. the size check limits each file, not aggregate expansion: a 40 KiB archive containing sixteen sparse 512 KiB files extracts 8 MiB with a 1 MiB budget. the raw tar-stream limit works, but extraction work can exceed it substantially. consider rejecting sparse tar metadata or separately capping total logical expansion, with a regression test.
all targeted validation, extraction, staging, rollback, tagging, and registry round-trip tests passed. full-suite and native macOS/APFS/VZ validation were not run.
14bbe51 to
1fa0cb0
Compare
sjmiller609
left a comment
There was a problem hiding this comment.
raw machine disks shouldn’t be named rootfs.ext4
lib/paths/paths.go:151–156
Use a machine-specific raw-disk path. Keep .ext4 for actual Linux filesystems on Darwin hosts.
complete boot disks shouldn’t be named overlay.raw
lib/instances/macos.go:155,169
Use something like boot.raw for macOS. This naming predates this PR, but remains on our requested cleanup list.
|
@hiroTamada thanks, both fixed in 1fa0cb0:
|
Materializes darwin/arm64 machine images from OCI artifacts with config validation before unpack, cached and pulled platform checks, private staging and rollback. Linux image pulls are unchanged.
1fa0cb0 to
05f0810
Compare
|
@sjmiller609 thanks, both renamed:
No fallback for the old names; images and instances created before need recreating (noted in |

Summary
PR 2 of 6. Pull macOS machine images from OCI registries. Base:
main(#498 has merged).darwin/arm64machine images described byio.hypeman.machine-image.*config labels (format indocs/macos-experimental.md). Labels are validated before any layer is unpacked.Flow
Before this PR, a darwin OCI image went down the Linux path (full download, umoci unpack, rootfs export) and was refused only at finalize.
NEWmarks what this PR adds; unmarked steps are the existing flow.Linux code touched
lib/images/oci.go: one dispatch to the machine extractor; Linux images still use umoci. Before writing layers to the cache, non-macOS hosts check the image config's OS; the registry client caches that config for the layout write, so Linux pulls make no extra request.lib/images/manager.go→lib/images/finalize.go: finalization moved into its own file (mostly moved code), now tracking installed files so auxiliary storage rolls back too.buildImagekeeps its rootfs export; macOS staging is onestageMacOSOutputshook inmacos_machine.go.lib/images/platform.go,tag.go: darwin handling.Testing
Review focus
lib/images/macos_unpack.go(the extractor).finalize.go, which Linux pulls also use.Stack
Each PR is one commit on the one below it. macOS logic lives in its own files (
macos*.go,*_darwin.go,exec_lifecycle.go,port_forward.go); shared Linux files get small hooks such asif stored.MacOS != nil.