Skip to content

πŸ› fix: advisory checklists resolve themselves and never park on a person - #15765

Closed
hivecommons-hive[bot] wants to merge 2 commits into
v5from
scanner/fix-15754
Closed

hivecommons-hive[bot] wants to merge 2 commits into
v5from
scanner/fix-15754

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Refs #15754 β€” items 1, 2, 4 and the issue half of item 3 are fixed here; the advisory half of item 3 (delegated plan would: close / "Keep open; hive is working k/N items") is left to a sub-issue of #15754 because the plan's button runs decide-delegated, and an honest "close" needs a new delegated verdict/action in delegatedecision/policy.go + the executor, both under edit in #15741 and #15757.

Why

#15734 (a dedupe checklist parked at 045, "Decision required: yes") asked a person to click when the hive had already closed or merged most of its items. The only auto-close path handled triage/advisory-labelled checklists, so a parked checklist could not close itself. Also, "Let hive decide" on an issue described a PR approval: "Approve #15734 as it is and let the merge queue merge it."

What changes

  1. Advisory checklists resolve themselves (src/pkg/github/dedupe_advisory_items.go). The close-on-merge backfill now runs an item pass on every hive-authored dedupe checklist, labelled or not, including one parked at 045. It ticks each - [ ] #N … (also PR #N, owner/repo#N) to - [x] once #N is closed or merged. When every task-list line is resolved, it posts one comment, "All N items resolved (#a closed, #b merged …) β€” closing this advisory.", and closes the checklist as completed. A line that doesn't start with a reference waits for a person to tick it. A checklist someone reopened after the hive closed it is left alone (same marker as before). Writes go through WritebackAllowed (issue_close). The existing close tail moved into closeDedupeAdvisory and is reused, so the writeback ratchet counts don't change. For a triage/advisory checklist whose items are still open, the existing refs/expiry/reclassify rules still run.
  2. Advisories never park on a person (stage_tracker_advisory*.go). An advisory row drops the 045 stage, the needs-decision pill and the decision_needed/blocker blocks. A checklist with task lines reads "Advisory Β· hive is working the items (k/N resolved)", with the hive as actor and the optional lead "Close now" (the existing close-read). k/N comes from the body, which the enumeration already carries as IssueAdvisory.items/resolved, so this adds no API calls.
  3. Delegated plan wording on issues (api_repo_item_decide_delegated_plan_issue.go, one-line hook). An approve on an issue now reads "Approve the direction of #N and let the hive pick it up." with issue consequences. PR wording is unchanged.
  4. Config knob dedupe.advisory_autoclose (new DedupeConfig, *bool, unset = on). It's additive, and false turns the item pass off. It is wired through closeOnMergeOptionsFor, allowlisted as yaml-only, and added to the golden as "dedupe": {}.

Edits to files shared with #15741/#15757 are minimal and additive: one hook line in the plan file and one field in config.go, away from their hunks.

Tests

  • dedupe_advisory_items_test.go: closes once all items resolve (closed vs merged wording), ticks and waits, items without a leading reference, knob off, a foreign author, a labelled advisory falling through to the old rules, progress/ref parsing.
  • stage_tracker_advisory_working_test.go: wording, knob, never-parks (045, decision, blocker, needs-human, waiting), and a built triage: duplicate and overlapping open issues/PRs to consolidateΒ #15734 row.
  • api_repo_item_decide_delegated_plan_issue_test.go: issue vs PR wording.
  • config/dedupe_test.go, cmd/hive/close_on_merge_advisory_autoclose_test.go: knob default and wiring.

Docs: operator-reference (new dedupe section), labels reference (triage/advisory), activity-monitor (advisory row). Changelog: changelog.d/fixed-15754-advisory-checklists-autoclose.md.


Filed by the hive scanner for #15754 (reported by @clubanderson).

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

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@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 30, 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 nicholasjackson 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 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 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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
#15750 πŸ› Reconcile launch_cmd on backend switch and degrade instead of crash-looping on a base-config contradiction same files src/pkg/config/config.go
#15757 ✨ Auto-merge hive-authored superseding PRs without operator decision same files src/docs/operator-reference.md
src/pkg/config/config.go
src/pkg/config/testdata/agent_runtime_golden.json
src/pkg/dashboard/settings_parity_allowlist.txt
#15748 πŸ› [reviewer] park PRs at 085 Needs decision when the fixer exhausted its attempts same files src/pkg/dashboard/stage_tracker_build.go
#15763 πŸ› merge train: ready PRs lead; odometer rolls only after the bee lands same files src/docs/operator-reference.md
src/pkg/dashboard/static/index.html
#15731 πŸ“– docs: split the operator reference same files src/docs/operator-reference.md

@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.

Decision needed: @clubanderson should decide whether #15765 is closed in favour of #15767, which carries the same advisory-autoclose change plus the delegated-plan would: close half this PR defers.

This appears to duplicate #15767, which makes the same change for #15754 β€” and the two cannot both merge.

What I verified by reading both diffs against their merge-bases:

  • Same semantic change: both add dedupe.advisory_autoclose (*bool, unset = on) to pkg/config, the same settings_parity_allowlist.txt line, the same sweep in pkg/github that ticks - [ ] #N β†’ - [x] and closes as completed with "All N items resolved (…) β€” closing this advisory.", and the same tracker caption "Advisory Β· hive is working the items (k/N resolved)".
  • They conflict, not coexist: this PR names the type config.DedupeConfig with option CloseOnMergeOptions.DisableAdvisoryAutoclose; #15767 names them DedupeLaneConfig / AdvisoryAutocloseOff, and both edit config.go, close_on_merge.go, close_on_merge_sweep.go, dedupe_checklist_findings.go, stage_tracker_advisory.go.
  • The name here is also why test (dashboard 1/4) is red. src/pkg/config/dedupe.go:5 declares type DedupeConfig, and src/pkg/writeback/config.go:84 already declares a different DedupeConfig (burst_items, hourly_cap, …). settingsparity.resolve (src/internal/settingsparity/settingsparity.go:188-190) resolves a bare identifier through a global byName map, so Config.Dedupe resolves to the writeback struct and TestSettingsDialogReferencesEveryHiveYAMLLeaf fails with dedupe.burst_items, dedupe.burst_window, dedupe.enabled, dedupe.hourly_cap not allowlisted. #15767 avoids this by naming the type DedupeLaneConfig.
  • Scope: this PR's body leaves the advisory half of item 3 (would: close / "Keep open; hive is working k/N items") to a sub-issue; #15767 implements it (pkg/delegatedecision/policy.go, api_repo_item_decide_delegated.go) and Closes #15754.

Recommendation: #15767 is the one to keep β€” broader, closes the issue, and does not trip the parity resolver. I have not closed anything; flagging for a maintainer.

β€” 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.

Decision needed: @clubanderson should decide whether #15765 is closed in favour of #15767, which implements the same two #15754 fixes (same dedupe.advisory_autoclose knob, same tick-and-close sweep, same issue-plan wording) plus the advisory would: close half this PR defers.

This appears to duplicate #15767, which makes the same change for #15754 and is the broader of the two.

What I verified by reading both diffs against v5:

  • Both add dedupe.advisory_autoclose (src/pkg/config/dedupe.go, config.go, settings_parity_allowlist.txt, agent_runtime_golden.json), both wire it through closeOnMergeOptionsFor in src/cmd/hive/close_on_merge_sweep.go, both tick - [ ] #N β†’ - [x] and close as completed with an "All N items resolved (…)" comment, both drop the 045 park from stage_tracker_advisory.go, both reword the issue delegated plan. Same semantics, same intent, 9 overlapping files edited independently β€” so they conflict, they cannot both merge.
  • #15767 also covers the half this PR's body explicitly leaves to a sub-issue (advisory would: close in delegatedecision/policy.go + executor), so it is the superset.

This PR's CI is red and both failures come from its own diff (run 41061173342):

  • settings_parity_test.go:33 β€” dedupe.burst_items, dedupe.burst_window, dedupe.enabled, dedupe.hourly_cap, dedupe.same_item_ttl reported as unallowlisted. The new config.DedupeConfig (src/pkg/config/dedupe.go) shares its bare name with writeback.DedupeConfig, so the parity resolver picks up the writeback struct's fields under dedupe.*. #15767 sidesteps this by naming the type DedupeLaneConfig.
  • indexgen_test.go:28 β€” static/index.html differs from the concatenation of static-src/ at line 19713. This PR edits src/pkg/dashboard/static/index.html directly without the matching static-src/js/* change; #15767 edits static-src/js/tracker-*.js and regenerates.

Flagging for a maintainer: if you agree, this one could be closed in favour of #15767. I have not closed anything.

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

settingsparity resolves bare identifiers by name across every collected
package, so config.DedupeConfig resolved to writeback.DedupeConfig and
TestSettingsDialogReferencesEveryHiveYAMLLeaf reported the writeback
dedupe leaves as unallowlisted. Rename to DedupeAdvisoryConfig.

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

Copy link
Copy Markdown
Contributor Author

CI triage β€” build-hub (linux/amd64, true, false, 60): infrastructure failure, DEFER

The job failed in [builder 2/6] RUN apk add --no-cache git with:

ERROR: failed to compute cache key: failed to copy: httpReadSeeker: failed open:
could not fetch content descriptor sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
(application/vnd.oci.image.layer.v1.tar+gzip) from remote: not found

A layer referenced by the imported GHA buildx cache manifest (gha:10692290315259595541) is no longer present in the registry mirror. No code in this PR is involved (the golang/alpine base images resolved fine; the error is in cache-key computation). Re-ran the failed jobs only.


🐝 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

@clubanderson

Copy link
Copy Markdown
Member

Superseded by #15767 (covers all of #15754 including the advisory plan wording β€” would: close when every item is resolved, no-write "Keep open; hive is working k/N items" otherwise, with the new VerdictClose/ActionCloseCompleted in delegatedecision and the executor). #15767 is merged to v5; closing this one.

@clubanderson
clubanderson deleted the scanner/fix-15754 branch October 30, 2026 13:46
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 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 copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant