Skip to content

πŸ› crux-sync: avoid SIGPIPE from head when printing the commit summary - #14221

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
crux-sync-sigpipe
Oct 25, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
crux-sync-sigpipe

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

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 -40 under set -o pipefail dies with SIGPIPE when head closes the pipe on a 700-file stat. Print a --shortstat summary without a pipe instead.

Also: .hive-sync carries synced_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

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 25, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@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.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 25, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

Refs #14138

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor
d21f5e9

ℹ️ Sentinel notice β€” informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head d21f5e9934e6) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation β€” a maintainer should confirm the change is intended before it merges.

  • sensitive_path β€” changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/crux-sync.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 4bee931 into v5 Oct 25, 2026
68 of 70 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the crux-sync-sigpipe branch October 25, 2026 13:55
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#14221d21f5e9` sha256:1ada025bd2ef872fa085b58b886d2d6fb136d35336fa931854c8a2f607ebdb82 β€” download from the dashboard or `hivectl review evidence #14221`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at d21f5e9.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 25, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read crux-sync.yml on v5 around both hunks. Two things the body claims that I verified in the tree:

  • The Push step already runs on steps.tag.outputs.tag != '' regardless of changed (crux-sync.yml:161), and with changed=false the crux-publish HEAD is still crux main, so git push origin HEAD:main is 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 the git diff --cached --quiet test, so the early changed=false exit is reached. On a first sync .hive-sync is never the only staged path, so the git restore --staged --worktree from 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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for pipefail to turn into exit 141; set -euo pipefail is on in that step (line 118).
  • The .hive-sync-only case (lines 122-125): git restore --staged --worktree .hive-sync runs before git diff --cached --quiet, so a timestamp-only diff now yields changed=false. The Push step is gated on changed == '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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant