Skip to content

πŸ› fix: Let hive decide keeps capability-gap needs-human parked - #15127

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
scanner/fix-15099
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
scanner/fix-15099

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Refs #15099 β€” partial fix: only the delegated-decision loop guard (item 2/3 of the issue). The structured blocker model, Re-check permissions, label reconciliation, tracker pill and /api/status capabilities remain.

Why: "Let hive decide" approved a direction on a capability-gap needs-human (App lacks workflows permission), un-parking the item so the scanner re-parked it forever. The delegate policy now detects the gap and returns recommend-only (capability-gap rule), which keeps the park and posts what to grant. Test added in policy_test.go.

Files overlapping with #15104/#15087: none (only src/pkg/delegatedecision/policy.go, its test, and a changelog fragment).

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson

hivecommons-hive Bot and others added 3 commits October 28, 2026 17:55
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 2026
@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 kellyaa 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 the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

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

@github-actions

github-actions Bot commented Oct 28, 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
#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
#15118 πŸ› fix: open the needs-human popover on issue rows with a parked PR same files src/pkg/dashboard/static/index.html
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker same files src/pkg/dashboard/static/index.html
src/pkg/delegatedecision/policy.go
#15140 πŸ› fix(dashboard): keep PR rows visible when their drawn_under parent is filtered out same files src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#15122 πŸ› Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard same files src/pkg/dashboard/static/index.html
#15134 πŸ› Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permission CONFLICT src/pkg/dashboard/static/index.html
#15070 ✨ Activity Monitor: presence indicator (clanker online / offline / none) on the waiting-on pill same files src/pkg/dashboard/static/index.html

Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off 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 stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read src/pkg/delegatedecision/policy.go at base v5 alongside the diff. The new capability-gap rule sits in decideIssue after HivePolicyChange and before OwnerOnly; headline() (policy.go:284) already joins Title, Question and Reasons, so the scanner's park text ("the App token cannot push (no workflows permission)") from the #15099 timeline is matched by capabilityGapRE, and recommendOnly keeps the park. The loop described in #15099 (un-park β†’ re-park) is on an issue (#14976), so limiting the rule to decideIssue covers the reported case. Refs #15099 is right here β€” the body says what remains (structured blocker, Re-check permissions, tracker pill). Looks correct to me.

One low note, not a defect in the change itself: the branch now carries two changelog fragments for one fix β€” changelog.d/fixed-let-hive-decide-capability-gap.md (scanner commit 646a00f) and changelog.d/fixed-15127.md (added by the hive's changelog: fragment for #15127 commit 6fe407b). Both will render in release notes. #15126 has the same pair (fixed-sandbox-spool-untrusted-poll.md + fixed-15126.md, commit 5390da4). Dropping the auto-added fixed-<pr>.md before merge keeps the notes to one line; the underlying cause is the fragment bot not recognising an existing fragment whose filename lacks the PR number.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read decideIssue and the classifiers around the new rule. CapabilityGap (src/pkg/delegatedecision/policy.go:302-305) matches the #15099 park reason ("App token cannot push (no workflows permission)") and returns recommendOnly with KeepsPark: true, so the un-park β†’ re-park loop the issue describes is closed for that case. I probed capabilityGapRE against the existing owner-only test headline ("GITHUB_TOKEN lacks packages:write") and it does not match, so that case still routes to owner-only.

One verified behaviour shift worth a look (policy.go:350-356): CapabilityGap is checked before OwnerOnly. A headline like "App installation lacks packages:write permission" matches both (secretsRE via app installation, and capabilityGapRE) and previously got ownerOnlyDecision β€” needs-owner + hold labels plus the "owner action required" text (policy.go:334-342). It now gets the plain recommendOnly with no labels. Granting an App permission is owner-only work, so either order the capability-gap check after OwnerOnly, or have the capability-gap decision add the same LabelNeedsOwner/LabelHold labels. Low severity, but it silently drops routing labels on items that used to get them.

CI blocker, changelog not code β€” changelog-fragment-guard is red: changelog.d/fixed-let-hive-decide-capability-gap.md:1 has no leading - bullet (guard: "a fragment must start with a '- ' entry bullet"). fixed-15127.md is the guard's autofix and is well-formed, so there are currently two fragments for one fix; keep one.

The PR body states this is item 2/3 of #15099 with Refs, so the partial scope is declared β€” no decision needed there.

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

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
TestGlossaryCoversEveryRuleSlug requires every recommendOnly slug to have a
glossary entry; the JS mirror in index.html must match GlossaryJSON. The
changelog fragment now starts with the '- ' bullet the guard requires.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 3980ccca5

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read policy.go, the glossary mirror and the dashboard caller at v5. Looks correct to me as the declared partial fix.

  • The rule is reachable in production: the dashboard builds Input.Reasons from the row's reason/caption (src/pkg/dashboard/api_repo_item_decide_delegated.go:549-555) and headline() joins Title, Question and Reasons (policy.go:284-286), so capabilityGapRE sees the scanner's needs-human text. The test fixture is the exact scanner string quoted in #15099 ("which the App token cannot push (no workflows permission); needs a human"), and the regex matches it.
  • Placing CapabilityGap ahead of OwnerOnly is right: secretsRE also matches "app installation"/"org permissions", so without the ordering a gap phrased that way would fall into the generic owner-only path and lose the grant-the-permission guidance. Both outcomes keep the park.
  • The index.html entry is byte-identical to the Go GlossaryEntry, which is what stage_tracker_glossary_test.go requires.

Info, not a defect: for issues the body's first 12 lines are also scanned, so an issue about App permissions (e.g. a proposal to add a permission check) will be classified capability-gap and become recommend-only. That is the conservative failure mode, so fine for now; the structured blocker from #15099 item 1 will remove the need for text matching anyway.

Body matches the diff; Refs #15099 with the remaining items named is the right link form for a partial fix.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 77d935f into v5 Oct 28, 2026
80 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15099 branch October 28, 2026 22:33
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#151276101c6d` sha256:4b7dd245af6906881bfec67b40bb7d5f5464a0e8e3a9ea825fa7702b306ba375 β€” download from the dashboard or `hivectl review evidence #15127`.

@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 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants