Skip to content

[Bug]: Release retry rebuilds when retained original artifacts are unavailable #223

Closed

Description

@jimhoyd

Runtime revision and environment

Release source 72d004bef4212342e30527685131dbc5c6688a9d, GitHub Actions Ubuntu / Node 22, core 0.4.0-alpha.3. Follow-up to #185.

Minimal reproduction

  1. Publish core through release.yml, run 35486781016 attempt 1 (successful).
  2. After all four packages have published, rerun that successful core run with gh run rerun 35486781016 to test idempotent restoration.
  3. Observe Restore original artifacts on retry succeeds, but Prepare core artifacts executes rather than being skipped.

Expected: restore retained original bytes and skip rebuild. If this is a retry and original bytes cannot be retrieved, stop before rebuilding; recover already-published bytes from a verified durable source only through a deliberate, validated recovery path.

Actual: the run artifacts API returned an empty list. The specific artifact ID returned 404. The helper treats absence as a first build regardless of GITHUB_RUN_ATTEMPT and starts preparation. I cancelled attempt 2 during preparation, before retention/signing/publication. All four original npm versions and GitHub releases remain intact; no tag moved and no published asset was overwritten.

Relevant output

Original successful attempt: https://github.com/jimhoyd-com/urlcode/actions/runs/35486781016/attempts/1
Cancelled retry: https://github.com/jimhoyd-com/urlcode/actions/runs/35486781016/attempts/2

Attempt 1 upload log: artifact release-jimhoyd-urlcode-0.4.0-alpha.3.tgz-72d004bef4212342e30527685131dbc5c6688a9d, ID 10597602118, five files, retention 90 days, successfully finalized at 2026-09-20T03:37:05Z.

During attempt 2 at approximately 03:48 UTC:

  • GET repos/jimhoyd-com/urlcode/actions/runs/35486781016/artifacts returned artifacts: [].
  • GET repos/jimhoyd-com/urlcode/actions/artifacts/10597602118 returned 404.
  • Restore step green; Prepare core artifacts running.

Why the artifact was unavailable is unverified. The defect established here is fallback to rebuild on retry without original artifacts. A retry must fail closed, and recovery needs an executable acceptance test. Existing integrity guards still prohibit republishing different bytes for the same npm version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions