Skip to content

fix: image surfaces and dry-run reclaim semantics#161

Merged
sjmiller609 merged 2 commits intomainfrom
codex/pr43-fix-image-and-reclaim
Mar 23, 2026
Merged

fix: image surfaces and dry-run reclaim semantics#161
sjmiller609 merged 2 commits intomainfrom
codex/pr43-fix-image-and-reclaim

Conversation

@sjmiller609
Copy link
Collaborator

@sjmiller609 sjmiller609 commented Mar 23, 2026

Summary

  • include digest-only images in image listings and support deleting images by digest
  • correct dry-run reclaim accounting so planned actions do not report applied reclaim bytes
  • add reproducer coverage for the PR publish ts package #43 regressions in API, image manager, and guest-memory tests

Testing

  • go test ./lib/images -run "Test(ListImages_IncludesDigestOnlyImages|DeleteImageByDigest)" -count=1
  • go test ./lib/guestmemory -run TestTriggerReclaimDryRunDoesNotReportAppliedReclaim -count=1
  • go test ./cmd/api/api -run "Test(ListImages_FilterByTagsIncludesDigestOnlyImages|DeleteImage_DigestOnlyImageDoesNotInternalError)" -count=1
  • On deft-kernel-dev after bootstrap: go test ./lib/images ./lib/guestmemory ./cmd/api/api -count=1

Notes

  • I did not add a fix for the intermittent snapshot fork 500 because we still do not have a deterministic local reproduction.

Note

Medium Risk
Medium risk because it changes image storage enumeration and deletion semantics (including digest-based deletes) and adjusts reclaim accounting, which could affect user-visible API behavior and disk cleanup edge cases.

Overview
Images: Listing/metrics now enumerate images by digest metadata.json (not just tag symlinks), so digest-only images appear in ListImages and tag filtering. Deletion now supports digest references by removing any tags pointing at the digest and deleting the digest directory under a repository, with locking moved to cover tag resolution/removal and orphan checks.

Guest memory reclaim: dryRun no longer reports AppliedReclaimBytes (response or per-action) and avoids implying reclaimed memory unless a target was actually applied.

Tests/docs: Adds API and manager regression tests plus helpers for seeding digest-only metadata, adds a dry-run reclaim test, and appends branch verification notes in skills/test-agent/agents/test-agent/NOTES.md.

Written by Cursor Bugbot for commit 84e2c22. This will update automatically on new commits. Configure here.

@sjmiller609 sjmiller609 changed the title Fix PR #43 image surfaces and dry-run reclaim semantics fix: image surfaces and dry-run reclaim semantics Mar 23, 2026
@sjmiller609 sjmiller609 marked this pull request as ready for review March 23, 2026 18:36
@sjmiller609
Copy link
Collaborator Author

taking liberty to merge small fixes

@sjmiller609 sjmiller609 merged commit 23ebbed into main Mar 23, 2026
5 of 6 checks passed
@sjmiller609 sjmiller609 deleted the codex/pr43-fix-image-and-reclaim branch March 23, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant