Skip to content

πŸ› ci(scorecard): skip push runs on non-default branches (v5) - #17414

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
fix/scorecard-default-branch-v5
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
fix/scorecard-default-branch-v5

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Option A from #17392: guard the Scorecard job so pushes to non-default release lines are skipped instead of red. Same change on both lines.

Fixes #17392

Scorecard only analyses the default branch, so every push to another
release line failed with 'Only the default branch v5 is supported'.
Guard the job on event/ref so those runs show as skipped.

Fixes #17392

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson clubanderson added the no-changelog No changelog fragment required label Nov 9, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 2026
@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 clubanderson 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 Nov 9, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

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 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • merge-train:duplicate-of#17415:17392/0:0/0:

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Review findings from reviewer (folded here because this head already carries its hive review):

The workflow change is correct; the PR is red only because of a malformed changelog fragment.

Guard (.github/workflows/scorecard.yml:18): github.event_name != 'push' || github.ref_name == github.event.repository.default_branch. On push, ref_name is the bare branch name and default_branch is v5, so pushes to the non-default lines skip while schedule/workflow_dispatch are untouched. It narrows execution and changes no permissions:. This is Option A exactly as #17392 states it (label approved-direction), so no decision is outstanding.

Blocker β€” changelog-fragment-guard fails on this head:

changelog.d/fixed-scorecard-default-branch-guard.md: a fragment must start with a '- ' entry bullet

src/scripts/check-changelog-fragment.sh:72-74 rejects any fragment not starting with - or a release marker. The PR carries two fragments; changelog.d/fixed-17414.md is already well-formed, so deleting changelog.d/fixed-scorecard-default-branch-guard.md (or prefixing its line with - ) is the whole fix. Same defect on #17415.

Minor: both PRs say Fixes #17392; whichever merges first closes the issue while the other line is still open. Harmless, noting only so nobody is surprised.

stage 080-awaiting-merge-admission β†’ 050-review-pending: contributor-lane:workflow-path

Evidence bundle `#1741489e9fa6` sha256:8e67f04d639013e3817d61b36cd37256e1773cf7e9725561efbb9a51753daf9d β€” download from the dashboard or `hivectl review evidence #17414`.

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

The workflow change looks correct to me; the red check is a changelog-fragment format problem, not the code.

Workflow β€” .github/workflows/scorecard.yml:17-18 adds if: github.event_name != 'push' || github.ref_name == github.event.repository.default_branch on the analysis job. Read against the v5 tree: the trigger is still push: branches: [main, v4, v5, v6] plus schedule/workflow_dispatch, so non-default pushes now skip instead of hitting Only the default branch … is supported, and schedule/dispatch are untouched. This is Option A verbatim from #17392 (labelled approved-direction), so no decision is outstanding. The permissions block is unchanged.

Why changelog-fragment-guard fails β€” changelog.d/fixed-scorecard-default-branch-guard.md:1 starts with ci: Scorecard push runs …, no - bullet. src/scripts/check-changelog-fragment.sh:71-76 on v5 requires every fragment's first line to begin with - (or a <!-- release: … --> marker) and exits 1 otherwise β€” that is the exact error in the job log. The second fragment changelog.d/fixed-17414.md is already well-formed and describes the same change, so the simplest fix is to delete fixed-scorecard-default-branch-guard.md (or prefix its line with - and drop the other). Either way the PR should carry one fragment, not two.

Nothing else found. This is a comment, not an approval.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

changelog-fragment-guard is red because changelog.d/fixed-scorecard-default-branch-guard.md has no leading - bullet (guard: "a fragment must start with a '- ' entry bullet"). changelog.d/fixed-17414.md is already valid, so the simplest fix is to delete the duplicate:

git rm changelog.d/fixed-scorecard-default-branch-guard.md

or, if you want to keep it, prefix the line with - . Not pushing to your branch; the sweep merges once CI is green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

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

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

Copy link
Copy Markdown
Contributor
55f388e

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

Hive flagged this PR (author @clubanderson, head 55f388e004ba) 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/scorecard.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.

Looks correct to me; this is Option A exactly as #17392 proposed, and the issue already carries approved-direction.

Verified against .github/workflows/scorecard.yml on v5: the push trigger lists main, v4, v5, v6 (line 7), and the new job-level if: (line 18) lets schedule/workflow_dispatch through while skipping pushes whose github.ref_name is not github.event.repository.default_branch (currently v5). No change to the permissions: block or the pinned reusable-workflow SHA. #17415 is the same guard on the v6 line, not a duplicate β€” the release-lines-in-sync check expects both.

One small thing: the PR ships two changelog fragments for one change β€” changelog.d/fixed-17414.md and changelog.d/fixed-scorecard-default-branch-guard.md β€” so the release notes will carry the same bullet twice. If fixed-17414.md was auto-added, the hand-written one is the better of the two to keep. Not blocking.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge: the PR edits CI workflow / action files: awaiting owner approval β€” a hive owner / trusted merger's GitHub Approve review on the current head (or a dashboard /hive decision approve) releases the fence and the hive merges it; approval on an earlier head does not count unless the hive's own merge of the base branch is all that moved the head, so re-approve after a push.

Head: verdict approved @55f388e, 68/68 checks green, DCO yes, soak 0s of 10m0s.

How to release it:

  • A hive owner / trusted merger submits a GitHub Approve review on the current head (or approves from the Hive dashboard, which posts /hive decision approve on their behalf); that explicit approval releases the workflow-path fence and the lane merges on its next pass once CI, soak and the other gates are clear. Approval on an earlier head carries over only the hive's own merge of the base branch (which leaves the diff unchanged): re-approve after any other push.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@hivecommons-hive
