Repository navigation
π base red: remember the base's red checks and read new heads from them - #18842
Conversation
enrichBaseBranchRed re-read the base tip every pass with no memory: a tip whose run of the check was still in progress, or a failed listing, made the PR's red its own, so it went to 072, the author was nudged and a relay fix queued, and the next pass withdrew it. A new head read as plain red until the next enumeration. Seen on projectbluefin/common#1684 (ten stage changes on one head) and chairlift#811 (both heads). The client now remembers each base's red checks and drops one only when the tip's run of it completes green (2 h TTL); a failed listing reuses the set and logs at Warn. The stage pass reads a head the index has not classified from that memory when every check red on it is the base's and it touches no CI-owning path. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
|
[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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@Danathar this PR is back in your court ( Review asks:
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. Queued in your relay fix queue (9 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Style review at 2c3fb52: the design reads well and follows the existing fork-guard carry idiom. One in-scope finding: baseRedHeadFiles duplicates prChangedPaths and its page bound from pkg/github (inline thread). Minor note: baseCheckState is declared Running/Red/Green while baseCheckRank maps Red>Running>Green; declaring the constants in rank order would remove the extra switch (base_branch_red_memory.go).
β hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.326
|
|
||
| // baseRedHeadFiles lists the PR's changed paths (renames: both names), or | ||
| // errBaseRedFilesTruncated past baseRedFilesPages. | ||
| func (c *Engine) baseRedHeadFiles(ctx context.Context, owner, repo string, number int) ([]string, error) { |
There was a problem hiding this comment.
This re-implements prChangedPaths in pkg/github/base_branch_red.go (same 100/page loop, 3-page cap, previous-filename handling), and baseRedFilesPages (line 35) restates baseRedMaxFilePages. Two copies can drift, and this one omits the WithRESTCaller attribution. Prefer exporting the existing helper (e.g. Client.PRChangedPaths) and calling it here.
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from HUMAN DECISION NEEDED β docs-currency review could not run (GitHub API hourly cap hit); re-dispatch once the cap resets.
|
One conflict, in StageTracker's fields: this branch adds baseRedPaths (foldBaseRed's per-head CI-path memo) and v6 adds approvals (headTrustedApproval's per-head memo) at the same spot. Keep both. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
This branch adds three lines to client.go above RankActionableIssues, so after the v6 merge it starts at 5600, not 5597; scale-envelope.md now cites 5600-5610 and the docs citation check finds AgeMinutes again. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Summary
When a PR's only red checks are also red on its base branch, the hive keeps it at 050/060 ("not this PR's fault"). That rule had no memory, so any pass that missed the base's red sent the PR back to its author:
This repeated for as long as the base stayed red.
This PR gives base red the memory the fork guard already has:
What happened
All times Eastern, 11-17.
4d94a546a0) changed stage ten times between 1:34 and 3:49 PM. Its only red check,E2E β composed common suite β¦, was red on every main commit that day. Each 072 loggedcontributor nudged β¦ mode=queued, and each return loggedcontributor nudge withdrawn. The hive-authored common#1696 flipped 060β070 the same way.Unit Testsfrom 1:05 PM. Each new head (4:29 PM and 4:46 PM) went to 072 with a nudge and a queued relay fix, then went back to 050 a few minutes later.Cause
There are two gaps.
1. The base is re-read every pass, with no memory (
base_branch_red.go).enrichBaseBranchRedresetsBaseRedChecksand re-lists the base tip's check runs every pass.2. A new head is plain red until the next enumeration (
stage_shared_ci.go).automerge_fork_guard_carry.go). Base red had none.What changed
Per-base memory in the client (
base_branch_red_memory.go)owner/repo@base, the checks it last saw red.New heads in the stage pass (
automerge_base_red_carry.go)StageLabelPolicy.BaseRedRemembered).foldBaseRedruns afterfoldForkGuard. A red head with no index answer (and no fork guard or shared-CI deferral) is marked base red only when:foldForkGuardreads it, is remembered red on its base; andThe rule itself is unchanged:
BaseRedChecksFor, the CI-owning-path list,AllFailuresBaseRed,withdrawNudge(still a backstop) and the required vs optional handling. The stage-labels doc row describes the memory.Not in this PR
[shared-ci]tracking issue (for example common#1688). β¨ feat(github): file one [shared-ci] tracking issue when a check fails across a repoΒ #17546 deliberately keeps that sweep from stamping the per-PR marker, so changing it is an owner decision.derive_pr_classify.go).Tests
base_branch_red_memory_test.go:enrichBaseBranchRedacross four passes (red, in progress, listing fails, green): the PR stays base red for the first three;automerge_base_red_carry_test.go, throughApplyStageLabels, replays chairlift#811:base-branch-red:Unit Testsand no nudge;.github/workflows/stays author-facing;cmd/hive/stage_shared_ci_test.go: publishing and looking up the memory snapshot.Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet); this PR's CI is the test run.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1