Repository navigation
fix(release): find the last release by a marker tag on main - #620
Conversation
release-please names its own tag source-vX.Y.Z, creates it on the release merge on main, and finds its previous release by it. The release hook parses the handed name into vX.Y.Z once, holds the marker to the merge commit before it mints anything, and last gives the draft vX.Y.Z as its tag and title. last-release-sha, the hook job that stamped it, and the two checks that judged it are deleted.
There was a problem hiding this comment.
🔵 Needs a closer look
Human confirmation of release-ID platform synchronization, initial marker placement, and ruleset deployment is needed because current publishers still reference the original tag that the hook renames.
No open issues 🎉
What changed in this PR
Replaces the manually maintained release boundary with source-vX.Y.Z tags on main, allowing release-please to find previous releases while keeping consumer tags on packaged commits.
Changes:
- Enables source marker tags and removes the anchor script, jobs, and checks.
- Parses and validates markers, then renames packaged draft releases to
vX.Y.Z. - Declares marker protection and updates tests and release documentation.
Migration requires the publish-by-release-ID platform sync and initial marker tag before merging.
| File | Description |
|---|---|
test/workflows/workflow-loader.ts |
Makes the workflow text helper private. |
test/workflows/post-green-workflow.test.ts |
Updates permission and wiring checks for marker-based releases. |
test/workflows/head-ref.ts |
Removes the obsolete release-branch condition helper. |
test/workflows/checks-workflow.test.ts |
Removes tests for the deleted anchor check. |
test/scripts/release-pipeline.test.ts |
Replaces anchor tests with marker validation and draft-renaming cases. |
test/scripts/release-pipeline-fixture.ts |
Seeds release markers and removes anchor-specific helpers. |
test/scripts/release-pipeline-build.test.ts |
Adds a marker to the later-release fixture. |
release-please-config.json |
Enables source-component tags and removes the manual boundary. |
README.md |
Explains why source markers are not runnable action pins. |
CONTRIBUTING.md |
Documents marker-based releases and release-PR refresh requirements. |
AGENTS.md |
Distinguishes source markers from packaged consumer refs. |
.github/workflows/update-release.yml |
Passes resolved version tags downstream and renames the draft. |
.github/workflows/update-release-pr.yml |
Removes the anchor job, retaining npm prerelease publication. |
.github/workflows/checks.yml |
Removes boundary and anchor checks. |
.github/settings.local.yml |
Declares marker-tag protection with an admin repair bypass. |
.github/scripts/release-pipeline/tags.ts |
Parses marker names and verifies their targets before release pushes. |
.github/scripts/release-pipeline/draft.ts |
Resolves version tags and adds draft renaming. |
.github/scripts/release-pipeline/anchor.ts |
Deletes the manual release-boundary implementation. |
.github/scripts/release-pipeline.ts |
Replaces anchor commands with marker-aware draft handling. |
Review effort: Balanced
|
Build Sync report
Written
Mirrors
ReviewHold for review: no |
…, and log the rename - resolve-source reads the handed release's draft state and refuses a published one, naming the config key that hands the hook a draft. - resolve-source says in its own words when no release carries the handed name, as after the hook's rename, and points at the renamed release. - rename-draft prints the old name and the new one on success. - The pipeline header and the packageRelease comment fit their caps, and the header no longer says the marker is the only tag on main. - The input descriptions in update-release-pr.yml and the hook order in CONTRIBUTING.md say what the workflows do. - The two rename-draft rows that repeated the shared "must be set" message are deleted.
There was a problem hiding this comment.
🔵 Needs a closer look
The release migration requires confirming that platform synchronization preserves release identity across tag renaming and that the initial source marker is correctly placed, while the checked-in caller still passes a tag.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The hook renames tags still used by the stable publisher, so merging requires a coordinated publish-by-ID rollout, verification of the manifest-version source marker on main, and closure of the old-config release PR.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The hook renames tags still used by the stable publisher, requiring coordinated rollout and human confirmation of release-ID publishing deployment, migration marker placement, and closure of the old release PR.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The migration requires maintainer verification that the manifest marker targets its release merge, the old release PR remains unmerged, and source-tags protection is deployed; the release-please discovery dry run was not performed.
No open issues 🎉
Review effort: Balanced
Before
After
How
source, tag creation is forced, the title pattern stays.resolve-sourceturns the handedsource-vX.Y.ZintovX.Y.Zonce, refusing any other name and a published release.packageholds the marker to the release merge before any push and names the repair.rename-draftgives the draftvX.Y.Zas tag and title, still a draft, after the mint.source-tagsfreezessource-v*, with an admin bypass.Proof
bun test test/scripts test/workflows: 644 pass, 0 fail.CHANGELOG.md.Technical details
Migration
State when this was written:
mainat2982e7ea, manifest3.0.0, release PR #587 open, nosource-v*tag on origin.source-v<version>for the version in.release-please-manifest.jsononmain, on the commit titledchore(main): release <version> (#N).source-v3.0.1on that merge commit, pushed the same way.mainis merged into this branch, keeping this config.What must never happen
mainwith no marker for the manifest's versionrelease-please--branches--main) merged after this PRautorelease: pending, and later release runs abort.source-tagsruleset holds the older ones.packagemintedvX.Y.ZvX.Y.Zonmain, at the draft's target.First run after the merge
The release job's log, in release-please 17.6.0's wording:
When that release PR merges:
What the hook prints for a release it will not take
vX.Y.Zwhensource-vX.Y.Zis gone.Dry run
--dry-runonly builds and prints the pull request, and the token keeps safety off one flag.--local --local-pathin a working checkout. It runsgit reset --hard origin/mainthere.fix/release-marker-tagin place ofmain.3.0.1.What changes besides the mechanism
compare/v3.0.0...v3.0.1compare/source-v3.0.0...source-v3.0.1v*,latest,build/*source-vX.Y.Z, which is not a pinrelease-please--branches--mainrelease-please--branches--main--components--sourcevX.Y.Zsource-vX.Y.ZLine accounting
test/scripts/release-pipeline.test.ts21,test/workflows/checks-workflow.test.ts3 (the whole file).test/workflows/post-green-workflow.test.ts1, the anchor job's grant control.git grep -n 'last-release-sha\|anchor-check\|boundary-check\|anchorCheck\|boundaryCheck\|anchorReleasePr' -- . ':!CHANGELOG.md'prints nothing.The config contract test
release-please-config.json.draft: trueresolve-sourcerefuses a published release. One test, with a draft passing beside it.force-tag-creation: falsepackagerefuses a missing marker and names the push that creates it.skip-github-release: falseFiles
release-please-config.json:include-component-in-tagon,component, the title pattern,force-tag-creationon,last-release-shagone..github/scripts/release-pipeline/anchor.ts: deleted..github/scripts/release-pipeline.ts: three subcommands gone,rename-draftadded,resolve-sourcewritestag..github/scripts/release-pipeline/{draft.ts,tags.ts}: the parse, the draft check, the marker check, the rename..github/scripts/release-pipeline/npm.ts: unchanged, it is handedvX.Y.Z..github/workflows/update-release.yml: steps takevX.Y.Zfromresolve-source, the rename is the last step ofverify-release..github/workflows/update-release-pr.yml: theanchorjob and its comment lines gone, both inputs described as read by no job,publish-nextuntouched..github/workflows/checks.yml:boundary-checkandanchor-checkgone..github/settings.local.yml: rulesetsource-tags.test/workflows/{checks-workflow.test.ts,head-ref.ts}: deleted.test/scripts/release-pipeline{.test.ts,-fixture.ts,-build.test.ts},test/workflows/{post-green-workflow.test.ts,workflow-loader.ts}: the tests above.AGENTS.md,CONTRIBUTING.md,README.md: the marker rule.Gates
bun run typecheck,lint,lint:arch,knip,check:compat,build:check,check:headers: exit 0.actionlinton the three changed workflows: exit 0.git diff --stat origin/main...HEAD -- srcprints nothing.Recorded, not built
package-releaseafter the rename does not converge:resolve-sourcestops it, saying no release is namedsource-vX.Y.Z.verify-releasealone after the rename still fails with gh'srelease not found, atverify-assets.CONTRIBUTING.mdstates the rule.