fix(ci): auto-release never detects feat/fix once the log exceeds the pipe buffer - #556
Merged
Merged
Conversation
… pipe buffer The bump detection piped the whole `git log` into `grep -q`. `grep -q` exits at the first match, so once the log outgrows the 64 KiB pipe buffer the still-writing `printf` gets EPIPE — and under `set -o pipefail` that failed writer, not grep's 0, becomes the pipeline's exit status. The condition therefore reads as "no match" precisely BECAUSE there was a match. This wedges permanently rather than intermittently: no release means no new tag, which means a longer commit range next time. The last release was v0.56.0 on 2026-06-30; every run since has logged "No feat/fix commits" while 19 feat/fix commits sat in the range (655 KiB of log). The run at 30552280319 shows the tell in its log — "printf: write error: Broken pipe" on exactly the feat and fix grep lines. Have grep read a file instead; a file read cannot EPIPE. Also report the range's commit count on the skip path, so "no feat/fix among 19 commits" is visibly wrong in the log rather than silently plausible. Verified by replaying the real v0.56.0..main range: bump=minor, next tag v0.57.0, changelog generates 39 lines across Added/Changed/Fixed, and new_tag is set so publish-images and desktop-apps stop being skipped.
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.
Problem
The release pipeline has not cut a release since v0.56.0 (2026-06-30), despite 19
feat:/fix:commits landing onmain. Everyauto-releaserun since has succeeded while loggingNo feat/fix commits since v0.56.0 — skipping release, which also skippedpublish-imagesanddesktop-apps(no images, no desktop installers for a month).Root cause
The bump detection piped the entire
git logintogrep -q:grep -qexits at the first match. Ifprintfstill has data buffered at that point, it getsEPIPE. Underset -o pipefailthe pipeline's exit status is that failed writer, not grep's0— so the condition evaluates as no match precisely because there was a match.Below ~64 KiB (the pipe buffer)
printfcompletes before grep exits, so the pipeline is correct and the workflow worked for months. Past that threshold it inverts. And it wedges permanently rather than intermittently: no release → no new tag → a longer commit range on the next run.The tell is visible in the log of run 30552280319 —
printf: write error: Broken pipeon script lines 13 and 15, which map to exactly thefeatandfixgrep lines:Reproduced deterministically against the real range (655 KiB of log):
bump=[]with 19 matching commits present.Fix
grepread the file. A file read cannotEPIPE, so thepipefailinteraction disappears at the source rather than being papered over (e.g. by droppingpipefailor adding|| true, both of which would mask genuine failures).No feat/fix among 0 commitsis a normal skip;among 19 commitsis visibly wrong. This class of bug was silent for a month because the message was plausible either way..github/workflows/auto-release.ymlwas the only occurrence of the pattern in CI. The| grep -quses indesktop-apps.ymlread tinycodesign/fileoutput and are unaffected.Verification
Replayed the real
v0.56.0..mainrange with the fixed script, mutations (git tag/git push/gh release create) stubbed:generate-changelog.mjs notes v0.56.0 mainexits 0 and produces 39 lines acrossAdded/Changed/Fixed.new_tagis set, sopublish-imagesanddesktop-appsare no longer skipped.Note on merging
Merging this PR is itself a push to
main, so it will triggerauto-releaseand cut v0.57.0 covering the full month of accumulated commits — one release with the complete backlog rather than the 19 individual ones that were missed. Images and desktop installers will build for it.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.