Repository navigation
Description
Summary
A merged website PR can keep serving its preview. On December 6, GitHub rejected the cleanup for PRs 379 and 383 before assigning a runner. The publisher for PR 383 was already uploading when the PR merged, and readers could still open its English preview afterward. PR 383 cleanup annotation · PR 383 publisher.
Reproduction
-
Read the cleanup result and its job count for merged PR 383.
$ gh run view 47624267437 --repo libtmux/docs --json conclusion,jobs --jq '{conclusion, jobs: (.jobs | length)}' -
Read the timestamps for the preview upload and compare them with the PR’s merge time.
$ gh api repos/libtmux/docs/actions/jobs/145977271747 --jq '.steps[] | select(.name | startswith("Sync to ")) | {started_at, completed_at, conclusion}'$ gh pr view 383 --repo libtmux/docs --json mergedAt
Expected
Closing a website PR removes its own preview after any upload that already started. Once the preview’s cache expires, its URL returns 404. Open previews and production pages stay accessible. Website preview contract.
Actual
The cleanup ended in startup_failure with zero jobs on both PRs. On PR 383, uploading started at 07:34:37 UTC. The PR merged at 07:43:32. At 07:54:33 an anonymous GET of /pr-383/en/ returned 200 and the page identified itself as that PR’s preview. Its Last-Modified time was ten seconds after the merge. The upload finished at 08:14:23 UTC and the publisher succeeded. At 08:19:41, more than five minutes after the upload finished, an anonymous HEAD still returned 200. The response reported a 300-second shared-cache lifetime and an age of 224 seconds. On PR 379, the optional upload was canceled before it took a runner, and its preview returned 404. PR 383 preview · PR 379 cleanup.
At 09:19 UTC, more than an hour after the upload finished, curl --head still returned 200 for PR 383. The same client received 404 for PR 379 and 200 for the production homepage. PR 383 preview · PR 379 preview · Production.
Fix in review
Draft #404 removes closed website previews in an hourly sweep and checks that a retry still belongs to the open PR before uploading. All 21 new regressions failed on the previous workflow. The fix passed them and all 170 existing deployment tests. The hosted verification still needs to show that the scheduled job can use the cleanup role, retire a closed preview, and preserve a reopened preview. Fix and test results.
Environment
Website workflow and earlier successful cleanup
The shared website publishes to its own pr-N/ prefix. Cleanup runs on the PR close event. GitHub’s annotation cites its default restriction on pull_request_target in public repositories. The same cleanup file ran successfully on November 30. On PR 352, the upload finished at 00:48:30 UTC and cleanup started three seconds later. Successful cleanup · GitHub’s policy.
The proposed one-time check asks the scheduled cleanup role whether pr-383/ contains an object. The AWS CLI passed empty, nonempty and denied cases against a local test server. The live result will establish whether this role can inspect that one closed preview. One-folder check #405.
Activity