Repository navigation
π crux-sync: avoid SIGPIPE from head when printing the commit summary - #14221
Conversation
The first full sync produced a 700-file stat; head closed the pipe and the step died with SIGPIPE (141) after the commit, before the push. Refs #14138 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
Refs #14138 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
d21f5e9
βΉοΈ Sentinel notice β informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at d21f5e9. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Read crux-sync.yml on v5 around both hunks. Two things the body claims that I verified in the tree:
- The
Pushstep already runs onsteps.tag.outputs.tag != ''regardless ofchanged(crux-sync.yml:161), and withchanged=falsethecrux-publishHEAD is still cruxmain, sogit push origin HEAD:mainis a no-op and the tag lands on the existing synced commit β exactly the "tag-only runs tag the existing synced commit" behaviour described. - The
.hive-sync-only restore runs before thegit diff --cached --quiettest, so the earlychanged=falseexit is reached. On a first sync.hive-syncis never the only staged path, so thegit restore --staged --worktreefrom HEAD cannot hit an untracked file.
git show --shortstat --format=... HEAD with no pipe removes the SIGPIPE path. Looks correct to me.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read crux-sync.yml at the PR head end to end, including the Push step. Looks correct to me:
git --no-pager show --shortstat --format="%H %s" HEAD(line 138) has no pipe, so there is nothing left forpipefailto turn into exit 141;set -euo pipefailis on in that step (line 118).- The
.hive-sync-only case (lines 122-125):git restore --staged --worktree .hive-syncruns beforegit diff --cached --quiet, so a timestamp-only diff now yieldschanged=false. ThePushstep is gated onchanged == 'true' || tag != ''and tags$(git rev-parse HEAD)(lines 174, 212-216), so a tag-only run tags the existing synced commit exactly as the body says.
One note, not a defect: on a changed=false run the restore also reverts the worktree copy, so the crux-publish-tree artifact carries the previous .hive-sync timestamp/hive SHA rather than this run's. Fine for a 7-day debugging artifact; mentioning it only so it isn't a surprise.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Run https://github.com/hivecommons/hive/actions/runs/40197595750 (first push-triggered sync after #14199) committed the publish tree and then failed with exit 141:
git show --stat | head -40underset -o pipefaildies with SIGPIPE when head closes the pipe on a 700-file stat. Print a--shortstatsummary without a pipe instead.Also:
.hive-synccarriessynced_at, so every run saw a staged change and would have committed; a.hive-sync-only diff is now restored and treated as "nothing to commit", so tag-only runs (crux/vX.Y.Z) and re-dispatches tag the existing synced commit instead of adding an empty one.The first sync was done by hand with the same script (hivecommons/crux#3, hive@1e02ec49d331) while this lands.
Refs #14138