Repository navigation
π [v6] delegate: name the option or leave the choice on an issue with competing options - #16935
Conversation
β¦ompeting options "Let hive decide" on projectbluefin/utah#920 (carry debugging tools in the image, a ujust recipe, or a -dx flavor) planned "Approve the direction of hivecommons#920 and let the hive pick it up" under default-approve. That recorded no choice, so the claiming agent would pick an option itself. The delegate now reads the options an issue offers: the lettered options the "What to reply" notice reads (same parser, same hive-comment precedence), or a numbered list a choice lead-in introduces ("Pick one:", "competing", "options"), so a numbered list of steps is not read as one. When the same text recommends an option, it goes with that one and names it in the plan and the recorded /hive decision (recommended-option). When it recommends none, it writes nothing and leaves the choice to a person, offering Give direction (competing-options). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0113KwWU4TkJ8wfy3XjusyGo Signed-off-by: Douglas Baggett <doug.baggett@gmail.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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
docs-currency (read at head f4ec633)
The AC-required text is all present and consistent: Go glossary (decision_glossary.go:152-155), JS mirror (tracker-filter-fetch.js:105-106, regenerated index.html), glossary docs table, the activity-monitor rules table row and rule list (activity-monitor.md:720,723), and the changelog fragment.
One operator-facing text was left behind:
PolicyText still contradicts the new rule β src/pkg/delegatedecision/policy.go:47 reads "never ask the owner a question back. Pick the option that keeps work moving and is reversible", and the Issues: clause (policy.go:50) lists every issue rule one by one (selfreport, hive-filed proposal, hive advisory were each added as clauses when their rules landed). competing-options is a new exception to that headline β it hands the choice back to the owner β but has no clause. The header comment (policy.go:40-44) calls this "the single place the delegate's policy lives" and the docs (activity-monitor.md:707) quote it as the owner's words verbatim; it is also fed verbatim to the LLM decider (llm.go:116). The rules table now documents behaviour the policy text it claims to implement forbids.
Suggested addition at the end of the Issues: clause in policy.go:50 (before the closing .):
-β¦ while items remain open nothing is written.
+β¦ while items remain open nothing is written; an issue that asks its owner to choose between two or more options (lettered, or a numbered list a "Pick one:" / "competing" / "options" lead-in introduces) β go with the option the issue itself recommends and name it in the recorded decision; when it recommends none, write nothing and leave the choice to the owner (Give direction).and in activity-monitor.md:707 ("In short: β¦never ask the owner a question back") add ", except for a choice between options the issue does not itself recommend" so the summary matches the table row below it.
β hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Style review (head f4ec633). No blocker from this perspective; two maintainability notes with fixes. 1. The new rule slugs escape the glossary ratchet. --- a/src/pkg/delegatedecision/decision_glossary_test.go
+++ b/src/pkg/delegatedecision/decision_glossary_test.go
@@
regexp.MustCompile(`\bRuleLLM\s*=\s*"([a-z0-9-]+)"`),
regexp.MustCompile(`\bRuleReturnToAuthor\s*=\s*"([a-z0-9-]+)"`),
+ regexp.MustCompile(`\bRule(?:RecommendedOption|CompetingOptions)\s*=\s*"([a-z0-9-]+)"`),
}
found := map[string]bool{}
- for _, file := range []string{"policy.go", "llm.go"} {
+ for _, file := range []string{"policy.go", "llm.go", "competing_options.go"} {2. The hive-comment precedence loop is duplicated. --- a/src/pkg/github/issue_unpark_menu.go
+++ b/src/pkg/github/issue_unpark_menu.go
@@
+// unparkIsHiveNoticeText reports a hive comment that is never park text:
+// the notice, a command reply, an accepted reply, the re-check note or the
+// delegate's verdict. Options and recommendations are not read from it.
+func unparkIsHiveNoticeText(body string) bool {
+ return strings.Contains(body, unparkNoticeMarker) || strings.Contains(body, unparkReplyMarkerPrefix) ||
+ strings.Contains(body, unparkAcceptedMarker) || strings.Contains(body, parkRecheckMarker) ||
+ delegatedecision.IsDelegatedComment(body)
+}
--- a/src/pkg/github/issue_decision_options.go
+++ b/src/pkg/github/issue_decision_options.go
@@
switch {
case strings.Contains(body, parkWithdrawnMarkerPrefix):
source = ""
- case strings.Contains(body, unparkNoticeMarker), strings.Contains(body, unparkReplyMarkerPrefix),
- strings.Contains(body, unparkAcceptedMarker), strings.Contains(body, parkRecheckMarker),
- delegatedecision.IsDelegatedComment(body):
+ case unparkIsHiveNoticeText(body):
case numberedDecisionOptions(body) != nil:Nit, same file line 101: Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Review findings from Correctness review (read at head f4ec633; files opened: The parser, the dashboard wiring, the summary-sanitiser refactor and the plan wording all match #16934 and are well covered. One regression in rule ordering:
The comment says "Every rule below approves a direction", but Suggested fix β keep the placement (so flaky/ratchet/design-proposal/default-approve never approve a bare direction) but let the not-now gate win for an evidence-less hive-filed proposal: // Every rule below approves a direction. An issue that offers a choice
// is approved only as the option it recommends, never as a bare one.
+ // A hive-filed proposal with no evidence behind it is still declined
+ // (proposal-not-now), options or not.
if d, ok := competingOptionsDecision(in); ok {
+ if IsProposal(in.Title, in.Labels) && hiveFiled(in) {
+ if _, _, evidence := ProposalEvidence(in.Title, in.Body); !evidence {
+ return notNowDecision(ref)
+ }
+ }
return d
}plus a test in Review findings from Read the new rule and its wiring against the v6 tree at What I verified:
No defects found. Diff matches the PR description; no scope beyond #16934. Evidence bundle `#169356c59e41` sha256:fdcb0852b034ecfc36462492e73654eda8b0dfc25538f2a889c787e9f39694cf β download from the dashboard or `hivectl review evidence #16935`.Review findings from Correctness re-review at 6c59e41 (delta since f4ec633 is the Still present (in-scope, blocks): --- a/src/pkg/delegatedecision/policy.go
+++ b/src/pkg/delegatedecision/policy.go
@@ -582,6 +582,12 @@
// Every rule below approves a direction. An issue that offers a choice
// is approved only as the option it recommends, never as a bare one.
+ if IsProposal(in.Title, in.Labels) && hiveFiled(in) {
+ if _, _, ok := ProposalEvidence(in.Title, in.Body); !ok {
+ return notNowDecision(ref)
+ }
+ }
if d, ok := competingOptionsDecision(in); ok {
return d
}(and a test: hive-filed proposal, two options, "Recommendation: option 2" β rule New in the delta (out-of-scope, low): the merged "What hive saw" panel promises "every fact the decision rules read" ( --- a/src/pkg/delegatedecision/facts.go
+++ b/src/pkg/delegatedecision/facts.go
@@ -177,6 +177,15 @@
if q := strings.TrimSpace(in.Question); q != "" {
add("Question for a person", q, FactInfo)
}
+ if len(in.Options) > 0 {
+ names := make([]string, len(in.Options))
+ for i, o := range in.Options {
+ names[i] = o.Name()
+ }
+ add("Options offered", strings.Join(names, "; "), FactInfo)
+ if in.RecommendedOption != "" {
+ add("Recommended option", "option "+in.RecommendedOption, FactInfo)
+ }
+ }
return out
}Previous docs-currency note ( Review findings from Read the diff against the v6 tree at 6c59e41, then the body. The change does what it says and I found no defect. Verified
One open question, not a defect β Looks correct to me. I have not approved or changed anything. |
|
@Danathar this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (14 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Intent-alignment (delta re-review @ 6c59e41) β the delta is a v6 merge-in only (8 upstream commits, no author commits). The PR's own changes against #16934 are unchanged and still satisfy it: the competing-options plan wording and the recommended-option plan survived the merge intact (src/pkg/dashboard/api_repo_item_decide_delegated_plan.go:339-344 and :375-381). No new scope creep.
One adjacent gap the merge exposes (not blocking for #16934):
Input.Facts() never lists the options the new rules read. Upstream #16936 added "What hive saw" with the contract "Only facts the rules use are listed" (src/pkg/delegatedecision/facts.go:28-31), but at this head Facts() reads Question (facts.go:177-179) and nothing of Options/RecommendedOption (policy.go:206-207), which competingOptionsDecision depends on (competing_options.go:45-66). So for utah#920 the preview says "Leave the choice to you β¦ 3 options" while the facts panel shows no option at all. Suggested addition after the Question fact in facts.go:
if q := strings.TrimSpace(in.Question); q != "" {
add("Question for a person", q, FactInfo)
}
+ if len(in.Options) >= 2 {
+ names := make([]string, 0, len(in.Options))
+ for _, o := range in.Options {
+ names = append(names, o.Name())
+ }
+ add("Options offered", strings.Join(names, "; "), FactInfo)
+ if in.RecommendedOption != "" {
+ add("Recommended option", "option "+in.RecommendedOption, FactInfo)
+ } else {
+ add("Recommended option", "none", FactBlocks)
+ }
+ }
return outPrior findings at f4ec633: correctness (policy.go:585 competing-options runs before proposal-not-now at policy.go:688) and docs-currency (policy.go:47 PolicyText still says "never ask the owner a question back") are still present β policy.go was not touched by the delta; those belong to their perspectives, not repeated here.
β hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88
Summary: On an issue that asks its owner to choose between options, "Let hive decide" offered a bare "Approve the direction of #N", which left the choice to whichever agent claimed it. Now, if the issue recommends one option, the hive goes with that option and names it in both the dialog and the recorded
/hive decision. If it recommends none, the hive does nothing and offers Give direction.Fixes #16934
What
projectbluefin/utah#920 asks to "Pick one:" of three ways to ship debugging tools: in the image, a
ujustrecipe, or a-dxflavor. Let hive decide planned Approve the direction of #920 and let the hive pick it up, underdefault-approve. With this change it plans one of two things:competing-options, verdictrefused. Nothing is written, and Give direction stays offered.ujustrecipe β¦ β the option Fix contribute-hive local mode CLI launchΒ #920 recommends β and let the hive build it. Rulerecommended-option. The recorded comment is/hive decision go with option 2: β¦, so the claiming agent builds that option.Why
The plan sentence (
api_repo_item_decide_delegated_plan.go) is the same for every issue approval. The verdict came fromdefault-approve, whose recorded text tells the agent "where options remain, take the one that keeps work moving". No delegate rule read the options an issue lists.How
github.IssueDecisionOptionsreads lettered options through the sameunparkMenuForthe "What to reply" notice uses, with the same parser and the same rule that the newest hive park comment wins. If there are none, it reads a numbered list, but only when the line before item 1 reads as a choice ("Pick one:", "competing", "options", "either"). utah#920's own numbered "What it cost" steps are therefore not taken as options. A numbered recommendation needs an explicit reference ("option 2", "I recommend 3"), so "saves 3 hours" doesn't count.unparkCleanOptionSummary. It strips HTML comments, defangs @mentions and cuts to one line.Input.Options/Input.RecommendedOption.delegatedecision.competingOptionsDecisionruns before every approving issue rule, from flaky-test down to default-approve. Because the item no longer lands on the reversible default, the LLM decider (IsReversibleDefault) never picks an option either.Files
src/pkg/delegatedecision/competing_options.go(new),policy.go,decision_glossary.gosrc/pkg/github/issue_decision_options.go(new),issue_unpark_command.go(summary cleaner factored out, behaviour unchanged)src/pkg/dashboard/api_repo_item_decide_delegated.go,api_repo_item_decide_delegated_plan.go,static-src/js/tracker-filter-fetch.js,static/index.html(regenerated)src/docs/dashboard-sections/activity-monitor.md,src/docs/labels-and-control-signals/glossary-and-operations.md,changelog.d/fixed-delegate-competing-options.mdTests
ApplyRails. A recommendation approves and records "go with option 2: β¦". One option, or a recommendation of an option that isn't offered, doesn't count as a choice. The result is neverIsReversibleDefault./hive decision go with option 2: β¦.go test ./pkg/delegatedecision/ ./pkg/github/ ./pkg/dashboard/all pass.go vetis clean. The docs and api-reference citation checks pass, as does the changelog guard.Out of scope
The "What to reply" notice still offers letters only. It doesn't yet offer
/hive decision 1|2|3for numbered options.π€ Generated with Claude Code
https://claude.ai/code/session_0113KwWU4TkJ8wfy3XjusyGo