Repository navigation
π fix(automerge): make the fence approval tests deterministic - #14850
Conversation
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>
|
[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 |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible β a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Contributor-lane test engines didn't set
Options.HeadFirstSeen, so all used the process-widesharedHeadFirstSeen, which pins the firstupdated_atseen 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).newContributorLaneEngineReposnow 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