Persist OCI manifest content model per image digest - #455
Draft
chruffins wants to merge 1 commit into
Draft
Conversation
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 18:45
8255d11 to
1f79ed8
Compare
-->
✱ stlc build✅ go code · compare
✅ python code · compare
✅ typescript code · compare
Diagnostics: ❗ 0 new / 1 total error, 💡 0 new / 5 total note
Build metadata
This comment is auto-generated by stlc and is kept up to date as you push. |
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
2 times, most recently
from
August 26, 2026 18:53
1d3b38c to
e6fdc4c
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 18:55
345e8e0 to
07373a3
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 18:58
07373a3 to
e8971b4
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 19:26
e8971b4 to
4639430
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 19:30
4639430 to
273909b
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 19:47
31c4161 to
c6dcc2c
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 26, 2026 22:22
c6dcc2c to
cc7944c
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
2 times, most recently
from
August 31, 2026 21:35
b42b87c to
50bee89
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
2 times, most recently
from
August 31, 2026 21:56
b992e00 to
76c7b91
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 31, 2026 21:59
76c7b91 to
5b0a0df
Compare
chruffins
force-pushed
the
hypeship/manifest-layer-model
branch
from
August 31, 2026 23:37
5b0a0df to
dd879d9
Compare
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.
summary
Stacked stage of the image-storage project. Persists one content model document per image digest at
images/content/<digest>/manifest.json:rootfs.diff_idsblobReferences()accessor listing config + layer digests for future GCwhy
Stages 4/5 need the ordered layer list and diff ids to materialize per-layer artifacts and recompose rootfs without re-reading registries; GC needs to know which OCI cache blobs each ready image still references. Extracted from the existing OCI layout cache during the pull's metadata phase — no second blob downloader.
details
extractManifestModelreads manifest + config from the shared layout cache (system/oci-cache), reusing already-downloaded blobs.finalizeImagebeside the shared content; legacy images simply have no model (read returns nil).writeJSONAtomic).validation
go test ./lib/images ./lib/paths -count=1— new tests cover synthetic two-layer layouts (ordering, digest/diff-id pairing, platform), write/read roundtrip atomicity, missing-model reads, blob references, and an end-to-end import that lands a ready image with a correct model.Note
Low Risk
Additive on-disk metadata on the image finalize path; no auth or API behavior changes, and missing models are handled for legacy images.
Overview
Adds a persisted OCI manifest content model at
images/content/<digest>/manifest.jsonfor each image that finishes the pull/build pipeline. The document captures manifest identity, platform, config blob digest with ordereddiff_ids, and ordered layer descriptors (compressed digest, size, media type) so later work can rebuild rootfs from per-layer artifacts and GC can see which OCI cache blobs are still referenced viablobReferences().During pull,
extractManifestModelbuilds this structure from the shared OCI layout cache in the same metadata phase as existing inspection—no extra registry downloads.finalizeImagewrites the model atomically next to shared content and overwrites platform with the resolved manifest platform. Images converted before this change simply have no file;readManifestModelreturns nil without error.Metadata JSON writes now share
writeJSONAtomic(temp file + rename), including manifest persistence.Reviewed by Cursor Bugbot for commit 752a6d8. Configure here.