Skip to content

Use FilePath for SnapshotStore - #25

Open
chrisgeo wants to merge 1 commit into
mainfrom
feat/chaos-1454-snapshot-store-filepath
Open

chrisgeo wants to merge 1 commit into
mainfrom
feat/chaos-1454-snapshot-store-filepath

Conversation

@chrisgeo

@chrisgeo chrisgeo commented May 9, 2026

Copy link
Copy Markdown

Summary

  • Converts SnapshotStore from URL to SystemPackage.FilePath across ~14 path references.
  • Public API: init(path: URL, …)init(path: FilePath, …). Single construction site updated at Sources/Plugins/CoreImages/ImagesHelper.swift:98 via SnapshotStore(path: FilePath(root.absolutePath()), …). ImagesService and ImagesServiceHarness receive a pre-constructed SnapshotStore and need no changes.
  • Preserves a localized URL boundary inside directorySize for URLResourceKey.totalFileAllocatedSizeKey — there is no FilePath equivalent for this Foundation enumerator API. Comment justifies the leak; allocated-size semantics and iteration order are unchanged.

Closes CHAOS-1454. Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same migration pattern.

Test plan

  • swift build succeeds (3107/3107 artifacts, no warnings).
  • swift test --filter ContainerImagesService — no failures (no dedicated unit tests target this module today).
  • Manual: image pull produces snapshot directories with same on-disk size accounting.
  • Manual: container image rm <id> triggers SnapshotStore.clean() correctly.
  • No Codable wire-format change — SnapshotStore is an actor with non-serialized stored properties; Filesystem JSON encoding (line 114) untouched.

@linear

linear Bot commented May 9, 2026

Copy link
Copy Markdown

CHAOS-1454

@chrisgeo
chrisgeo force-pushed the feat/chaos-1454-snapshot-store-filepath branch 2 times, most recently from ae62382 to 9599d87 Compare May 14, 2026 21:53
@chrisgeo
chrisgeo force-pushed the feat/chaos-1454-snapshot-store-filepath branch from 9599d87 to 8b2c540 Compare May 24, 2026 13:19
@chrisgeo
chrisgeo force-pushed the feat/chaos-1454-snapshot-store-filepath branch from 8b2c540 to 035f9f8 Compare August 28, 2026 17:43
- Closes CHAOS-1454.
- Internal cluster; URL boundary preserved at `directorySize` for `URLResourceKey.totalFileAllocatedSizeKey`.
- Sibling of apple#1480 (HostDNSResolver) and apple#1518 (PacketFilter), same pattern.
@chrisgeo
chrisgeo force-pushed the feat/chaos-1454-snapshot-store-filepath branch from 035f9f8 to 4a53126 Compare August 28, 2026 17:44
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