Keep transcriber syncs on one rolling branch#133
Conversation
The source repository is switching to publishing on every merge to main (YurMil/ws-speech-text#5). A branch per release would then leave a queue of near-identical pull requests here, each superseded by the next before anyone looked at it. One branch, updated in place: it always carries the newest artifact that has not been merged yet. - push with --force rather than --force-with-lease. The branch is rebuilt from main on every run and owned by the workflow, and a freshly created local branch has no remote-tracking ref, so --force-with-lease would fail outright. - the pull request title is updated as well as the body, since the open request now stands for whichever release is newest rather than the one that opened it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e8b4cbe5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # run and is owned by this workflow, so there is nothing to preserve; | ||
| # --force-with-lease would fail outright here, because a freshly | ||
| # created local branch has no remote-tracking ref to compare against. | ||
| git push --force origin "$branch" |
There was a problem hiding this comment.
Reject stale releases before force-pushing the rolling branch
When an older dispatch runs after a newer one (for example, a delayed source release event or a manual workflow_dispatch for an earlier tag), this unconditional push to the single rolling branch rewrites the existing PR back to that older artifact because the workflow never compares TAG/manifest buildTime with what is already on the PR. The previous per-tag branches could not replace a newer PR this way, but now the last completed run always wins, so a stale artifact can be presented and merged as the latest unless older releases are skipped before updating the branch.
Useful? React with 👍 / 👎.
Companion to YurMil/ws-speech-text#5, which switches the transcriber to publishing on every merge to its
main.Merge this first. Otherwise the first few auto-releases each open their own pull request here.
Why
Today the sync creates
chore/whisper-transcriber-<tag>, one branch per release. That was fine when releases were hand-cut tags. Once every merge publishes, it leaves a queue of near-identical pull requests, each superseded by the next before anyone looks at it.One rolling branch instead —
chore/whisper-transcriber-sync— always carrying the newest artifact that has not been merged yet, with its pull request updated in place.Two details worth reviewing
--forcerather than--force-with-lease. The branch is rebuilt frommainon every run and is owned by the workflow, so there is nothing to preserve. More to the point,--force-with-leasewould fail here: a freshly created local branch has no remote-tracking ref to compare against, so the push is rejected as stale. This is not laziness about the safer flag; the safer flag does not work in this shape.Review still gates production: nothing deploys until that pull request is merged.
npm run typecheckpasses; the workflow YAML parses.🤖 Generated with Claude Code