Skip to content

Prevent fixed PRs from restoring legacy Turbo snapshots #254

Description

@davidvornholt

A pull request can keep trusting a Turbo snapshot published by an earlier, unsafe revision even after the workflow stops pull requests from saving new snapshots. That lets a required quality gate replay planted task output instead of executing the exact commit under review.

Evidence

PR #251 kept the legacy turbo-${{ runner.os }}-${{ runner.arch }}- restore prefix when its fix changed pull requests to restore-only. The post-fix run restored the pre-fix PR snapshot and skipped six of nine tasks. A focused Turbo 2.10.5 probe copied a passing artifact to the predicted hash of a sibling revision whose command should fail with exit 23; Turbo reported a hit, replayed the passing output, and exited 0. This behavior is reproducible on the pre-fix SHA, so the bounded review-fix verification pass must defer it.

Concrete failure

Revision A publishes a planted artifact under the legacy prefix. Revision B contains the trusted-publication fix but restores A's PR-ref cache. Turbo replays the planted pass for B's changed task, so the exact commit can pass without running that task.

Suggested verification

Move the trusted lifecycle to a cache namespace no pre-fix workflow could publish. Add a two-revision fixture whose old namespace contains a passing artifact renamed to the failing revision's hash; the revised workflow must miss it and execute the failing command. Confirm the Actions log restores no legacy per-run key.

Found while verifying #251.

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

    deferred-findingDeferred review finding filed by a review-fix cycle

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions