Skip to content

🐛 fix(automerge): sign-off stall notes name the squash gate only where it runs; log the stall at INFO - #14481

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/signoff-stall-note-and-log-level
Oct 27, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/signoff-stall-note-and-log-level

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the triage on #14466. The hive parked three adopted contributor PRs on the projectbluefin hive at stage/085 as adoption-stalled:hive-signoff-attribution, right after its own fix commit:

The park itself is designed (#13800, #13803). Two things around it were wrong, and this changes only those:

  1. The escalation was logged at WARN. The slog feed observes WARN and above, so three designed parks inside ten minutes became an unclassified_error_repeated fleet self-report ([selfreport] unclassified_error_repeated: stage labels: adopted PR sits with nothing the hive can push; escalating to nee… #14466). It is now logged at INFO, as the triage suggested.
  2. The notes said the Sign-off survives the squash gate "stays red". That check is .github/workflows/dco-squash-attribution.yml, which only some repositories carry. None of the three repos above runs it; the hive's own commit check is what held them. The notes now say the hive will not squash-merge the head, and name the check only when the head's required or reported checks include it.

The log-level line is byte-identical to #14480, which the hive's scanner opened against v5. This PR carries it to v6 with a regression test, so the v5→v6 forward-merge meets the same line on both sides.

Cause

At 392df48:

Change

  • Log level: the "adopted PR sits with nothing the hive can push" line is c.info. The escalation, its note and its stage are unchanged.
  • Gate detection: noteStageDCOGate already reads the head's required and reported check names for the dco context. It now also records SquashSignoffGate when one of them is Sign-off survives the squash, for the same head as DCOGateHead. The tracker copies it with the DCO gate, under the same head guard.
  • Note wording: both notes say "…so the hive will not squash-merge this head". They add "(the Sign-off survives the squash check stays red)" only when that check was seen on this head (squashSignoffGateNote). The maintainer asks and the merge-commit route are unchanged.
  • Docs: src/docs/labels-and-control-signals.md said the required check "is red there" for every such head. It now says the hive will not squash-merge the head, that the check is red too only where a repository runs the workflow, and that the notes name the check only then.

Testing

From src/ under /var/tmp, -count=1:

  • go test ./pkg/github/... ./pkg/stageengine/... ./pkg/stagelabels/... ./pkg/fleetreport/... ./pkg/review/...: all ok.
  • go build ./pkg/... ./cmd/... succeeds; go vet ./pkg/github/automerge ./pkg/stageengine/... and gofmt are clean.
  • check-docs-links.py and check-docs-citations.py pass on src/docs; check-changelog-fragment.sh v6 passes.

New and changed tests:

Test Covers
TestSignoffStallNoteNamesSquashGateOnlyWhereItRuns The adoption stall note on the #1028 shape, without and with the check on the head. Goes through noteStageDCOGate and the tracker.
TestSignoffAttributionDecisionNoteNamesSquashGateOnlyWhereItRuns The same for the maintainer sign-off note on a non-adopted, hive-caused head (the testsuite#991 fixture).
TestSquashSignoffGateNoteIsPerHead A check seen on an earlier head is not named.
TestAdoptionStallEscalationLogsAtInfo The escalation logs at INFO, and the real slogfeed handler observes nothing for it.
TestAdoptedInPlaceSquashUnsafeHiveCommitStallsWithoutSupersede Existing. Its doc says the gate rejects the head, so it now notes the check on that head; it still asserts the note names it.

Mutation checks

Each part was broken in turn and restored from a backup:

  • Back to WARN: the log test fails.
  • Always name the check: all three wording tests fail.
  • No detection in noteStageDCOGate: the existing stall test and both wording tests fail.
  • No copy in the tracker merge: the same three fail.
  • No head guard: the per-head test fails.

Not verified

Contributor checklist

  • Changelog: changelog.d/fixed-signoff-stall-note-and-log-level.md.
  • Targets v6.
  • The title uses the emoji convention.
  • Commits include DCO sign-off.
  • Docs updated (src/docs/labels-and-control-signals.md).
  • No secrets, credentials or local runtime state are committed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…e it runs; log the stall at INFO

The adopted-PR stall escalation ("adopted PR sits with nothing the hive
can push") is designed, but it was logged at WARN, so the slog feed counted
three projectbluefin parks toward an unclassified_error_repeated fleet
self-report (hivecommons#14466). It is now logged at INFO, the same line as hivecommons#14480 on
v5.

The adoption stall note and the maintainer sign-off note said the
`Sign-off survives the squash` gate stays red. That check is
dco-squash-attribution.yml, which only some repositories carry; elsewhere
the hive's own commit check holds the head. noteStageDCOGate now records
whether the head's required or reported checks include it, and the notes
say the hive will not squash-merge the head, naming the check only when it
is there.

Refs hivecommons#14466

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 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 danathar 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login 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 stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-failure

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task; your current task is parked (claim kept alive) until this PR is green.

@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. Two notes for the maintainer.

The red checks are not this PR's. test (agent 4/5) (job 121943222780) fails TestPollTmuxOutputForAgent_WiresThrashBreaker 3/3 at src/pkg/agent/thrash_poller_wiring_test.go:110; coverage and test are the roll-ups of that shard. This PR touches nothing under pkg/agent. That is the v6 half of incident #14406, and #14494 forward-ports the #14415 fix. Once #14494 lands, a re-run here should be green.

The change itself, read against v6:

  • squashSignoffGateNote (automerge_merge_commit.go:157-163) returns the check mention only when Detail.SquashSignoffGate is set and DCOGateHead is the observed head. The flag is set in noteStageDCOGate (automerge_stage_labels.go:563-575) from the same required/observed sets as DCOGate, and StageTracker.drain (:296) only copies it inside the existing DCOGateHead == o.HeadSHA guard, so the per-head semantics hold on both paths and TestSquashSignoffGateNoteIsPerHead pins them.
  • c.info exists on v6 (automerge_sweep.go:3213) and slogfeed.minLevel = slog.LevelWarn (slogfeed.go:31), so the INFO line genuinely drops out of the self-report feed; TestAdoptionStallEscalationLogsAtInfo drives the real handler rather than mocking it.
  • Both call sites that carried the old "gate stays red" wording (adoptionBlockerText at automerge_contributor_adopt.go:455 and SignoffAttributionDecisionComment at automerge_merge_commit.go:182) are updated; no other non-test occurrence remains on the head.
  • The log-level change at automerge_contributor_adopt.go:1179 is the same one-line edit as #14480 on v5, as the body says, so the forward-merge meets the same line on both sides.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/shared-ci: the test (agent 4/5) failure here (TestPollTmuxOutputForAgent_WiresThrashBreaker, 3/3 on ubuntu-26.04) is not caused by this PR's diff. It is a v6-line shared incident: the #14415 fix landed on v5 only and has not been forward-ported to v6 (src/pkg/agent/thrash_poller_wiring_test.go). Tracked in #14506; a forward-port PR is being opened. Once it merges, update this branch from v6 and the slice should go green — no change needed in this PR.


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

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 060-reviewed → 050-review-pending: shared-ci-incident:14506

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 27, 2026
…14415) (#14494)

Port 3540e2a from v5 to the v6 path src/pkg/agent/. Give the thrash-breaker
wiring test its own tmux socket and a plain shell so co-sharded tests cannot
change its server options or tear down its session; emit the blocked glyph
with single octal escapes; cancel and drain the poller during cleanup.

Unblocks the test (agent 4/5) shard on v6 fork PRs (#14454, #14481).

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, 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

Copy link
Copy Markdown
Contributor

Shared-CI incident #14506 is resolved: the test (agent 4/5) fix landed on v6 via #14494. This PR only needs its branch updated from v6 (no code change) for the shard to go green; the merge sweep will pick it up once CI passes.


🐝 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: branch synced with v6 (picks up #14494, which fixed the TestPollTmuxOutputForAgent_WiresThrashBreaker failure on test (agent 4/5)). CI pending — sweep will merge when 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

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Danathar this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-failure

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Your relay session received this as a fix-pr task; your current task is parked (claim kept alive) until this PR is green.

@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 automerge_merge_commit.go, automerge_contributor_adopt.go, automerge_stage_labels.go and prstage/types.go at 101417b; this looks correct to me.

  • SquashSignoffGate is written in noteStageDCOGate (automerge_stage_labels.go:573) together with DCOGateHead, and drain() (:294-297) only copies it under the same head guard as DCOGate, so a stale value cannot carry across heads. squashSignoffGateNote (automerge_merge_commit.go:157-163) repeats that guard. Both note sites now use it; no non-test note text still hardcodes the gate name.
  • warn → info at automerge_contributor_adopt.go:1179 is a log-level change only.

CI: test (agent 1/5) is red on TestSendKick_RestartsCrashedCLIThenDelivers and TestRestart_CancelsPendingAsyncKick in pkg/agent, which this diff does not touch; coverage fails only because that shard failed ("Coverage requires successful test shards … agent=failure"). That looks like an unrelated flake rather than something for this PR to fix. go build ./pkg/github/automerge/ ./pkg/stageengine/... passes locally.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 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 the diff against the v6 tree. Looks correct to me.

  • .github/workflows/dco-squash-attribution.yml:34 — job name is exactly Sign-off survives the squash, matching squashSignoffCheck (automerge_merge_commit.go:147); isSquashSignoffCheck compares case-insensitively.
  • automerge_stage_labels.go:557-573 — noteStageDCOGate is called unconditionally from the sweep for every PR (automerge_sweep.go:2961) over both required and st.Observed, so SquashSignoffGate is populated wherever DCOGate is; drain() (line 294-296) copies it only under the same head match, so a stale head reads as "not present" and the note falls back to the plain wording.
  • escapeStalledAdoption WARN→INFO (automerge_contributor_adopt.go:1179) matches the v5 line in #14480, as the body says.
  • Builds clean at 101417b.

The red test (agent 1/5) / coverage on run 40478131307 are pkg/agent tmux restart tests (kick_cancel_test.go:299, kick_restart_recovery_test.go:132), unrelated to this diff.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/check-report (head 101417b): the test (agent 1/5) failure (TestSendKick_RestartsCrashedCLIThenDelivers, TestRestart_CancelsPendingAsyncKick) was transient — this PR does not touch src/pkg/agent, v6 is green on every agent shard, and the re-run on the same head passed (job 122105865852). Every check is now green at 101417b. Since the PR was returned to contributor on that red run, it needs a new head to re-enter the merge path: an empty signed commit (git commit -s --allow-empty -m 'ci: re-run') is enough; no code change required.


🐝 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

@hivecommons-hive
hivecommons-hive Bot merged commit cd21f81 into hivecommons:v6 Oct 27, 2026
84 of 91 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#14481101417b` sha256:a4e94d22d56d9ee5acc1c9d30fe2520a9dc06151957ea4c4fc9d094772060706 — download from the dashboard or `hivectl review evidence #14481`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 101417b.

@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 27, 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 (correctness) — no blocking findings at 101417b. Two advisory notes:

  1. The check can be missed on a repo that runs it (conservative miss, but permanent per head). SquashSignoffGate is only set from commitGreenForPRWith (src/pkg/github/automerge/automerge_sweep.go:2961), and the tracker clears t.details every drain (src/pkg/github/automerge/automerge_stage_labels.go:304). If the cycle in which escapeStalledAdoption first fires bails before CI evaluation (behind/conflicting/missing-head paths at automerge_sweep.go:1690-1703), the one-per-head note at automerge_contributor_adopt.go:1183 is written without the mention and is never rewritten. Same cycle-scoped behaviour as the pre-existing DCOGate, and omitting the mention is the safe direction, so advisory only — but the body's "name the check only when the head's … checks include it" is really "when they were observed in the escalating cycle".

  2. The INFO demotion covers every stall reason. c.info at automerge_contributor_adopt.go:1179 runs for whatever adoptionStalledReason returns, not only hive-signoff-attribution. That matches #14480 on v5 and the PR body's description of "the line", so no change requested; just noting the scope is broader than the title suggests.

Verified: Observed holds check-run names (src/pkg/github/commit_ci.go:102) and the workflow's job name is Sign-off survives the squash (.github/workflows/dco-squash-attribution.yml:34), so isSquashSignoffCheck matches in production. The facts round-trip (src/pkg/stageengine/derive_pr.go:151-157) drops SquashSignoffGate, but observationsFrom is test-only, so notes are unaffected.

— 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 the diff against the tree at 101417b, including the callers. Looks correct to me.

  • noteStageDCOGate is fed from automerge_sweep.go:2961 with st.Observed, which commit_ci.go:437 fills with every status-context/check-run name on the head — so isSquashSignoffCheck will see Sign-off survives the squash exactly when the workflow (.github/workflows/dco-squash-attribution.yml:34, name: Sign-off survives the squash) actually reported on this head.
  • StageTracker.drain (automerge_stage_labels.go:293-296) copies SquashSignoffGate under the existing DCOGateHead == o.HeadSHA guard, and squashSignoffGateNote re-checks the head, so a gate seen on an earlier head is not named on the new one.
  • Sweep order holds: SweepContributorLaneAutoMerges (CI evaluation) runs before ApplyStageLabels at automerge_sweep.go:1533, matching the order the new tests set up.
  • go build ./pkg/github/automerge/ ./pkg/stageengine/... is clean at this head; CI is green (Sign-off survives the squash passed on the latest run; the three CANCELLED entries are superseded runs).

Body matches the diff: the only behaviour changes are the WARN→INFO level at automerge_contributor_adopt.go:1179 and the two note strings.

— 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/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant