Skip to content

SDK deploy gate: follow only the redirects the builder follows #97

Open

Description

@shuv1337

Follow-up from the PR #96 reviews (round 2). Deferred under the review budget: no third patch round on #96.

The fork's private-SDK deploy gate in scripts/releases/apps-self-host.ts (downloadFromRegistry) should accept exactly what the app builder accepts, no more and no less.

Invariants:

  1. Follow only 301, 302, 303, 307 and 308, the statuses the builder follows (patches/@cloudflare%2Fworker-bundler@0.2.4.patch around :172-194). Treat any other 3xx (300, 304 and the rest) as a non-OK archive response and refuse it, as the builder does at :369-375. (Astra r2 F1-R2: today the gate follows 300/304 with Location, while the builder fails.)
  2. Use the builder's hop limit, or a lower one. (Opus N3: the gate allows 5, the builder 10.)
  3. Off-origin tarball URLs and redirect hops stay refused before any request goes to the other origin (already true).
  4. When it refuses for origin, the message and the self-host README explain the same-origin rule and the Verdaccio public-URL/url_prefix case. (Opus N1)

Tests (e2e/tests/apps-published.spec.ts, self-host gate):

  • a same-origin 300 and a same-origin 304 carrying Location to a matching archive are refused;
  • a same-origin 302 to a matching archive still passes (Opus N4).

Also drop or fix the App dependency registry alternative in .github/workflows/fork-ci.yml, which matches no scheduled title (Opus N2).

Production impact today: none known. Production's Verdaccio serves tarballs directly on its own origin, with no 3xx.

Reviews: REVIEW-astra-r2.md and REVIEW-opus-r2.md in the lead's evidence directory for #96.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions