Remove unimplemented Purge and three unused interfaces from imgcache (closes #73) #175

Merged
clawbot merged 1 commits from issue-73-remove-dead-abstractions into next 2026-10-04 08:41:38 +02:00
Collaborator

Removes dead code from internal/imgcache, per the plan on #73.

  • Purge is gone from the ImageCache interface and from Service, together with errPurgeNotImplemented. It only returned an error, nothing called it and no route exposed it. Eviction reclaims disk space meanwhile; purging can be reintroduced deliberately when a use case for it exists.
  • The SignatureValidator, Allowlist and Storage interfaces are deleted from imgcache.go. Nothing implemented or used them, and their methods do not match the real types (allowlist.HostAllowList, ContentStorage, VariantStorage).
  • TODO.md gets its Completed Steps entry.

No behaviour changes; the change is deletions only.

Disclosures:

  • No tests added or removed: no test exercised Purge or the deleted interfaces, and a deletion has no behaviour to test.
  • Judgement call: the ImageCache interface itself stays, as the plan says, although nothing besides Service refers to it.

Model: opus-5-5

Removes dead code from `internal/imgcache`, per the plan on https://git.eeqj.de/sneak/pixa/issues/73. - `Purge` is gone from the `ImageCache` interface and from `Service`, together with `errPurgeNotImplemented`. It only returned an error, nothing called it and no route exposed it. Eviction reclaims disk space meanwhile; purging can be reintroduced deliberately when a use case for it exists. - The `SignatureValidator`, `Allowlist` and `Storage` interfaces are deleted from `imgcache.go`. Nothing implemented or used them, and their methods do not match the real types (`allowlist.HostAllowList`, `ContentStorage`, `VariantStorage`). - `TODO.md` gets its Completed Steps entry. No behaviour changes; the change is deletions only. Disclosures: - No tests added or removed: no test exercised `Purge` or the deleted interfaces, and a deletion has no behaviour to test. - Judgement call: the `ImageCache` interface itself stays, as the plan says, although nothing besides `Service` refers to it. Model: opus-5-5
clawbot added the needs-review label 2026-10-04 08:04:12 +02:00
clawbot self-assigned this 2026-10-04 08:04:12 +02:00
clawbot added 1 commit 2026-10-04 08:04:12 +02:00
Purge only returned an error and nothing called it, so it is gone from
the ImageCache interface and from Service, along with its error value.
It can be added back when something needs it; eviction reclaims disk
space meanwhile. The SignatureValidator, Allowlist and Storage
interfaces in imgcache.go had no implementers and no users, and
described types that look different from the real ones, so they are
deleted. No behaviour changes.

Model: opus-5-5
Author
Collaborator

PASS at b08869501255ec5e74cd9237202c41ee2a1137c5, rebased onto next at 5b17d1f555fcc96afb79af19537a9d8e8d7cf1b0.

Model: opus-5-5

**PASS** at `b08869501255ec5e74cd9237202c41ee2a1137c5`, rebased onto `next` at `5b17d1f555fcc96afb79af19537a9d8e8d7cf1b0`. Model: opus-5-5
clawbot merged commit 6830bdc5de into next 2026-10-04 08:41:38 +02:00
clawbot deleted branch issue-73-remove-dead-abstractions 2026-10-04 08:41:38 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/pixa#175