Repository navigation
π base red: read the base tip and hold automatic adoption until the base-red memory is published - #19311
Merged
hivecommons-hive[bot] merged 4 commits intoNov 19, 2026
Conversation
β¦estart The base-red index and hivecommons#18842's per-base memory live in the process and are first published when the first CI-enriched enumeration after a start finishes. On knuckle that took about 25 minutes on 2026-11-18 (restart at 1:26 PM EST, first base-branch-red route again at 1:53 PM). In that window every base read as not red, so PRs red only on main's own E2E check went to 070/072, and projectbluefin/common#1689 and hivecommons#1690, already past their 072 grace, were adopted at 1:42 PM and superseded (hivecommons#1708, hivecommons#1709 -> hivecommons#1710), losing a maintainer's approval, into copies red for the same reason. Until the memory is published (new StageLabelPolicy.BaseRedRememberedReady, wired to whether stageBaseRedMemory has been stored), foldBaseRed reads the base tip's checks itself when the memory does not cover a red head's red checks: one combined-status plus check-run listing per base, cached per base for humanChecksTTL (10 min), failures included. A head whose every red check is red on the tip, touching no CI-owning path, is base red and goes to 050/060 instead of 072, so it is neither nudged nor adopted. An unreadable tip keeps today's author-facing route. Once the memory is published nothing changes and no tip is read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
β¦ished Review follow-up to the startup base tip read. That read can still miss the base's red: a tip run still queued or in progress, a tip with no run of the check, or a failed read. Adoption cannot be undone, so while StageLabelPolicy.BaseRedRememberedReady is false adoptContributorPR now returns before anything is recorded for an automatic adoption, logging "adoption deferred until the base-red memory is published" once per head and due reason. An operator's Adopt now and an adopt-supersede request are not held. This costs no API and also covers the unpublished shared-CI incident index. The 072/nudge side keeps the tip read. A failed base tip read is now reused for a minute (baseTipRedErrorTTL) instead of the full humanChecksTTL. Scope: this covers common#1689 -> hivecommons#1708 (and hivecommons#1690's first adoption into hivecommons#1709 at 1:42 PM EST). hivecommons#1690 -> hivecommons#1710 at 3:38 PM was the orphan re-adoption path, which does not read base red; that is out of scope here. Docs and changelog now describe the deferral, that the tip read counts commit statuses as well as check runs (unlike the enrichment's read), and the 3 to 27 minute window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
Contributor
|
[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 |
Contributor
Open PR overlap checkβ
Resolved: no conflicting open PRs or same-file overlaps remain against |
Contributor
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Evidence bundle `#193113228015` sha256:3b6e2e308458944888b7b61aaab18c50ae7fd3f39442a7e924752d65795fb013 β download from the dashboard or `hivectl review evidence #19311`.merged by Hive trusted-author auto-merge: author |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a restart, the hive no longer reads every base as "not red" until its first CI enumeration finishes. Until then, the stage pass reads the base tip itself, and automatic adoption waits. That stops it superseding PRs that are red only because their base is.
What was wrong (live case)
The base-red index and the #18842 memory live in the process. They're published only at the end of the first CI-enriched eval cycle (
main_eval_cycle.go,repos_rescan.go). Until then,foldBaseRedreturned early with nothing remembered, so every base read as not red. On knuckle on 11-18 that window lasted 3 to 27 minutes per restart.projectbluefin/common#1689 (castrojo had approved it) was red only on
E2E β composed common suite / e2e / GNOME β common. That check was red on main's tip 8820523227 too, failing at 12:48 PM EST. The brief that reported this called it "absent on tip", but it had only read the first page of the tip's 361 check runs. The timeline (EST):optional-check-failing:E2Eβ¦.What changed
foldBaseRedreads the base tip (summarizeCheckson the base ref) when the memory isn't published yet. A head whose every red check is also red on the tip, and that touches no CI-owning path, getsBaseRedChecksand goes to 050/060base-branch-red, so it's not nudged or adopted.adoptContributorPRdefers an automatic adoption while the memory isn't published, logging "adoption deferred until the base-red memory is published" once per head. Supersession can't be undone, and the tip read can't catch every case: a run in progress, a missing check, or a failed read. The wait also covers the shared-CI incident index, which has the same blind spot. An operator's "Adopt now" oradoption/supersederequest isn't held.Out of scope: #1690 β #1710 at 3:38 PM was a different path. The orphan re-adoption (
recoverOrphanedAdoption) never checks base red; #1690 itself had beenbase-branch-redsince 3:14 PM. Possible follow-ups:Tests
TestBaseRedReadsTheBaseTipUntilTheMemoryIsPublishedreplays fix: guard knowledgeAPI.FileStores() against nil when knowledge is disabledΒ #1689 through the adoption harness:base-branch-red, no pull, no adoption comment, one tip read across two passes;TestForcedAdoptionNotHeldBeforeTheBaseRedMemoryIsPublished: before the publish, a PR past its grace isn't adopted and nothing is recorded; "Adopt now" still supersedes.TestFoldBaseRedOptionalFromTheBaseTipBeforeTheMemoryIsPublished: on the optional/soaking route the result is 060 base-branch-red; an unreadable tip staysoptional-check-failing, and the failed read is reused at +30s and retried after the error TTL.TestStageBaseRedRememberedis extended for the ready flag.labels-and-control-signals/stage-labels.md(base-red row). Changelog:changelog.d/fixed-base-red-after-restart.md.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1