hivecommons-hive Bot merged commit 34c28e2 into v5 Nov 9, 2026
82 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/scorecard-default-branch-v5 branch November 9, 2026 21:13
@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 89e9fa6.

@github-actions

github-actions Bot commented Nov 9, 2026

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

Looks correct to me β€” this is the v5 line of the same change as #17415 (already reviewed), and the two are byte-identical in .github/workflows/scorecard.yml.

What I checked at base v5:

  • .github/workflows/scorecard.yml:16-18 β€” the new if: on the analysis job is exactly Option A from #17392. github.event.repository.default_branch is populated on push events, and the github.event_name != 'push' short-circuit leaves schedule and workflow_dispatch runs unchanged, as the fragment claims.
  • A job-level if: is valid on a uses: (reusable-workflow) job, so the guard applies before the call into hivecommons/infra.
  • The push: branches: [ "main", "v4", "v5", "v6" ] trigger is left as-is, which is what Option A intended β€” non-default pushes show as skipped rather than red.

No defects found. Since the file is under .github/workflows/, a maintainer with workflow-write still needs to land it; nothing further from me.

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

Karibhou added a commit to Karibhou/hive that referenced this pull request Nov 9, 2026
… the pick

The one-PR-per-issue rule and the cross-lane claim-conflict gate ran over
every open candidate on every sweep, regardless of CI or review state, and
the winner flipped the moment either head had a red check. hivecommons#17414/hivecommons#17415
read "needs human decision Β· Let hive decide" with CI at 19/64 and swapped
duplicate-of numbers as checks went red and green.

- A same-issue PR is held (duplicate-of / claim-conflict) only once the
  lane last saw its head at the merge gate, the readiness a train seat
  needs. Short of the gate it is evaluated on its normal path, so its row
  reads CI / Review, and carries a turn the merge point checks: an
  undecided claim conflict holds it there; otherwise the first PR of the
  issue at the merge point takes the issue and the rest yield to it.
- The pick is remembered per lane and issue and stands until the kept PR
  closes or is blocked for good (human merge, not mergeable, terminal
  required-check hold, permanent refusal); a red check does not flip it.
- A merge-point hold verdict reads as merge-gate readiness, so the held PR
  is held at the gate from the next pass.
- The delegate no longer promises a re-pick on the next pass.

Hive-Run: hivecommons#17439
Hive-Plan: issue-17439 options A+C (defer to the merge gate, stable winner)
Hive-Spec: hivecommons#17439#expected
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
Karibhou added a commit to Karibhou/hive that referenced this pull request Nov 9, 2026
… the pick

The one-PR-per-issue rule and the cross-lane claim-conflict gate ran over
every open candidate on every sweep, regardless of CI or review state, and
the winner flipped the moment either head had a red check. hivecommons#17414/hivecommons#17415
read "needs human decision Β· Let hive decide" with CI at 19/64 and swapped
duplicate-of numbers as checks went red and green.

- A same-issue PR is held (duplicate-of / claim-conflict) only once the
  lane last saw its head at the merge gate, the readiness a train seat
  needs. Short of the gate it is evaluated on its normal path, so its row
  reads CI / Review, and carries a turn the merge point checks: an
  undecided claim conflict holds it there; otherwise the first PR of the
  issue at the merge point takes the issue and the rest yield to it.
- The pick is remembered per lane and issue and stands until the kept PR
  closes or is blocked for good (human merge, not mergeable, terminal
  required-check hold, permanent refusal); a red check does not flip it.
- A merge-point hold verdict reads as merge-gate readiness, so the held PR
  is held at the gate from the next pass.
- The delegate no longer promises a re-pick on the next pass.

Hive-Run: hivecommons#17439
Hive-Plan: issue-17439 options A+C (defer to the merge gate, stable winner)
Hive-Spec: hivecommons#17439#expected
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Nov 9, 2026
… the pick (#17444)

* πŸ› fix(automerge): hold same-issue PRs only at the merge gate and keep the pick

The one-PR-per-issue rule and the cross-lane claim-conflict gate ran over
every open candidate on every sweep, regardless of CI or review state, and
the winner flipped the moment either head had a red check. #17414/#17415
read "needs human decision Β· Let hive decide" with CI at 19/64 and swapped
duplicate-of numbers as checks went red and green.

- A same-issue PR is held (duplicate-of / claim-conflict) only once the
  lane last saw its head at the merge gate, the readiness a train seat
  needs. Short of the gate it is evaluated on its normal path, so its row
  reads CI / Review, and carries a turn the merge point checks: an
  undecided claim conflict holds it there; otherwise the first PR of the
  issue at the merge point takes the issue and the rest yield to it.
- The pick is remembered per lane and issue and stands until the kept PR
  closes or is blocked for good (human merge, not mergeable, terminal
  required-check hold, permanent refusal); a red check does not flip it.
- A merge-point hold verdict reads as merge-gate readiness, so the held PR
  is held at the gate from the next pass.
- The delegate no longer promises a re-pick on the next pass.

Hive-Run: #17439
Hive-Plan: issue-17439 options A+C (defer to the merge gate, stable winner)
Hive-Spec: #17439#expected
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>

* πŸ› fix(automerge): key the same-issue winner by base; keep it when the claimant read fell back

Review follow-up on #17444: a forge-state read failure on an event-narrowed
pass no longer forgets a still-open remembered winner, and v5/v6 siblings
no longer share one mergeTrainIssueWinners entry.

Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>

---------

Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
Co-authored-by: Karibhou <Karibhou@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. no-changelog No changelog fragment required 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.

[scanner] Gate proposal: Scorecard push trigger must be default-branch-aware (v6 pushes red: 'Only the default branch v5 is supported')

1 participant