Skip to content

Release: Add durable npm release state for better recoverability - #80201

Open
ciampo wants to merge 4 commits into
trunkfrom
codex/npm-release-durable-state
Open

Release: Add durable npm release state for better recoverability#80201
ciampo wants to merge 4 commits into
trunkfrom
codex/npm-release-durable-state

Conversation

@ciampo

@ciampo ciampo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #80190. Followed by #80202 and #79906.

What?

Makes a prepared npm release durable and recoverable while keeping the existing single-command workflow.

Why?

Publishing and finalization must be safely rerunnable from a fresh checkout after a partial failure, without adopting another run's state or starting a second release.

How?

  • Records the release route and stable release ID in Git, then reconstructs the exact package set from the prepared commit.
  • Pushes and verifies the prepared release branch before publishing to npm.
  • Validates the checkout, npm registry state, remote branch, and package tags before each irreversible phase.
  • Records completion with an exact finalization marker whose parent, tree, route, and release ID are verified.
  • Keeps retries idempotent across lost push acknowledgements, partial tag pushes, backports, and split-phase reruns.
  • Preserves the release branch history depth needed by Lerna.

CLI phase selection is intentionally left to the next PR in the stack.

Testing Instructions

npm run test:unit -- tools/release/commands/test/common.js tools/release/commands/test/packages.js --runInBand
npm run lint:js -- tools/release/cli.js tools/release/commands/common.js tools/release/commands/packages.js tools/release/commands/test/common.js tools/release/commands/test/packages.js
node tools/release/cli.js publish-npm-packages-latest --help
npm run build

Testing Instructions for Keyboard

Not applicable; this changes release tooling only.

Screenshots or screencast

Not applicable.

Use of AI Tools

Codex was used to help split, adversarially review, and verify the implementation and draft this description. I reviewed the resulting changes.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.72 MB

compressed-size-action

@github-actions

Copy link
Copy Markdown

Flaky tests detected in 9da7012.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29263505596
📝 Reported issues:

@ciampo ciampo added [Type] Build Tooling Issues or PRs related to build tooling Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Jul 14, 2026
@ciampo
ciampo force-pushed the codex/npm-release-durable-phases branch from 7661cdb to 47500df Compare July 16, 2026 11:59
@ciampo
ciampo force-pushed the codex/npm-release-durable-state branch 2 times, most recently from 18060e0 to a15d561 Compare July 16, 2026 13:25
Base automatically changed from codex/npm-release-durable-phases to trunk July 16, 2026 14:22
@ciampo ciampo self-assigned this Jul 16, 2026
@ciampo
ciampo force-pushed the codex/npm-release-durable-state branch from a15d561 to c1f74ea Compare July 16, 2026 15:21
@ciampo
ciampo requested a review from Copilot July 16, 2026 15:22

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@ciampo
ciampo marked this pull request as ready for review July 16, 2026 16:29
@ciampo
ciampo requested a review from manzoorwanijk as a code owner July 16, 2026 16:29
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo
ciampo requested review from Mamaduka and desrosj July 16, 2026 16:30
@ciampo ciampo changed the title Release: Add durable npm release state Release: Add durable npm release state for better recoverability Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants