Repository navigation
π fix: Let hive decide keeps capability-gap needs-human parked - #15127
Conversation
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>
|
[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 |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
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>
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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>
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
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.Reasonsfrom the row's reason/caption (src/pkg/dashboard/api_repo_item_decide_delegated.go:549-555) andheadline()joinsTitle,QuestionandReasons(policy.go:284-286), socapabilityGapREsees the scanner's needs-human text. The test fixture is the exact scanner string quoted in #15099 ("which the App token cannot push (noworkflowspermission); needs a human"), and the regex matches it. - Placing
CapabilityGapahead ofOwnerOnlyis right:secretsREalso 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.htmlentry is byte-identical to the GoGlossaryEntry, which is whatstage_tracker_glossary_test.gorequires.
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
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Refs #15099 β partial fix: only the delegated-decision loop guard (item 2/3 of the issue). The structured
blockermodel, Re-check permissions, label reconciliation, tracker pill and/api/statuscapabilities remain.Why: "Let hive decide" approved a direction on a capability-gap needs-human (App lacks
workflowspermission), un-parking the item so the scanner re-parked it forever. The delegate policy now detects the gap and returns recommend-only (capability-gaprule), which keeps the park and posts what to grant. Test added inpolicy_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