mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #359] feat(image): expose the published image catalog #380
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#380
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/359
Author: @Primary33
Created: 10/11/2026
Status: 🔄 Open
Base:
main← Head:feat/image-catalog📝 Commits (2)
6e1cb01feat: build and publish reusable images with the CLI580e3dcfeat: list inspect and delete published images📊 Changes
33 files changed (+6616 additions, -208 deletions)
View changed files
📝
crates/aenv/src/commands/build.rs(+221 -66)📝
crates/aenv/src/main.rs(+1 -1)📝
docs/src/concepts/sandboxes/starting.md(+84 -1)📝
scripts/buildkit/test.py(+59 -0)➕
services/gateway/internal/image_build_test.go(+136 -0)📝
services/gateway/internal/metrics.go(+15 -1)📝
services/gateway/internal/routes.go(+5 -1)📝
services/gateway/internal/routes_test.go(+9 -1)📝
services/gateway/internal/server.go(+31 -2)➕
src/api/generated/src/apis/images.rs(+300 -0)📝
src/api/generated/src/apis/mod.rs(+1 -0)📝
src/api/generated/src/models.rs(+1571 -1)📝
src/api/generated/src/server/mod.rs(+1552 -0)📝
src/api/impls/image_build.rs(+636 -65)📝
src/api/impls/image_build/cleanup.rs(+45 -6)📝
src/api/impls/image_build/tests.rs(+592 -3)📝
src/api/impls/image_build/transport.rs(+44 -1)📝
src/api/impls/image_build/worker.rs(+5 -5)📝
src/api/impls/mod.rs(+1 -0)📝
src/api/openapi.yml(+363 -1)...and 13 more files
📄 Description
What
Expose repository-backed
GET /images,GET /images/{digest}, andDELETE /images/{digest}for published images, plusGET /images/tagsandDELETE /images/tags/{tag}for image tags.Why
Users need to inspect and remove image catalog entries and tags without invalidating running sandboxes or snapshots that already reference the shared layers.
Related issue
Design proposal: #378.
Depends on image builds (#347). Review this feature only. Rebase onto
mainafter #347 merges.Scope and non-goals
Catalog and tag-management API and gateway routes, document collections for images and tags, and standalone image lifecycle tests. Deleting an image does not reclaim layers or delete the tags that point to it.
Design and behavior changes
GET /images; retrieve the full published description by canonical SHA256 identity withGET /images/{digest}.name:tagorder withGET /images/tags, using the same cursor rules asGET /images.DELETE /images/tags/{tag}is idempotent and never deletes the image.DocumentCollection::Images/ImageTagswith the genericlist_documentsanddelete_document, so the OSS- and POSIX-specific list/delete methods from the previous revision are gone and no backend code changes. Their OSS mock-S3 round-trip test went with them; the catalog logic is now covered by backend-independent tests.Compatibility and operations
/images,/images/{digest},/images/tags, andDELETE /images/tags/{tag}.Validation
Rebased onto
87c1df3. Run on a Linux test host as a non-root user with isolated state:make fmt: reportedsrc/image/oci_image.rsfromd243f6e, which fails the same check onmain, and the line wrapping of one test array insrc/image/resolver.rs, which was then rewrapped exactly as rustfmt printed it.make clippy: clean with-A clippy::manual_pattern_char_comparison, needed only for that samemainline.make test-unitmake -C services testandmake -C services fmt-check vetrust-axum), asmake agentenv-serverdoesCommands and results:
The native image test covers canonical digest identity, tagging during the build, cold starts by digest and by
aenv/tag, rejection of both after image deletion, tag deletion, and continued operation, resume, fork isolation, and snapshot restore for existing sandboxes.Skipped checks and reasons:
make test-unit(capability and ublk suites are unaffected).Risks and reviewer notes
Review catalog and tag deletion semantics, dangling tags after image deletion, and the independence of previously captured sandbox state. CI's fmt and clippy jobs fail on
mainuntil theoci_image.rsline is fixed there.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.