fix(ci): make RC latest recovery failure-tolerant - #1973
Conversation
Match Point latest at current @rc to the Mark-workspace gate so a failed Changesets step can still recover npm latest on the same run. Document that every-v1-push retag while pre/rc is intentional. Co-authored-by: Yam Borodetsky <hi@yam.codes>
|
There was a problem hiding this comment.
ℹ️ No critical issues — one rough edge in the recovery coverage.
Reviewed changes — full diff (2 files, 1 commit) for the RC latest recovery follow-up.
- Failure-tolerant npm recovery —
Point latest at current @rcnow carries!cancelled() && (success() || failure()), so a run where an earlier step (including Changesets) fails still attempts the retag, matching theMark workspace GitHub prereleases as Latestsibling. - Scope documentation — new workflow comments and
RC_CHECKLIST.md§C wording record that the every-v1-push--from-rc/--from-workspaceretag whilepre.jsonispre/rcis intentional, plus theNPM_TOKENfailure caveat.
ℹ️ A partial publish still skips the npm retag
The failure tolerance landed on the published != 'true' recovery step only. The primary Point latest at published RC step (release.yml:95-96) still has just if: steps.changesets.outputs.published == 'true', so it inherits the implicit success() gate — and changesets/action sets published = "true" before it exits non-zero on a partial publish. That leaves published == 'true' on a failed step, so the primary retag is skipped by success(), the recovery step is skipped by published != 'true', and only the Mark-GitHub sibling runs. npm latest then trails the previous RC until the next v1 push (which does recover).
Technical details
# Cover the `published == 'true'` failure path too
## Affected sites
- `.github/workflows/release.yml:95-96` — `Point latest at published RC` (`if: steps.changesets.outputs.published == 'true'`) has no failure-tolerant guard, so it is skipped when the Changesets step fails.
- `.github/workflows/release.yml:111-119` — the `published != 'true'` recovery step is now failure-tolerant, but its condition excludes the `published == 'true'` case.
- `changesets/action` v2.1.1 `src/index.ts` — after `runPublish`, it calls `core.setOutput("published", "true")` / `published-packages` and only then `process.exit(result.exitCode)` when the publish script exited non-zero. `runPublish` returns `published: true` whenever any `git-tag` event was emitted, i.e. some packages published.
## Required outcome
- When the Changesets step fails but reports `published == 'true'` (partial publish), `latest` is retagged to the just-published RC on the same run instead of waiting for the next `v1` push. This matches the sibling `Mark GitHub prereleases as Latest`, which already runs under that condition.
## Suggested approach
- Add `!cancelled() && (success() || failure()) &&` to the `Point latest at published RC` step's `if`, mirroring the recovery step. The `published == 'true'` vs `published != 'true'` conditions stay mutually exclusive, so there is no double retag.
## Open questions for the human
- Is the current asymmetry (GitHub Releases updated, npm `latest` stale until the next push) acceptable because it self-heals on the next `v1` push, or should the primary step be made failure-tolerant now?DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
changesets/action can set published=true then exit non-zero. Without a failure-tolerant gate, Point latest at published RC was skipped by success() while recovery skipped on published!='true', leaving latest stale until the next v1 push. Co-authored-by: Yam Borodetsky <hi@yam.codes>
|
Addressed Pullfrog’s partial-publish gap:
Still waiting for your merge go-ahead. |
Match RC_CHECKLIST §C to the release.yml gate that also covers partial-publish published=true failures. Co-authored-by: Yam Borodetsky <hi@yam.codes>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — incremental since the prior pullfrog review (1 commit, 52d15fc → ff20c46, .github/workflows/release.yml only).
- Failure-tolerant primary retag —
Point latest at published RCnow carries!cancelled() && (success() || failure()) && steps.changesets.outputs.published == 'true', so a partial publish that setspublished = "true"and still exits non-zero retags npmlateston the same run instead of trailing until the nextv1push. This is the exact fix the prior review's### ℹ️section asked for. - Rationale comment — the new comment above the step records the partial-publish failure mode and points at the
Mark GitHub prereleases as Latestsibling for parity.
The published == 'true' and published != 'true' conditions remain mutually exclusive, so the primary and recovery steps cannot both fire in one run, and the gate now matches all three sibling steps.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Summary
Follow-up to #1972 addressing the Pullfrog review that landed after CI went green (and was missed before merge), plus the follow-up review on this PR.
Point latest at current @rcuses!cancelled() && (success() || failure()), matching Mark-workspace.Point latest at published RCgets the same gate. changesets/action can setpublished=truethen exit non-zero; without this, primary retag skipped bysuccess()and recovery skipped bypublished != 'true'.v1-push--from-rc/--from-workspacewhilepre/rcis intentional; documented in workflow +RC_CHECKLIST.md§C.No changeset (CI/docs only).
Test plan
release.ymlgatesRelated: #1972