You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three small correctness/consistency issues in the S3 provider. None is a live defect — grouping them so they can be cleaned up in one pass.
1. The NoSuchKey checks are dead code
exists and getInfo both test err instanceof S3.NoSuchKey, but both send a HeadObjectCommand, and NoSuchKey is not modelled on that operation. From the installed SDK:
So against real S3 a missing key surfaces as NotFound, never NoSuchKey. The err["$metadata"]?.httpStatusCode === 404 check is what actually catches it in both methods, which is why behaviour is correct today — the NoSuchKey arms are simply never taken.
This showed up while writing branch coverage: reaching those arms required hand-constructing new S3.NoSuchKey({} as any) and rejecting a mocked send with it. Nothing the HeadObjectCommand path can produce yields that type.
S3.NotFound is exported (@aws-sdk/client-s3/dist-types/models/errors.d.ts:131) and is the type those lines should name — or they can be dropped entirely in favour of the existing 404 check.
2. getInfo timestamp fallback differs from the other providers
A missing timestamp reads as "modified right now" on S3/MinIO, and as the epoch everywhere else. The epoch is the safer signal — "unknown" should not look like "just changed", which can mislead any freshness or cache check downstream. Changing it to new Date(0) does not break the current spec, which asserts instanceof Date.
3. ConfigureAWS validates after doing the work
ConfigureAWS loads the SDK and constructs the S3Client before checking S3_BUCKET, so the missing-bucket throw comes after that work. ConfigureMinio validates all four of its env vars first. Purely cosmetic, but worth making consistent while the file is open.
Reopening note: this stayed open because the commit trailer read Fixes #7, #8, #9 — GitHub only auto-closes the first reference, since each issue needs its own closing keyword (fixes #7, fixes #8, fixes #9). The fix itself shipped.
Activity
fix(file-store): honour the FileStore contract on local, and AWS_REGI…
saby1101 commentedon Aug 14, 2026
Fixed in cc36c03, merged to
mainvia #10 (merge commit 3e812f8).Reopening note: this stayed open because the commit trailer read
Fixes #7, #8, #9— GitHub only auto-closes the first reference, since each issue needs its own closing keyword (fixes #7, fixes #8, fixes #9). The fix itself shipped.chore: upgrades and quality gates for 2.16.0
test: assert write failures propagate, and run MinIO in CI