Skip to content

Attach the tarballs before the Release publishes, because published means frozen - #166

Merged
wmadden-electric merged 2 commits into
mainfrom
s7-release-immutable-assets
Aug 12, 2026
Merged

Attach the tarballs before the Release publishes, because published means frozen#166
wmadden-electric merged 2 commits into
mainfrom
s7-release-immutable-assets

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

Replaces #165, which showed the whole already-merged S7 diff because #164 was squash-merged out from under its branch. Content here is exactly the two new commits.

The grounding example

The first real next publish (run 31618278670) shipped both packages to npm and then failed its final step:

https://github.com/prisma/prisma-cli/releases/tag/v8.0.0-rc.1
HTTP 422: Cannot upload assets to an immutable release.
##[error]Process completed with exit code 1

v8.0.0-rc.1 exists, marked pre-release — with no tarballs attached, and none can ever be attached now.

The decision

This repo's releases are immutable: publishing freezes assets and tag. So the Release step now creates the Release as a draft with the smoked tarballs already attached, then publishes it through the API by the draft's id — assets first, publish second, the order GitHub's own docs recommend. A draft's tag does not exist yet, so gh release edit <tag> cannot address it; the id lookup handles that. A rerun that finds the Release already published logs that there is nothing to repair and succeeds, instead of failing a run whose npm publish completed.

v8.0.0-rc.1 itself stays assetless — immutability cuts both ways. Its repair path (cosmetic, deferred by operator ruling) is recorded in deferred.md, which this PR also updates.

Alternatives considered

  • Upload then publish via gh release create without --draft — what the code did; gh creates the release published and uploads after, which immutability rejects.
  • Disable immutable releases — the setting is a supply-chain protection worth keeping; the pipeline should conform to it, not the reverse.
  • Delete and recreate v8.0.0-rc.1 with assets now — deferred by operator ruling; steps recorded in deferred.md.

🤖 Generated with Claude Code

wmadden-electric and others added 2 commits August 12, 2026 18:51
…eans frozen

The first real next publish reached the Release step and failed there:
this repo's releases are immutable, so gh release create published
v8.0.0-rc.1 and the follow-up asset upload was refused with HTTP 422.
The step now creates the Release as a draft with the smoked tarballs
already attached, then publishes it through the API by the draft's id
(a draft's tag does not exist yet, so gh cannot address it by tag). A
rerun that finds the Release already published reports there is
nothing to repair and succeeds, instead of failing the run after a
complete npm publish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…r path

Operator ruling 2026-08-12: cosmetic, not immediate. npm is healthy;
only the GitHub Release page is missing its tarballs, permanently,
because it published before the upload and releases are immutable.
The repair steps (merge #165, attempt deletion, re-dispatch) are in
the entry for whoever picks it up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@wmadden-electric, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 48fc1e8a-53c9-4fbb-8f99-4ef0ebacd5cf

📥 Commits

Reviewing files that changed from the base of the PR and between c5fe09d and 5c75a34.

📒 Files selected for processing (2)
  • .drive/projects/prisma-cli-v8/deferred.md
  • .github/workflows/publish.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@166
npx https://pkg.pr.new/@prisma/cli-engine@166

commit: 5c75a34

@wmadden-electric
wmadden-electric merged commit 94fdac2 into main Aug 12, 2026
12 checks passed
@wmadden-electric
wmadden-electric deleted the s7-release-immutable-assets branch August 12, 2026 16:55
wmadden pushed a commit that referenced this pull request Aug 12, 2026
Records only — no code. Follows the S3 close-out precedent (#157).

## What this records

The S7 contract's seven acceptance items verified against source, merged
PRs (#164, #166), two dry-run dispatches, and the registry:
`@prisma/cli@8.0.0-rc.1` and `@prisma/cli-engine@8.0.0-rc.1` are live
under `next`, `latest` untouched — the project DoD's artifact exists,
published by the operator's own action.

The Close-out section in `specs/s7-release.md` records the evidence per
acceptance item, the two incidents from the first real publish (npm's
trusted publisher still naming the deleted `publish-cli.yml`; the
immutable Release freezing assetless before its upload) with their
dispositions, and the one deliberately amended item: "Release with
tarballs attached" holds from #166 onward, not for `v8.0.0-rc.1` itself.
`plan.md` marks the slice closed. `deferred.md` gains the
offered-but-undecided publish-script extraction.

## Out of scope here

The S5 cutover (brief in #167, dispatched elsewhere), S2d and S6 (both
dispatched elsewhere), S9.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants