diff --git a/changelog.d/fixed-decide-plan-adopted-pr.md b/changelog.d/fixed-decide-plan-adopted-pr.md new file mode 100644 index 0000000000..30e673abce --- /dev/null +++ b/changelog.d/fixed-decide-plan-adopted-pr.md @@ -0,0 +1 @@ +- "Let hive decide" no longer calls a PR's CI red when only a non-required context (tide) is pending: the plan reads the head's own checks, derives its WHY from the recorded stage-entry reasons (reviewer requires_human / high-risk), and on a PR the hive adopted in place hands the finding to the hive's fixer instead of "sending it back to its author". diff --git a/src/pkg/dashboard/api_repo_item_decide_delegated.go b/src/pkg/dashboard/api_repo_item_decide_delegated.go index 8cb2316d0f..996d25cd49 100644 --- a/src/pkg/dashboard/api_repo_item_decide_delegated.go +++ b/src/pkg/dashboard/api_repo_item_decide_delegated.go @@ -18,6 +18,8 @@ import ( "github.com/hivecommons/hive/pkg/config" "github.com/hivecommons/hive/pkg/delegatedecision" ghpkg "github.com/hivecommons/hive/pkg/github" + "github.com/hivecommons/hive/pkg/review" + "github.com/hivecommons/hive/pkg/stageengine" stageengineprstage "github.com/hivecommons/hive/pkg/stageengine/prstage" "github.com/hivecommons/hive/pkg/stagelabels" ) @@ -643,11 +645,12 @@ func (s *Server) gatherDelegatedInput(ctx context.Context, repoFull string, numb in.DiffEmpty = ghpkg.PRChangedFilesClaimsEmpty(pr) state := strings.ToLower(pr.GetMergeableState()) in.Conflicting = state == "dirty" || (pr.Mergeable != nil && !pr.GetMergeable()) - green, err := delegatedHeadCIGreen(ctx, api, owner, repoName, pr, in.Conflicting, state) + ci, err := delegatedHeadCI(ctx, api, owner, repoName, pr, state) if err != nil { return in, fmt.Errorf("reading checks for %s#%d: %w", repoFull, number, err) } - in.CIGreen = green + in.CIGreen, in.CIPending = ci.green, ci.pending + s.gatherDelegatedRecordedPark(repoFull, number, pr.GetHead().GetSHA(), &in) if files, _, err := api.PullRequests.ListFiles(ctx, owner, repoName, number, &gh.ListOptions{PerPage: delegatedDecisionGatherLimit}); err == nil && len(files) > 0 { in.LowRiskPaths = true for _, f := range files { @@ -713,31 +716,107 @@ func (s *Server) delegatedAdoptionGraceElapsed(repoFull string, number int) bool return rec.AdoptionBlocked(rec.NudgeHead) != "" } -// delegatedHeadCIGreen decides Input.CIGreen for the PR under decision. -// mergeable_state alone cannot carry it: GitHub reports "blocked" both for a -// missing required review and for red required checks, and "unknown" / -// "behind" / "" say nothing about the head at all. Only "clean" and -// "has_hooks" assert a green head; "unstable" and a conflict deny it; every -// other state is settled from the head's combined status and check runs the -// way gatherDelegatedPRContext settles a competing PR — no red, nothing -// pending, and at least one green result, so a head whose checks never ran -// is not read as green either. -func delegatedHeadCIGreen(ctx context.Context, api *gh.Client, owner, repoName string, pr *gh.PullRequest, conflicting bool, state string) (bool, error) { - switch { - case conflicting, state == "unstable": - return false, nil - case state == "clean", state == "has_hooks": - return true, nil +// delegatedHeadCIState is what the head's checks say: green (every +// gating check passed), pending (some still running, none failed), or +// neither (a check failed, or none ever reported). +type delegatedHeadCIState struct { + green, pending bool +} + +// delegatedHeadCI decides Input.CIGreen / CIPending for the PR under +// decision. mergeable_state alone cannot carry it: GitHub reports "blocked" +// both for a missing required review and for red required checks, +// "unstable" whenever ANY context is pending or failing — a non-required +// merge-metadata context like tide included — and "unknown" / "behind" / +// "" say nothing about the head at all. Only "clean" and "has_hooks" +// assert a green head; every other state is settled from the head's +// combined status and check runs (meta contexts excluded, the way +// gatherDelegatedPRContext settles a competing PR): green is no red, +// nothing pending and at least one green result; pending is no red with +// a check still running. hivecommons/hive#15722 read "unstable" as red +// while every check on the head was green and only tide was pending, and +// the preview told the operator "CI is red". +func delegatedHeadCI(ctx context.Context, api *gh.Client, owner, repoName string, pr *gh.PullRequest, state string) (delegatedHeadCIState, error) { + if state == "clean" || state == "has_hooks" { + return delegatedHeadCIState{green: true}, nil } sha := strings.TrimSpace(pr.GetHead().GetSHA()) if sha == "" { - return false, nil + return delegatedHeadCIState{}, nil } summary, err := ghpkg.SummarizeCommitChecks(ctx, api, owner, repoName, sha) if err != nil { - return false, err + return delegatedHeadCIState{}, err + } + if len(summary.Red) > 0 { + return delegatedHeadCIState{}, nil + } + return delegatedHeadCIState{green: summary.Pending == 0 && summary.Green > 0, pending: summary.Pending > 0}, nil +} + +// gatherDelegatedRecordedPark reads what the stage engine recorded about +// the PR — the reason it parked it, whether the hive adopted it in place, +// and the reviewer verdict on its head — so the delegate decides on the +// same facts the 085 entry comment named, not only on the words the +// tracker row sent along (hivecommons/hive#15722: the row said reviewer +// requires_human / high-risk, the plan said "CI is red"). +func (s *Server) gatherDelegatedRecordedPark(repoFull string, number int, head string, in *delegatedecision.Input) { + head = strings.TrimSpace(head) + recorded := "" + if rec, ok := s.stageStoreOrShared().Get(stagelabels.Key(repoFull, number)); ok { + recorded = strings.TrimSpace(rec.Reason) + if recorded != "" && !slices.Contains(in.Reasons, recorded) { + in.Reasons = append(in.Reasons, recorded) + } + in.AdoptedByHive = rec.AdoptionLive(head) + } + for _, r := range in.Reasons { + lower := strings.ToLower(r) + if strings.Contains(lower, stageengineprstage.ContributorLaneReasonAdoptedByHive) { + in.AdoptedByHive = true + } + if stagelabels.ReasonClass(lower) == stageengine.StageReasonVerdictRequiresHuman || strings.Contains(lower, "requires_human") { + in.ReviewerRequiresHuman = true + } + } + art, err := review.LoadArtifact("") + if err != nil { + return } - return len(summary.Red) == 0 && summary.Pending == 0 && summary.Green > 0, nil + lookup := stageTrackerDecisionVerdictLookup(&art) + agg, ok := lookup(repoFull, number, head, in.ReviewerRequiresHuman) + if !ok { + _, short, _ := strings.Cut(repoFull, "/") + agg, ok = lookup(short, number, head, in.ReviewerRequiresHuman) + } + if !ok { + return + } + if agg.RequiresHuman || agg.DecisionRequested { + in.ReviewerRequiresHuman = true + } + if in.Question == "" { + in.Question = strings.TrimSpace(agg.DecisionQuestion) + } + in.ReviewerFinding = strings.TrimSpace(agg.DecisionFinding) + in.SecurityFinding = delegatedSecurityFinding(agg) +} + +// delegatedSecurityFinding: the reviewer's finding is the security +// review's own — that perspective withheld approval, or the finding names +// a security / credentials question. The reviewer's generic high-risk +// marker alone is not one: it is a risk-class flag the fixer addresses. +func delegatedSecurityFinding(agg review.Aggregate) bool { + if agg.Perspectives[review.PerspectiveSecurity] == review.VerdictRequiresHuman { + return true + } + lower := strings.ToLower(agg.DecisionFinding) + for _, term := range []string{"security", "credential", "secret", "permission", "privilege", "vulnerab", "insecure", "malicious", "supply chain", "supply-chain"} { + if strings.Contains(lower, term) { + return true + } + } + return false } // delegatedWorkflowPath reports a file under .github/workflows: the adoption @@ -791,7 +870,7 @@ func (s *Server) executeDelegatedDecision(ctx context.Context, in delegatedecisi notes = append(notes, "parking labels lifted, `"+ghpkg.HumanAckLabel+"` applied") s.noteDelegatedUnpark(repoFull, number) } - } else if d.Verdict == delegatedecision.VerdictDirection && in.HiveAuthored { + } else if d.Verdict == delegatedecision.VerdictDirection && (in.HiveAuthored || in.AdoptedByHive) { if _, err := client.RecordOperatorPullRequestDecision(ctx, repoFull, number, user, d.Text, repoItemDecisionChangeRequests()); err != nil && !errors.Is(err, ghpkg.ErrPullRequestNotHiveAuthored) { return notes, fmt.Errorf("recording PR direction: %w", err) } else if err == nil { diff --git a/src/pkg/dashboard/api_repo_item_decide_delegated_plan.go b/src/pkg/dashboard/api_repo_item_decide_delegated_plan.go index 63b6af85f5..c2082420b8 100644 --- a/src/pkg/dashboard/api_repo_item_decide_delegated_plan.go +++ b/src/pkg/dashboard/api_repo_item_decide_delegated_plan.go @@ -214,6 +214,12 @@ func delegatedPlanWording(in delegatedecision.Input, d delegatedecision.Decision return "Close " + ref + " as superseded by #" + strconv.Itoa(target) + ".", []string{ref + " is closed with a comment pointing at #" + strconv.Itoa(target) + "."} case d.Verdict == delegatedecision.VerdictCloseDuplicate, d.Verdict == delegatedecision.VerdictCloseSuperseded: return "Close " + ref + ".", []string{ref + " is closed with a comment saying why."} + case d.Verdict == delegatedecision.VerdictDirection && in.AdoptedByHive: + // The hive adopted the PR in place: it is the author now, so the + // instruction is its own fixer's, not the contributor's + // (hivecommons/hive#15722). + return "Have hive's fixer " + delegatedPlanInstruction(in, delegatedecision.Decision{}) + " on " + ref + "; no action needed from you.", + []string{"Hive records that instruction on " + ref + " for its fixer — the hive owns this branch now, not the contributor.", "The fixer pushes; the row updates when the swarm re-reviews."} case d.Verdict == delegatedecision.VerdictDirection: return "Send " + ref + " back to its author with one instruction: " + delegatedPlanInstruction(in, d) + ".", []string{"Hive posts that instruction on " + ref + ".", "The author pushes a fix; the row updates when it lands."} @@ -237,17 +243,27 @@ func delegatedPlanWording(in delegatedecision.Input, d delegatedecision.Decision } // delegatedPlanInstruction is the direction in the author's terms: the -// fix list from the head's facts ("make CI green, nothing else"), or the -// decision's own text when the direction is a reviewer's question. +// fix list from the head's facts ("make CI green, nothing else"), the +// reviewer's finding when that is what parked it, or the decision's own +// text when the direction is a reviewer's question. "make CI green" is +// said only of a head with a failing check: pending checks are not red +// (hivecommons/hive#15722). func delegatedPlanInstruction(in delegatedecision.Input, d delegatedecision.Decision) string { var fix []string + if in.ReviewerRequiresHuman { + item := "address the reviewer's finding" + if f := strings.TrimSpace(in.ReviewerFinding); f != "" { + item += " (" + f + ")" + } + fix = append(fix, item) + } if in.Conflicting { fix = append(fix, "rebase onto the base branch") } if in.DCOMissing { fix = append(fix, "add the sign-off") } - if !in.CIGreen { + if in.CIRed() { fix = append(fix, "make CI green") } if len(fix) == 0 || strings.TrimSpace(in.Question) != "" { @@ -258,6 +274,9 @@ func delegatedPlanInstruction(in delegatedecision.Input, d delegatedecision.Deci if len(fix) == 0 { return "address the review" } + if in.ReviewerRequiresHuman { + return strings.Join(fix, ", ") + } return strings.Join(fix, ", ") + ", nothing else" } @@ -282,7 +301,7 @@ func delegatedPlanWhy(in delegatedecision.Input, d delegatedecision.Decision) st } why := strings.Join(parts, " and ") if why == "" && d.Verdict == delegatedecision.VerdictDirection { - why = delegatedPlanBlockers(in) + why = delegatedPlanParkReason(in) } if why == "" { why = delegatedPlanPlain(d.Rationale) @@ -313,12 +332,34 @@ func delegatedPlanLandedWhy(in delegatedecision.Input, d delegatedecision.Decisi return strings.ToUpper(landed[:1]) + landed[1:] + "." } +// delegatedPlanParkReason is WHY a direction is owed, from the same facts +// the stage engine recorded when it parked the PR: the reviewer's verdict +// first — "the reviewer returned requires_human: the reviewer marked this +// change high-risk" — then the head's blockers. hivecommons/hive#15722's +// preview said "CI is red" of a PR parked on requires_human with every +// check green. +func delegatedPlanParkReason(in delegatedecision.Input) string { + var parts []string + if in.ReviewerRequiresHuman { + why := "the reviewer returned requires_human" + if f := strings.TrimSpace(in.ReviewerFinding); f != "" { + why += ": " + f + } + parts = append(parts, why) + } + if b := delegatedPlanBlockers(in); b != "" { + parts = append(parts, b) + } + return strings.Join(parts, "; ") +} + // delegatedPlanBlockers names what keeps a head from merging, in plain // words: "CI is red", "it conflicts with the base branch", "the sign-off -// is missing". +// is missing". A head whose checks are still running is not red and is +// not a blocker a direction can name. func delegatedPlanBlockers(in delegatedecision.Input) string { var b []string - if !in.CIGreen { + if in.CIRed() { b = append(b, "CI is red") } if in.Conflicting { diff --git a/src/pkg/dashboard/api_repo_item_decide_delegated_plan_test.go b/src/pkg/dashboard/api_repo_item_decide_delegated_plan_test.go index 988efe75bf..2094a052b4 100644 --- a/src/pkg/dashboard/api_repo_item_decide_delegated_plan_test.go +++ b/src/pkg/dashboard/api_repo_item_decide_delegated_plan_test.go @@ -7,8 +7,11 @@ import ( "strconv" "strings" "testing" + "time" "github.com/hivecommons/hive/pkg/delegatedecision" + "github.com/hivecommons/hive/pkg/stageengine" + "github.com/hivecommons/hive/pkg/stagelabels" ) func postDelegatedPlan(t *testing.T, srv *Server, number int, user, body string, hdr map[string]string) *httptest.ResponseRecorder { @@ -333,3 +336,107 @@ func TestDelegatedDecisionPlanIssueAndAdvisory(t *testing.T) { }) } } + +// hivecommons/hive#15722, the live case: a clanker's PR the hive adopted in +// place (contributor-lane:adopted-by-hive), parked at 085 by the reviewer's +// requires_human / high-risk marker, every check green and only the tide +// context pending (mergeable_state "unstable"). The preview said "Send +// #15722 back to its author with one instruction: make CI green" / "CI is +// red". It must read the recorded park reason instead, never call a +// pending-only head red, and — the hive being the author now — hand the +// finding to the hive's own fixer. +func TestDelegatedDecisionPlanAdoptedRequiresHumanIsFixersNotCI(t *testing.T) { + mock := &repoItemDecisionMock{prForeign: true, prMergeState: "unstable", prTidePending: true, prLabels: []string{"stage/085-needs-decision"}} + srv := newDelegatedServer(t, mock) + srv.stageStore = stagelabels.NewStore("", time.Now) + key := stagelabels.Key("testorg/testrepo", 8) + srv.stageStore.Observe(key, stagelabels.NeedsDecision, stageengine.StageReasonVerdictRequiresHuman) + srv.stageStore.MarkAdoptedInPlace(key, "feedfacefeedfacefeedfacefeedfacefeedface", "contributor-offline", time.Now()) + + // The tracker row's words, as the SPA sends them. + body := `{"type":"pr","reason":"reviewer-verdict:requires_human","caption":"the reviewer marked this change high-risk"}` + w := postDelegatedPlan(t, srv, 8, "writer", body, map[string]string{"X-Hive-Role": "merger"}) + if w.Code != http.StatusOK { + t.Fatalf("code=%d body=%s", w.Code, w.Body.String()) + } + var plan delegatedDecisionPlan + if err := json.Unmarshal(w.Body.Bytes(), &plan); err != nil { + t.Fatal(err) + } + t.Logf("summary: %s\nwhy: %s\nconsequences: %v", plan.Summary, plan.Why, plan.Consequences) + if plan.Would != string(delegatedecision.VerdictDirection) || plan.Rule != delegatedecision.RuleAdoptedFixer { + t.Fatalf("plan = %+v", plan) + } + if !strings.HasPrefix(plan.Summary, "Have hive's fixer address the reviewer's finding") || !strings.Contains(plan.Summary, "no action needed from you") { + t.Fatalf("summary %q", plan.Summary) + } + if !strings.Contains(plan.Why, "requires_human") { + t.Fatalf("why %q does not name the recorded park reason", plan.Why) + } + for _, text := range append([]string{plan.Summary, plan.Why}, plan.Consequences...) { + lower := strings.ToLower(text) + if strings.Contains(text, "CI") || strings.Contains(lower, "back to its author") { + t.Errorf("a green head parked on requires_human is described as red or returned: %q", text) + } + } + if len(mock.comments) != 0 { + t.Fatalf("a plan may not write: %v", mock.comments) + } + + // The same head, not adopted: the clanker's PR is not "red" either — + // the plan never says CI is red of a head with no failing check. + mock2 := &repoItemDecisionMock{prForeign: true, prMergeState: "unstable", prTidePending: true, prLabels: []string{"stage/085-needs-decision"}} + srv2 := newDelegatedServer(t, mock2) + srv2.stageStore = stagelabels.NewStore("", time.Now) + srv2.stageStore.Observe(key, stagelabels.NeedsDecision, stageengine.StageReasonVerdictRequiresHuman) + w = postDelegatedPlan(t, srv2, 8, "writer", body, map[string]string{"X-Hive-Role": "merger"}) + if w.Code != http.StatusOK { + t.Fatalf("code=%d body=%s", w.Code, w.Body.String()) + } + var plan2 delegatedDecisionPlan + if err := json.Unmarshal(w.Body.Bytes(), &plan2); err != nil { + t.Fatal(err) + } + t.Logf("not adopted: summary: %s\nwhy: %s", plan2.Summary, plan2.Why) + for _, text := range append([]string{plan2.Summary, plan2.Why}, plan2.Consequences...) { + if strings.Contains(text, "CI is red") || strings.Contains(text, "make CI green") { + t.Errorf("not adopted: head with green checks called red: %q", text) + } + } +} + +// delegatedPlanInstruction / delegatedPlanBlockers: pending checks are not +// red, and the recorded reviewer finding is the WHY. +func TestDelegatedPlanPendingCIIsNotRed(t *testing.T) { + in := delegatedecision.Input{Kind: delegatedecision.KindPR, Number: 15722, Author: "clubanderson", OwnerAuthor: true, TrustedAuthor: true, CIGreen: false, CIPending: true, Conflicting: true} + d := delegatedecision.Decide(in) + if d.Verdict != delegatedecision.VerdictDirection { + t.Fatalf("verdict %s rule %s", d.Verdict, d.Rule) + } + summary, _ := delegatedPlanWording(in, d) + if summary != "Send #15722 back to its author with one instruction: rebase onto the base branch, nothing else." { + t.Fatalf("summary %q", summary) + } + if why := delegatedPlanWhy(in, d); why != "It conflicts with the base branch." { + t.Fatalf("why %q", why) + } + in.Conflicting, in.ReviewerRequiresHuman, in.ReviewerFinding = false, true, "the reviewer marked this change high-risk" + in.AdoptedByHive, in.OwnerAuthor, in.TrustedAuthor, in.Author = true, false, false, "mendezr" + d = delegatedecision.Decide(in) + if d.Rule != delegatedecision.RuleAdoptedFixer { + t.Fatalf("verdict %s rule %s", d.Verdict, d.Rule) + } + summary, next := delegatedPlanWording(in, d) + if summary != "Have hive's fixer address the reviewer's finding (the reviewer marked this change high-risk) on #15722; no action needed from you." { + t.Fatalf("summary %q", summary) + } + if why := delegatedPlanWhy(in, d); why != "The reviewer returned requires_human: the reviewer marked this change high-risk." { + t.Fatalf("why %q", why) + } + if len(next) != 2 { + t.Fatalf("then items %v", next) + } + if delegatedPlanMergeableAsIs(in, d) { + t.Fatal("a head with checks still running is not mergeable as it is") + } +} diff --git a/src/pkg/dashboard/api_repo_item_decide_delegated_test.go b/src/pkg/dashboard/api_repo_item_decide_delegated_test.go index d000cfeb2f..2d8ab6358d 100644 --- a/src/pkg/dashboard/api_repo_item_decide_delegated_test.go +++ b/src/pkg/dashboard/api_repo_item_decide_delegated_test.go @@ -190,7 +190,11 @@ func TestDelegatedDecisionPRBlockedStateReadsHeadChecks(t *testing.T) { {"blocked by red required checks", "blocked", true, false, delegatedecision.VerdictDirection, "fix-then-merge"}, {"blocked with checks never run", "blocked", false, true, delegatedecision.VerdictDirection, "fix-then-merge"}, {"unknown state with checks never run", "unknown", false, true, delegatedecision.VerdictDirection, "fix-then-merge"}, - {"unstable head", "unstable", false, false, delegatedecision.VerdictDirection, "fix-then-merge"}, + // "unstable" means some context is pending or failing — the + // non-required tide included — so the head's own checks decide + // (hivecommons/hive#15722: all green, only tide pending, "CI is red"). + {"unstable head with green checks", "unstable", false, false, delegatedecision.VerdictApprove, "default-release"}, + {"unstable head with red checks", "unstable", true, false, delegatedecision.VerdictDirection, "fix-then-merge"}, {"blocked by missing review only", "blocked", false, false, delegatedecision.VerdictApprove, "default-release"}, {"clean head", "clean", false, false, delegatedecision.VerdictApprove, "default-release"}, } diff --git a/src/pkg/dashboard/api_repo_item_decision_test.go b/src/pkg/dashboard/api_repo_item_decision_test.go index 5300abb567..ee4c6c26a8 100644 --- a/src/pkg/dashboard/api_repo_item_decision_test.go +++ b/src/pkg/dashboard/api_repo_item_decision_test.go @@ -42,6 +42,9 @@ type repoItemDecisionMock struct { updates int prRedCI bool prNoCI bool + // prTidePending is hivecommons/hive#15722's head: every check green, + // only the tide merge-metadata context pending (GitHub: "unstable"). + prTidePending bool // priorComments are the comment bodies GET /comments lists (a prior // delegated decision makes a repeat click a no-op). priorComments []string @@ -169,6 +172,8 @@ func newRepoItemDecisionServer(t *testing.T, m *repoItemDecisionMock) *Server { _, _ = io.WriteString(w, `{"state":"failure","statuses":[{"context":"ci/test","state":"failure"}]}`) case m.prNoCI: _, _ = io.WriteString(w, `{"state":"pending","statuses":[]}`) + case m.prTidePending: + _, _ = io.WriteString(w, `{"state":"pending","statuses":[{"context":"ci/test","state":"success"},{"context":"tide","state":"pending"}]}`) default: _, _ = io.WriteString(w, `{"state":"success","statuses":[{"context":"ci/test","state":"success"}]}`) } diff --git a/src/pkg/dashboard/delegated_decision_effect.go b/src/pkg/dashboard/delegated_decision_effect.go index ffe4959b45..35ca010e6e 100644 --- a/src/pkg/dashboard/delegated_decision_effect.go +++ b/src/pkg/dashboard/delegated_decision_effect.go @@ -192,7 +192,7 @@ func (s *Server) delegatedStuckWhy(in delegatedecision.Input, d delegatedecision return delegatedecision.GlossaryHold case has("behind"): return delegatedecision.GlossaryBehind - case in.Kind == delegatedecision.KindPR && !in.CIGreen && d.Verdict != delegatedecision.VerdictCloseDuplicate && d.Verdict != delegatedecision.VerdictCloseSuperseded: + case in.Kind == delegatedecision.KindPR && in.CIRed() && d.Verdict != delegatedecision.VerdictCloseDuplicate && d.Verdict != delegatedecision.VerdictCloseSuperseded: return delegatedecision.GlossaryCIRed } switch { diff --git a/src/pkg/dashboard/static-src/js/tracker-filter-fetch.js b/src/pkg/dashboard/static-src/js/tracker-filter-fetch.js index ca4dba9b82..c438b8bc0c 100644 --- a/src/pkg/dashboard/static-src/js/tracker-filter-fetch.js +++ b/src/pkg/dashboard/static-src/js/tracker-filter-fetch.js @@ -56,6 +56,8 @@ "adopt": {"kind": "action", "plain": "hive takes over finishing this PR", "detail": "Adopt means the hive takes over finishing this PR: it rebases, fixes CI and merges it, keeping the author's commits and sign-off."}, "adopt-supersede": {"kind": "action", "plain": "close this PR and open a fresh hive-authored PR with the same commits", "detail": "Supersede means the hive closes this PR and opens a fresh hive-authored PR carrying the same commits and sign-off, then finishes it itself."}, "adopted": {"kind": "action", "plain": "close this PR and open a fresh hive-authored PR with the same commits", "detail": "Supersede means the hive closes this PR and opens a fresh hive-authored PR carrying the same commits and sign-off, then finishes it itself."}, + "adopted-fixer": {"kind": "rule", "plain": "the hive adopted this PR; its own fixer addresses the finding", "detail": "The hive adopted this PR in place and owns its branch, so the reviewer's finding and any blocker go to the hive's own fixer — not back to the contributor and not to a person. No action is needed."}, + "adopted-security-finding": {"kind": "rule", "plain": "the hive adopted this PR, but the security finding is a person's call", "detail": "The hive adopted this PR in place, but the reviewer's finding is the security review's. That policy call is a person's: read the finding and reply /hive decision with the instruction for the hive's fixer, or close the PR."}, "adoption-disabled": {"kind": "reason", "plain": "adoption is switched off on this hive", "detail": "Stage adoption is disabled on this hive (governor.labels.stage.adoption), so a request to take a PR over is never carried out."}, "adoption-executing": {"kind": "reason", "plain": "the adoption engine is carrying it out", "detail": "The decision is recorded and the adoption engine picks it up on its next stage pass (a few minutes): it pushes the commits to a hive branch and opens the hive's copy. Nothing to do yet."}, "adoption-stalled:contributor-lane:workflow-path": {"kind": "reason", "plain": "the PR edits .github/workflows; the hive's App lacks the `workflows` permission, so it cannot adopt it", "detail": "The PR changes files under .github/workflows. The hive's GitHub App has no `workflows` permission, so the adoption fence refuses to publish those edits from the hive. Grant the App the `workflows` permission and re-run the decision, or have a person rebase and merge it on GitHub, or close it as superseded."}, diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 88a9d61473..c14ecd8ad1 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -19363,6 +19363,8 @@