fix(tooling): keep update pull requests open across reruns - #56
Merged
Merged
Conversation
Rerunning the maintainer script from a checkout still on the update branch closed that branch's own pull request, because it judged "already current" from the checkout instead of the default branch. A tracking ref left from a branch GitHub had deleted also made the next push fail its lease. An unchanged run now closes a same-release pull request only when the default branch on GitHub already vendors that release, a missing remote branch drops its stale tracking ref before the push, and a repository whose ci.yml cannot be dispatched gets a clear message and a failed run instead of an unexplained crash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Publish fixes to the maintainer script that proposes a release as a patch release of the shared web standard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
A maintainer can rerun the release script safely, and a repository that can't run
Validateon itsupdate pull request now says why. This patch release is also the first to reach repositories
through their own
Standard updateworkflow.Overview of Changes
What went wrong in the v0.5.0 rollout
Rolling v0.5.0 out to the website, I reran
standards/propose.tsfrom a checkout still on theupdate branch. The script decided "this repository already matches v0.5.0" from that checkout and
closed the update pull request it had just opened. The next run then failed to push, because the
local clone still had a tracking ref for the branch GitHub had deleted, so
--force-with-leaserefused. Neither affects the daily workflow, which always starts from a fresh
main, but both madethe maintainer script unsafe to rerun.
The fix
An unchanged run now reads the vendored release from the default branch on GitHub and closes a
same-release pull request only when that branch already carries the release. When the update branch
is missing on GitHub, the script drops any leftover tracking ref before pushing. When
ci.ymlhasno
workflow_dispatchtrigger, the run opens its pull request, prints what to add, and fails,instead of stopping partway with a bare error.
Testing
pnpm checkpasses. New tests driveproposeReleasethrough a recording fake runner. They checkthat a same-release pull request stays open while the default branch is behind, and closes once the
branch carries the release. They also check that the stale ref is removed before the push, that a
patch update turns on auto-merge, and that a failed dispatch sets the exit code without throwing.
Follow-ups
Standard updatein labs by hand to watch the first pull request opened with aworkflow's own token merge itself, then let the daily runs reach the other repositories.
🤖 Generated with Claude Code