For #312, item 6 of #168. The code below had no caller outside tests. It is gone, with the tests that tested only it:
Service.Warm and the ImageCache interface
Service.GenerateSignedURL and Signer.GenerateSignedURL
signature.ParseParams
imagerequest.ParseImagePath
PeekAndValidate, IsSupportedMIMEType, ImageFormatToMIME and FormatOriginal of internal/magic
SupportedInputFormats and SupportedOutputFormats of the image processor
IsEmpty and Count of the allowlist
ssrfSafeDialer
CacheStale, ErrCacheMiss, ErrNegativeCache and ImageResponse.LastModified
ContentStorage.Load and VariantStorage.Load
encurl.FromImageRequest, Cache.GetSourceMetadataID, LookupResult and MetadataStorage were already gone.
Kept, as pixa calls them:
ParseImageURL: the image handler parses the path with it.
MIMEToImageFormat: reading a variant file checks its format with it.
ContentStorage.Store: StoreSource writes the source file with it.
Cache.CleanExpired: the eviction goroutine calls it.
What the diff does not show:
The handlers tests sign their image URLs with the test helper generateSignedURL, which builds them as the removed generator did.
The golden vectors keep their signatures; only the path the removed generator wrote is no longer checked.
The SSRF dialer tests call dialSSRFSafe with no operator blocklist, which is all ssrfSafeDialer did.
The tests of ParseImagePath and ContentStorage.Load call ParseImageURL and LoadWithSize, with the same assertions.
Disclosures:
Judgement call: older dated entries in TODO.md still name GenerateSignedURL and ImageCache, as history.
Judgement call: testFixtures.service in the handlers tests is gone; nothing reads it now.
Judgement call: the ParseImagePath case with a leading "/" is gone, as only ParseImagePath stripped it. Its cases that the ParseImageURL tests already held are not repeated.
Model: opus-5-5
For https://git.eeqj.de/sneak/pixa/issues/312, item 6 of https://git.eeqj.de/sneak/pixa/issues/168. The code below had no caller outside tests. It is gone, with the tests that tested only it:
- `Service.Warm` and the `ImageCache` interface
- `Service.GenerateSignedURL` and `Signer.GenerateSignedURL`
- `signature.ParseParams`
- `imagerequest.ParseImagePath`
- `PeekAndValidate`, `IsSupportedMIMEType`, `ImageFormatToMIME` and `FormatOriginal` of `internal/magic`
- `SupportedInputFormats` and `SupportedOutputFormats` of the image processor
- `IsEmpty` and `Count` of the allowlist
- `ssrfSafeDialer`
- `CacheStale`, `ErrCacheMiss`, `ErrNegativeCache` and `ImageResponse.LastModified`
- `ContentStorage.Load` and `VariantStorage.Load`
`encurl.FromImageRequest`, `Cache.GetSourceMetadataID`, `LookupResult` and `MetadataStorage` were already gone.
Kept, as pixa calls them:
- `ParseImageURL`: the image handler parses the path with it.
- `MIMEToImageFormat`: reading a variant file checks its format with it.
- `ContentStorage.Store`: `StoreSource` writes the source file with it.
- `Cache.CleanExpired`: the eviction goroutine calls it.
What the diff does not show:
- The handlers tests sign their image URLs with the test helper `generateSignedURL`, which builds them as the removed generator did.
- The golden vectors keep their signatures; only the path the removed generator wrote is no longer checked.
- The SSRF dialer tests call `dialSSRFSafe` with no operator blocklist, which is all `ssrfSafeDialer` did.
- The tests of `ParseImagePath` and `ContentStorage.Load` call `ParseImageURL` and `LoadWithSize`, with the same assertions.
Disclosures:
- Judgement call: older dated entries in `TODO.md` still name `GenerateSignedURL` and `ImageCache`, as history.
- Judgement call: `testFixtures.service` in the handlers tests is gone; nothing reads it now.
- Judgement call: the `ParseImagePath` case with a leading "/" is gone, as only `ParseImagePath` stripped it. Its cases that the `ParseImageURL` tests already held are not repeated.
Model: opus-5-5
Service.Warm, the ImageCache interface, both GenerateSignedURL methods,
signature.ParseParams, imagerequest.ParseImagePath, four symbols of
internal/magic, the image processor's lists of supported formats,
IsEmpty and Count of the allowlist, ssrfSafeDialer, CacheStale,
ErrCacheMiss, ErrNegativeCache, ImageResponse.LastModified and the Load
methods of ContentStorage and VariantStorage had no caller outside
tests. They are gone, with the tests that tested only them.
The handlers tests sign their image URLs with generateSignedURL, a test
helper that builds the URL as the removed generator did. The SSRF dialer
tests call dialSSRFSafe with no operator blocklist, which is all
ssrfSafeDialer did. The tests of ParseImagePath and ContentStorage.Load
call ParseImageURL and LoadWithSize instead. MIMEToImageFormat,
ContentStorage.Store and CleanExpired stay, as pixa calls them.
Model: opus-5-5
Also removed imagerequest.ParseImagePath, ContentStorage.Load and magic.FormatOriginal, per #312 (comment); their tests now call ParseImageURL and LoadWithSize.
Model: opus-5-5
Also removed `imagerequest.ParseImagePath`, `ContentStorage.Load` and `magic.FormatOriginal`, per https://git.eeqj.de/sneak/pixa/issues/312#issuecomment-155558; their tests now call `ParseImageURL` and `LoadWithSize`.
Model: opus-5-5
PASS: the code nothing in production called is gone, the code pixa still calls stays and is named in the PR body, and no test of behaviour that stays lost an assertion.
Judgement call: the dated TODO.md history entries that still name GenerateSignedURL and ImageCache are read as history, not as a breach of the rule in #312 that TODO.md no longer name anything removed.
Model: opus-5-5
PASS: the code nothing in production called is gone, the code pixa still calls stays and is named in the PR body, and no test of behaviour that stays lost an assertion.
Judgement call: the dated `TODO.md` history entries that still name `GenerateSignedURL` and `ImageCache` are read as history, not as a breach of the rule in https://git.eeqj.de/sneak/pixa/issues/312 that `TODO.md` no longer name anything removed.
Model: opus-5-5
clawbot
merged commit ac2bae0489 into next2026-10-26 10:54:14 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
For #312, item 6 of #168. The code below had no caller outside tests. It is gone, with the tests that tested only it:
Service.Warmand theImageCacheinterfaceService.GenerateSignedURLandSigner.GenerateSignedURLsignature.ParseParamsimagerequest.ParseImagePathPeekAndValidate,IsSupportedMIMEType,ImageFormatToMIMEandFormatOriginalofinternal/magicSupportedInputFormatsandSupportedOutputFormatsof the image processorIsEmptyandCountof the allowlistssrfSafeDialerCacheStale,ErrCacheMiss,ErrNegativeCacheandImageResponse.LastModifiedContentStorage.LoadandVariantStorage.Loadencurl.FromImageRequest,Cache.GetSourceMetadataID,LookupResultandMetadataStoragewere already gone.Kept, as pixa calls them:
ParseImageURL: the image handler parses the path with it.MIMEToImageFormat: reading a variant file checks its format with it.ContentStorage.Store:StoreSourcewrites the source file with it.Cache.CleanExpired: the eviction goroutine calls it.What the diff does not show:
generateSignedURL, which builds them as the removed generator did.dialSSRFSafewith no operator blocklist, which is allssrfSafeDialerdid.ParseImagePathandContentStorage.LoadcallParseImageURLandLoadWithSize, with the same assertions.Disclosures:
TODO.mdstill nameGenerateSignedURLandImageCache, as history.testFixtures.servicein the handlers tests is gone; nothing reads it now.ParseImagePathcase with a leading "/" is gone, as onlyParseImagePathstripped it. Its cases that theParseImageURLtests already held are not repeated.Model: opus-5-5
d9b94f5185to5a2aa94691Also removed
imagerequest.ParseImagePath,ContentStorage.Loadandmagic.FormatOriginal, per #312 (comment); their tests now callParseImageURLandLoadWithSize.Model: opus-5-5
PASS: the code nothing in production called is gone, the code pixa still calls stays and is named in the PR body, and no test of behaviour that stays lost an assertion.
Judgement call: the dated
TODO.mdhistory entries that still nameGenerateSignedURLandImageCacheare read as history, not as a breach of the rule in #312 thatTODO.mdno longer name anything removed.Model: opus-5-5