From 4bd6587f1358c450469d1e5e58cd86fd9851cb7e Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 01:06:07 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(automerge):=20make=20the=20f?= =?UTF-8?q?ence=20approval=20tests=20deterministic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- src/pkg/github/automerge/automerge_contributor_lane_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pkg/github/automerge/automerge_contributor_lane_test.go b/src/pkg/github/automerge/automerge_contributor_lane_test.go index 32e9733ccb..acb409bf08 100644 --- a/src/pkg/github/automerge/automerge_contributor_lane_test.go +++ b/src/pkg/github/automerge/automerge_contributor_lane_test.go @@ -458,6 +458,11 @@ func newContributorLaneEngineRepos(apiURL string, repos []string, policy Contrib if opts.ContributorSoak == nil { opts.ContributorSoak = NewContributorSoakTracker() } + // Every engine otherwise shares the process-wide head tracker, which pins + // the first updated_at seen for acme/widget#7@sha7 across tests. + if opts.HeadFirstSeen == nil { + opts.HeadFirstSeen = NewHeadFirstSeenTracker() + } if clock != nil { opts.Now = clock.now }