Skip to content

fix(pr-package): keep PR previews until the pull request closes - #1511

Merged
Mkassabov merged 2 commits into
mainfrom
fix/pr-package-ttl-until-pr-close
Sep 7, 2026
Merged

fix(pr-package): keep PR previews until the pull request closes#1511
Mkassabov merged 2 commits into
mainfrom
fix/pr-package-ttl-until-pr-close

Conversation

@Mkassabov

@Mkassabov Mkassabov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Preview packages used to vanish when their 1-week TTL fired, even if the PR was still open.

Tag assignment now accepts Alchemy-Pull-Request: owner/repo#123. On TTL expiry the Durable Object checks GitHub and renews while any tied PR is open. A closed PR releases only the tags that were assigned with that PR and that no other open PR also claims, so a content-addressed tarball shared with main or with another PR pinning the same commit is left alone.

PUT /projects/alchemy/tags
Alchemy-Pull-Request: alchemy-run/alchemy#123
Alchemy-TTL: 1 week
DELETE /projects/alchemy/pull-requests/123
  • Tags are tracked per PR in the Durable Object state (pullRequests: { "owner/repo#n": { tags, verifiedAt } })
  • GITHUB_TOKEN at deploy time binds a token for the PR lookups; a PR GitHub cannot confirm keeps renewing for at most 28 days after it was last seen open
  • CI uses actions#12 (the publish action sends the header itself), deletes the preview on closed, and rewrites the sticky install comment
  • pr-package unit tests run in check.yml

TTL expiry now checks GitHub when a tarball is tagged with
Alchemy-Pull-Request and renews while the PR is open. CI binds that
header after publish, deletes the preview on close, and updates the
sticky install comment.
@alchemy-version-bot

alchemy-version-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Preview packages for this PR have been removed.

The install URLs from this comment no longer resolve. Older per-commit URLs expire with their TTL.

Closing one PR could release tags another open PR still claimed on the
same content-addressed tarball. Tags are now recorded per PR; a closed
PR releases only tags no other open PR claims. GitHub lookups accept a
bound GITHUB_TOKEN and unverifiable PRs stop renewing after 28 days.
Use actions#12 so the publish action sends Alchemy-Pull-Request itself.
@Mkassabov
Mkassabov merged commit b12d816 into main Sep 7, 2026
5 checks passed
@Mkassabov
Mkassabov deleted the fix/pr-package-ttl-until-pr-close branch September 7, 2026 10:03
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