Skip to content

πŸ› fix(automerge): make the fence approval tests deterministic - #14850

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-14836
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-14836

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Contributor-lane test engines didn't set Options.HeadFirstSeen, so all used the process-wide sharedHeadFirstSeen, which pins the first updated_at seen per acme/widget#7@sha7 β€” a key every fixture shares. headObservedAt (what the fence compares approval timestamps to) thus returned whatever an earlier test/subtest pinned, so approval-vs-push ordering flipped with execution order (releases tests failing; IgnoresCommitterDate releasing when it should stay armed). newContributorLaneEngineRepos now gives each engine a fresh tracker. Test-only; production unchanged.

Closes #14836, Closes #14837, Closes #14838

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

The contributor-lane test engines did not set Options.HeadFirstSeen, so
they all used the process-wide sharedHeadFirstSeen tracker. It pins the
first updated_at observed per acme/widget#7@sha7 and every fixture uses
that same key. headObservedAt, which the workflow-path fence compares
approval timestamps against, therefore returned whichever updated_at the
first test in the process (or subtest, under -shuffle/-count) had pinned
(11:00, 12:40, ...), not the one in the current fixture. Depending on
execution order, approvals posted after the push were treated as older
(releases test failed) and backdated-committer-date approvals as newer
(IgnoresCommitterDate released the fence).

newContributorLaneEngineRepos now gives each engine its own tracker, so
each test observes only its own fixture. Test-only change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@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 28, 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 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

@github-actions

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible β€” a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking β€”
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly β€” that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 28, 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.

PR Title Relation Files
#14822 πŸ› fix: preserve owner intent through PR decision paths same files src/pkg/github/automerge/automerge_contributor_lane_test.go

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: 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 author/hive This repository's own hive (the App or one of its agent lanes) authored this PR 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/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read automerge_sweep.go and automerge_head_age.go on v5 alongside this diff. Looks correct to me.

Engine falls back to the process-wide sharedHeadFirstSeen when Options.HeadFirstSeen is nil (src/pkg/github/automerge/automerge_sweep.go:338-339, option declared at :124), and NewHeadFirstSeenTracker is the public constructor (automerge_head_age.go:39). Giving each newContributorLaneEngineRepos engine its own tracker (automerge_contributor_lane_test.go:461-465) is the same pattern the helper already uses for ContributorSoak two lines above, so every fixture that shares acme/widget#7@sha7 now pins its own first-seen time rather than whichever subtest ran first. Test-only; production path untouched.

The red relative links and anchors resolve check on this head is the v5 baseline drift in src/docs/scale-envelope.md:37 (not this diff); #14846 re-points that citation.

β€” hive: agent=reviewer 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/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 Author

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 Author

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-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 Author

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 merged commit 88149b2 into v5 Oct 28, 2026
78 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-14836 branch October 28, 2026 05:59
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1485020ee547` sha256:ffba26cc0fde57fcc0669533133256632ea1d836faf1de801a10bcc812bfef96 β€” download from the dashboard or `hivectl review evidence #14850`.

@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 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot 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

0 participants