Skip to content

Enforce cooldown on artifact downloads - #240

Open
oscar-broman wants to merge 1 commit into
git-pkgs:mainfrom
oscar-broman:fix/cooldown-tarball-bug
Open

Enforce cooldown on artifact downloads#240
oscar-broman wants to merge 1 commit into
git-pkgs:mainfrom
oscar-broman:fix/cooldown-tarball-bug

Conversation

@oscar-broman

Copy link
Copy Markdown

Cooldown filtering only ran when rewriting metadata, so a version could be missing from the npm packument and the PyPI simple index while its tarball stayed reachable. Lockfiles record artifact URLs verbatim, so npm ci and pinned pip requirements reach handleDownload without ever requesting metadata.

The shared artifact path has no publish time to check against, since updateCacheDB upserts versions without PublishedAt and the column is only set by enrichment. Each handler now resolves the publish time from metadata it already fetches and returns 404 while a version is inside the window. Versions with no usable publish time are still served, as they are when filtering metadata.

Cooldown filtering only ran when rewriting metadata, so a version could
be missing from the npm packument and the PyPI simple index while its
tarball stayed reachable. Lockfiles record artifact URLs verbatim, so
npm ci and pinned pip requirements reach handleDownload without ever
requesting metadata.

The shared artifact path has no publish time to check against, since
updateCacheDB upserts versions without PublishedAt and the column is
only set by enrichment. Each handler now resolves the publish time from
metadata it already fetches and returns 404 while a version is inside
the window. Versions with no usable publish time are still served, as
they are when filtering metadata.
@oscar-broman oscar-broman changed the title Enforce cooldown on artifact downloads Enforce cooldown on artifact downloads fixes #239 Aug 8, 2026
@oscar-broman oscar-broman changed the title Enforce cooldown on artifact downloads fixes #239 Enforce cooldown on artifact downloads Aug 8, 2026
@oscar-broman

Copy link
Copy Markdown
Author

Fixes #239

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