Skip to content

πŸ› Activity Monitor: delegated adopt-supersede reports executing β†’ adopted/could-not-adopt, routes workflow-path to the workflows blocker, re-adoption survives the mutation journal - #15206

Merged
clubanderson merged 1 commit into
v5from
fix/adopt-supersede-execution
Oct 29, 2026

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #15188

What was wrong

"Let hive decide" β†’ adopt-supersede settled the operator-action ledger as applied ("done β€” the hive decided: adopt-supersede (rule: contributor offline)") the moment the adoption/supersede request label landed. Adding the label is not the adoption; the badge then said "done" while the row sat at 085.

Two live failure shapes (log evidence in #15188):

What changes

(a) Ledger / βœ“ state (pkg/dashboard/operator_actions.go)

  • settledDelegatedOutcome: adopt-supersede β†’ executing ("decided: adopt-supersede (rule) Β· executing…"); dedup β†’ no-effect; capability-gap β†’ blocked; failed/no-op/applied as before.
  • stageTrackerOperatorActionExec derives an executing record's state from the stage record: AdoptedBy>0 β†’ addressed "adopted as #N"; workflow-path refusal β†’ blocked with blocker: capability:workflows-permission (the slug πŸ› Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permissionΒ #15134 uses, so it composes with pkg/blocker when that lands); other refusal / copy closed twice / copy failed β†’ failed "could not adopt: …"; copy closed β†’ still executing "opening a fresh one"; nothing on record past the window β†’ stuck.
  • New payload fields progress, blocker, human (openapi updated).

(a) Policy (pkg/delegatedecision)

  • Input.WorkflowPath; a contributor PR under .github/workflows/ that would otherwise be contributor-offline is now capability-gap recommend-only (keeps the park). The gather sets it from the PR's file list and from contributor-lane:workflow-path in the reason.
  • Glossary: workflow-path (+ aliases incl. capability:workflows-permission), adoption-executing, adoption-undone; JS mirror regenerated.

(b) Adoption worker (pkg/github/automerge/automerge_contributor_adopt.go)

  • Both claims carry prior_copy so a re-adoption after a closed copy is a distinct logical effect.
  • When the boundary replays a journaled pull_request_create without running the closure, the provenance URL is resolved; an open copy is reused, a closed one fails loudly instead of "None".

(c) SPA hover (static/index.html)

  • New states executing (⟳, dotted) and blocked (⚠, amber dashed); first line says what the hive is doing now / why it is blocked; "You can: …" from human; options shown for blocked too.

Tests

Out of scope (noted in #15188): the reviewer requires_human route not counting the delegated comment as an answer.

Supersedes #15208 Β· layers on #15209

The scanner opened two child PRs off #15188 (#15203 β†’ #15208, #15204 β†’ #15209) three minutes after this one.

Concern #15208 This PR
Workflow-path PR β†’ capability-gap instead of a doomed adopt-supersede Input.ChangedFiles + Input.WorkflowPath() scanning the file list and Reasons; gated on !ContributorOnline; fills files in gatherDelegatedPRContext Input.WorkflowPath bool set from the PR file list in gatherDelegatedInput (already fetched for LowRiskPaths) and from a …:workflow-path park reason; same !ContributorOnline gate (folded in from #15208); RuleCapabilityGap constant shared with the issue-side rule
Ledger / hover for the capability gap not covered settled as blocked, routed to the capability:workflows-permission blocker with the human step
executing β†’ adopted as #N / could not adopt: … on the βœ“ hover, SPA states, openapi.json not covered covered
Tests policy table rows policy table rows; TestDelegatedAdoptSupersedeReportsExecutingUntilAdopted, TestDelegatedWorkflowPathIsCapabilityGap, TestOperatorActionExecutionForReadsRecord

Rebased on v5 after #15201 (durable supersede-now executor) and #15209 merged.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intent alignment vs #15188 β€” (a) ledger executing/no-effect/blocked, (c) prior_copy re-adoption and (d) hover all match the issue; automerge_adoption_orphan.go:274 re-seeds AdoptedBy=dead before recoverOrphanedAdoption calls supersedeAdoptedPR, so the new prior_copy input (automerge_contributor_adopt.go:725-727) is genuinely distinct on the retry. One gap in (b):

Workflow-path rule is wider than the PR describes β€” src/pkg/delegatedecision/policy.go:463. The body says a PR "that would otherwise be contributor-offline is now capability-gap", and #15188 (b) asks to replace a doomed adopt-supersede. But the new rule has no !in.ContributorOnline guard, so an online contributor's .github/workflows/* PR with red CI / conflict / missing DCO β€” which previously fell through to fix-then-merge (policy.go:485-500, a direction the author can act on and that needs no App permission) β€” now parks as capability-gap recommend-only. That turns a working decision into "hive cannot clear this by deciding" for PRs the issue never mentions.

	if !in.HiveAuthored && !in.ContributorOnline && in.WorkflowPath && (in.AdoptionStalled || in.Conflicting || !in.CIGreen || in.DCOMissing) {

Worth adding the inverse case to TestDecidePRRules (ContributorOnline: true, WorkflowPath: true, CIGreen: false β†’ fix-then-merge) so the gate holds.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15223 ✨ Soak countdown on every soak pill, with the live timer on hover same files src/pkg/dashboard/static/index.html
#15241 πŸ› tracker: keep a closed linked issue as the row head instead of promoting the PR same files src/pkg/dashboard/static/index.html
#15256 πŸ› clanker PRs with a human changes-requested review show Returned to contributor, not Sentinel alert same files src/pkg/dashboard/static/index.html
#15251 πŸ› tracker: show Merging in the merge gate for at least the toast lifetime before βœ“ same files src/pkg/dashboard/static/index.html
#15104 πŸ› Activity Monitor: Rebase, then merge as maintainer; fixer owns parked conflicting PRs; dismiss self-inflicted changes_requested same files src/pkg/dashboard/static/index.html
#15219 πŸ› fix: preserve human and owner PRs during delegated decisions same files src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/api_repo_item_decide_delegated_test.go
src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/decision_glossary.go
src/pkg/delegatedecision/policy.go
#15122 πŸ› Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard same files dashboard/openapi.json
src/pkg/dashboard/static/index.html
#15253 πŸ› decision toast: issue decisions no longer read as 'approved for merge' CONFLICT src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/decision_glossary.go
#15134 πŸ› Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permission same files dashboard/openapi.json
src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/delegated_decision_effect.go
src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/decision_glossary.go
#15186 πŸ› Activity Monitor: one coherent post-decision state for Let hive decide rows; 060 reviewed in CI / Review CONFLICT src/pkg/dashboard/api_repo_item_decide_delegated_test.go
src/pkg/dashboard/operator_actions.go
src/pkg/dashboard/static/index.html
#15249 ✨ dashboard: merged ledger rolls like an odometer and the rising glyph eases slower same files src/pkg/dashboard/static/index.html
#15240 πŸ› Never adopt a person's PR: owner/human-authored PRs return to their author instead of the contributor-offline lane same files src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/decision_glossary.go
src/pkg/delegatedecision/policy.go
#15208 πŸ› fix: decidePR answers capability-gap, not adopt-supersede, for heads the App cannot adopt CONFLICT src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/policy.go

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness review (read at head 2d8425d; Go unit tests could not be run here and did not run in CI β€” prow build/merge jobs are skipping because the PR is CONFLICTING against v5, so the new tests are unverified).

1. An executing adopt-supersede renders as failed "could not adopt: …" immediately, not "executing…" β€” src/pkg/dashboard/operator_actions.go:638-639

operatorActionExecutionFor falls back to it.Reason whenever it has the adoption-stalled: prefix and treats it as a terminal refusal. But that prefix is the ordinary 085 park reason for a stalled adoption (automerge_contributor_adopt.go:1560-1568), and it is exactly what makes the policy answer adopt-supersede in the first place (pkg/delegatedecision/policy.go:472, in.AdoptionStalled). The tracker copies it onto the row (stage_tracker.go:1753, it.Reason = rec.Reason), so on the very next render after the click: Refused = "adoption-stalled:contributor-lane:ci-red" β†’ operatorActionExecutingView second case (operator_actions.go:654-657) β†’ State = failed, Progress = "could not adopt: …". The "executing…" state the PR body promises is unreachable on the common path. Because the Refused cases precede AdoptedBy > 0 (:649-677) and MarkAdopted does not rewrite rec.Reason (stagelabels/store.go:1026), it also masks "adopted as #N" until the next Observe.

TestDelegatedAdoptSupersedeReportsExecutingUntilAdopted misses this because it builds items without Reason even though the store record carries adoption-stalled:contributor-lane:ci-red (api_repo_item_decide_delegated_test.go, new test, items := []StageTrackerItem{{Repo:…, Number: 8, Stage: 85, Head: "aaa"}}).

Only rec.AdoptEscalatedReason is a terminal refusal; drop the fallback:

	if rec.AdoptEscalatedReason != "" && (rec.AdoptEscalatedHead == "" || it.Head == "" || rec.AdoptEscalatedHead == it.Head) {
		out.Refused = rec.AdoptEscalatedReason
	}
	return out
}

and set Reason: "adoption-stalled:contributor-lane:ci-red" on the items in TestDelegatedAdoptSupersedeReportsExecutingUntilAdopted so the test covers the real row.

2. TestOperatorActionExecutionForReadsRecord fails as written β€” src/pkg/dashboard/operator_actions_test.go (new test, first assertion) vs operator_actions.go:629-631

The test calls operatorActionExecutionFor(it, stagelabels.Record{}, false) and requires got.Refused == it.Reason, but the function returns at if !hasRec { return out } before the it.Reason branch, so Refused == "" β†’ t.Fatalf("no record: …"). With the fix in (1) the assertion should become got.Refused != "" || got.AdoptedBy != 0 (no record β‡’ no refusal).

-	if got := operatorActionExecutionFor(it, stagelabels.Record{}, false); got.Refused != it.Reason || got.AdoptedBy != 0 {
+	if got := operatorActionExecutionFor(it, stagelabels.Record{}, false); got.Refused != "" || got.AdoptedBy != 0 {

3. Rebase onto v5 so prow actually runs go test on the dashboard/automerge/delegatedecision packages before merge.

The automerge side checks out: recoverOrphanedAdoption keeps rec.AdoptedBy on the store when it calls supersedeAdoptedPR (automerge_adoption_orphan.go:200-205), so prior_copy is the dead copy as intended, and the marker path MarkAdopteds before recovering (:270-293).

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adoption-engine half of this looks correct to me; the PR is currently CONFLICTING against v5 and needs a rebase before the sweep can take it.

What I verified (src/pkg/github/automerge)

  • recoverOrphanedAdoption (automerge_adoption_orphan.go:200-205) calls store.NoteAdoptionOrphaned and then supersedeAdoptedPR without clearing the record; NoteAdoptionOrphaned (stagelabels/store.go:1158-1169) only sets AdoptOrphanedBy/At and bumps the count, so stored.AdoptedBy is still the dead copy when automerge_contributor_adopt.go:726 reads it. prior_copy is therefore the dead copy's number on re-adoption and "0" on first adoption β€” the branch_push and pull_request_create claims genuinely differ, which is what the journal needs to run the closure again.
  • ClearAdoption only runs in revertOrphanedAdoption (automerge_adoption_orphan.go:221), i.e. after the re-adoption attempt, so there is no path where the second attempt sees AdoptedBy == 0 and collides with the first claim.
  • replayedAdoptionCopy (:1691-1709) only reuses an open PR and errors on a closed one, so a replay can never silently mark a dead copy as adopted; TestAdoptionReadoptsThroughReplayingJournal and TestAdoptionReplayedOpenCopyIsReused cover both branches.

Not verified: the dashboard ledger/state changes (operator_actions.go, api_repo_item_decide_delegated.go, decision_glossary.go, policy.go, index.html) β€” I read the automerge path only. CI is green on this head apart from tide, which is the merge conflict.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conclusion: this PR's decidePR workflow-path rule overlaps with #15208 (scanner, child (b) of #15188) in a way that conflicts rather than duplicates, and after a rebase onto current v5 the rule as placed here misses the grace-elapsed path it is meant to close. The ledger/βœ“-state and mutation-journal parts of this PR are not in #15208 and still stand on their own.

1. Name collision with #15208 β€” both cannot land as written.
This PR adds a field Input.WorkflowPath bool (src/pkg/delegatedecision/policy.go, Input struct, this diff). #15208 adds a method func (in Input) WorkflowPath() bool on the same struct, fed by a new Input.ChangedFiles []string plus the adoption-stalled:contributor-lane:workflow-path slug in in.Reasons. Go does not allow a field and a method with the same name, so whichever merges second fails to compile. Severity: high (build break), consequence: the second PR needs a rewrite of its policy hunk, not just a conflict resolution.

2. Ordering gap once rebased: grace-elapsed workflow-path heads still get adopt-supersede.
This diff's base predates the adopt-now rule (#15038) β€” the hunk context contains no AdoptionGraceElapsed. On current v5, decidePR evaluates adopt-now at src/pkg/delegatedecision/policy.go:463 before contributor-offline at policy.go:471. This PR inserts its capability-gap rule immediately above contributor-offline and conditions it on !in.ContributorOnline && (…), so a .github/workflows/ head whose grace has elapsed returns adopt-now β†’ adopt-supersede β€” exactly the decided-but-never-executed outcome the body describes for #14822. #15208 places its rule above adopt-now and gates on in.AdoptionGraceElapsed || (!in.ContributorOnline && …), with a test "grace-elapsed workflow-path PR gets capability-gap, not adopt-now". Severity: medium; it would only show after rebase, which needs-rebase says is coming.

3. File-list source (minor, informational).
WorkflowPath here is derived from the existing single-page api.PullRequests.ListFiles(… PerPage: delegatedDecisionGatherLimit) call (src/pkg/dashboard/api_repo_item_decide_delegated.go:610, limit 100, errors swallowed), so a >100-file PR with the workflow edit beyond page one is only caught via the park-reason slug. #15208 fills ChangedFiles from the paginated github.ListPRChangedFiles and fails closed on error (delegated_pr_context.go hunk).

Suggestion: let #15208 own the delegatedecision rule (it is narrower, already covers the grace-elapsed branch and the complete file list), rebase this PR on top of it, drop the WorkflowPath bool field/rule and RuleCapabilityGap rename here, and keep the operator-action ledger, delegatedStuckWhy, glossary workflow-path entry and re-adoption journal fixes, which #15208 does not touch. Alternatively fold #15208's three policy hunks into this PR and close #15208 β€” either way only one of the two WorkflowPath definitions should survive. I have not changed or closed anything.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style / maintainability review (head 314e9aa)

1. capability-gap is hard-wired to the workflows blocker, but the rule is generic β€” src/pkg/dashboard/operator_actions.go:556-557 and :789-793

delegatedVerdictOutcome maps any rule == RuleCapabilityGap to Plain(GlossaryWorkflowPath) ("the PR edits .github/workflows…"), and the blocked branch of stageTrackerOperatorActionExec unconditionally sets Blocker = capability:workflows-permission and Progress = "could not adopt: …". The same rule is also returned by decideIssue (src/pkg/delegatedecision/policy.go:359-360) whenever capabilityGapRE (policy.go:237, matches any "App … lacks … permission(s)" prose) fires on an issue. An issue row decided capability-gap will now hover "could not adopt: the PR edits .github/workflows…" β€” wrong noun, wrong verb, wrong blocker. Keep the ledger's blocked view driven by the record's own detail instead of a hard-coded workflow sentence:

 	case a.Outcome == operatorActionOutcomeBlocked:
 		out.State = operatorActionStateBlocked
-		out.Blocker = operatorActionBlockerWorkflows
-		out.Progress = "could not adopt: " + delegatedecision.Plain(delegatedecision.GlossaryWorkflowPath)
-		out.Human = "Grant the hive's GitHub App the `workflows` permission and re-run the decision, or rebase and merge it yourself on GitHub, or close it as superseded."
+		out.Progress = a.Detail
+		out.Human = operatorActionHumanGrantPermission
+		if strings.Contains(a.Detail, "workflows") {
+			out.Blocker = operatorActionBlockerWorkflows
+			out.Progress = "could not adopt: " + delegatedecision.Plain(delegatedecision.GlossaryWorkflowPath)
+			out.Human = operatorActionHumanWorkflows
+		}

and in delegatedVerdictOutcome use Plain(GlossaryWorkflowPath) only when the decision's reason names the workflow path (pass Decision.Reason/in.WorkflowPath through, or fall back to Plain(RuleCapabilityGap) for the issue-side rule).

2. Duplicated human-step sentence β€” operator_actions.go:682 and :793 carry the identical 150-char "Grant the hive's GitHub App the workflows permission…" string (a third variant is the glossary Detail at decision_glossary.go:174-176). Hoist it to a const operatorActionHumanWorkflows next to operatorActionBlockerWorkflows (:88-91) so the two views cannot drift.

3. Two prefixes for one meaning β€” delegatedDecidedDetail emits "hive decided: " (operator_actions.go:541,543) while delegatedVerdictOutcome emits "decided: " (:557,562) yet "hive decided: " for the human-merge path (:560). The SPA then needs a second, byte-identical regex branch (static/index.html:15332) to render both the same way. Pick one prefix on the Go side and drop the extra JS branch, or collapse the two JS lines into /^(?:hive )?decided: /.

4. RuleCapabilityGap lives in the "Labels the delegate writes or reads" const block β€” src/pkg/delegatedecision/policy.go:126-132. It is a rule slug, not a label; move it to its own block (or beside the other rule strings) so the block's doc comment stays true.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intent alignment vs #15188 (read at 314e9aa): the diff delivers (a), (b)/policy and (d) of the issue's fix list on the production (async) path; (c) is correctly attributed to the already-merged #15209. Two advisories, neither blocking:

  1. Sync response path still settles a dedup no-effect as executing/applied. settledDelegatedOutcome (src/pkg/dashboard/operator_actions.go:526) handles rowActionNoEffect, but the mirror in operatorActionOutcome (operator_actions.go:378-389) only checks rowActionNoop before falling into delegatedVerdictOutcome (:393-397). Production runs with delegatedDecisionRunAsync = true (api_repo_item_decide_delegated.go:67) so the ledger is written by Settle, but when the flag is off (tests, or any future sync caller) the second click on an adopt-supersede records executing again β€” the exact "done while nothing adopted" shape the issue describes.

    --- a/src/pkg/dashboard/operator_actions.go
    +++ b/src/pkg/dashboard/operator_actions.go
    @@ func operatorActionOutcome(status int, body []byte)
     		if res, ok := resp["result"].(map[string]any); ok {
    -			if action, _ := res["action"].(string); action == rowActionNoop {
    +			if action, _ := res["action"].(string); action == rowActionNoop || action == rowActionNoEffect {
     				verdict := ""
     				if d, ok := resp["decision"].(map[string]any); ok {
     					verdict, _ = d["verdict"].(string)
     				}
     				var rr RowActionResult
     				if raw, err := json.Marshal(res); err == nil {
     					_ = json.Unmarshal(raw, &rr)
     				}
    +				if action == rowActionNoEffect {
    +					return operatorActionOutcomeNoEffect, operatorActionNoEffectDetail(&rr), head, true
    +				}
     				return operatorActionOutcomeNoOp, operatorActionNoopDetail(verdict, &rr), head, true
     			}
     		}
  2. Title and the "What changes β†’ (b) Adoption worker" / Tests sections describe code that is not in this diff. gh pr diff touches no pkg/github/automerge file and contains neither TestAdoptionReadoptsThroughReplayingJournal nor TestAdoptionReplayedOpenCopyIsReused; the "Supersedes #15208 Β· layers on #15209" section already says they were dropped in favour of #15209. Suggest dropping "re-adoption survives the mutation journal" from the title and the (b) block + those two test names from the body so the squash message matches the change (the changelog fragment already gets this right).

β€” hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs currency β€” two operator-facing docs enumerate the vocabulary this PR extends and were not updated (reviewed at 314e9aa).

  1. src/docs/api-reference.md:286 still documents the ledger as outcome: pending|applied|no-op|failed and state (waiting|addressed|stuck|pending|failed). This PR adds outcomes executing / no-effect / blocked (src/pkg/dashboard/operator_actions.go:60-73), states executing / blocked (:85-86) and payload fields progress / blocker / human (:628-634); dashboard/openapi.json was updated for all of them, the prose row was not.
-outcome: pending|applied|no-op|failed, detail, head_sha, stage}`; `last_operator_action` adds the derived `state` (`waiting|addressed|stuck|pending|failed`), `stuck_after_seconds`
+outcome: pending|applied|no-op|failed|executing|no-effect|blocked|superseded-by-state-change, detail, head_sha, stage}`; `last_operator_action` adds the derived `state` (`waiting|addressed|stuck|pending|failed|executing|blocked`), `progress` / `blocker` / `human` (what the worker has done with an `executing` decision, the capability-blocker slug holding a `blocked` one β€” e.g. `capability:workflows-permission` β€” and what a person can do), `stuck_after_seconds`
  1. src/docs/labels-and-control-signals.md:1431 ("Decision glossary") promises every slug "has one plain-words entry here", but the Reasons table (:1484 onward) has none of the three entries decision_glossary.go:174-180 adds. No test syncs that table (only the index.html mirror is checked, stage_tracker_glossary_test.go:17), so it needs a hand edit:
 | `adoption-disabled` | adoption is switched off on this hive | 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` | the adoption engine is carrying it out | 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`, `capability:workflows-permission`, `contributor-lane:workflow-path`, `workflow-path` | the PR edits .github/workflows; the hive's App lacks the `workflows` permission, so it cannot adopt it | 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. |
+| `adoption-undone` | the hive's copy was closed without merging and the adoption was undone | The hive opened its copy, but the copy was closed without merging and a fresh one could not be opened, so the adoption was undone and the PR is back in its normal flow. Re-run the decision to adopt it again, or act on GitHub. |

Out of scope (pre-existing): the same Rules table is also missing capability-gap (#15127) and human-merge (#15078).

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

…dopted or could-not-adopt, routes workflow-path PRs to the workflows capability blocker

Let hive decide β†’ adopt-supersede settled the operator-action ledger as
applied ("done") as soon as the adoption/supersede request label landed,
and the βœ“ hover kept saying so while nothing happened.

- #14822 edits .github/workflows: the adoption engine's
  fence refused the supersession (adoption-stalled:contributor-lane:
  workflow-path) and the row fell back to a bare Needs human decision.
  The policy now decides such PRs as capability-gap (recommend-only),
  the ledger records blocked, and the badge names the
  capability:workflows-permission blocker with what a person can do.
- #14947: the re-adoption after the copy #14977 was
  closed was replayed by the mutation journal; that fix landed in
  #15209 (prior_copy claim input, replayed provenance
  resolved). This PR layers the ledger / hover states over it.
- settledDelegatedOutcome: adopt-supersede β†’ executing, dedup β†’ no-effect,
  capability-gap β†’ blocked. The tracker derives the βœ“ state from the
  stage record (adopted as #N / could not adopt / still executing / stuck)
  and exposes progress, blocker and human to the SPA hover.

Fixes #15188

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the fix/adopt-supersede-execution branch from 314e9aa to 1b65801 Compare October 29, 2026 02:22
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/071-needs-author Human-authored PR: CI red, changes requested or conflicting; diagnosis posted, the author must act labels Oct 29, 2026
@clubanderson
clubanderson merged commit a18c523 into v5 Oct 29, 2026
78 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/adopt-supersede-execution branch October 29, 2026 02:40
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 29, 2026
…he glossary tables

Review follow-up for #15259: the human-merge Reasons row now carries its
glossary aliases (author-association, contributor-lane:author-association,
ready-for-human-merge, untrusted-author) like every other aliased row, and
the three Reasons #15206 added to decision_glossary.go β€” workflow-path
(with its aliases), adoption-executing and adoption-undone β€” get rows so the
table matches the code on v5.

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Oct 29, 2026
…merge (#15259)

* πŸ“– docs: add capability-gap and human-merge rows to the decision glossary Rules table

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* πŸ“– docs: list human-merge aliases and the #15206 adoption reasons in the glossary tables

Review follow-up for #15259: the human-merge Reasons row now carries its
glossary aliases (author-association, contributor-lane:author-association,
ready-for-human-merge, untrusted-author) like every other aliased row, and
the three Reasons #15206 added to decision_glossary.go β€” workflow-path
(with its aliases), adoption-executing and adoption-undone β€” get rows so the
table matches the code on v5.

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com>

---------

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: ci-maintainer <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves conflicts-with-open-pr Open PR has a merge conflict with another open PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

1 participant