Skip to content

✨ models: route reply verbs by model state on PRs and un-parked issues - #18383

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-18357
Nov 16, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
scanner/fix-18357

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

A bound workflow model declares reply verbs per state, and its states cover PRs (e.g. a draft-review state at stage 050) and issues being worked, not just issues parked on a person. Until now the sweep only offered model verbs on the parked-issue path, so a maintainer typing a verb the model advertises for a PR or an un-parked issue got silence, and the model's PR-state gates could not be released by reply.

This routes /hive <verb> by the item's current model state: parked issues keep their existing path (which also clears park labels); every other item whose state offers verbs gets the reply answered and only the model-mapped label applied, with no park labels touched. Unbound repos and hive-default are unchanged (no extra API calls).

The routing lives in pkg/github (where the reply sweep is) rather than pkg/stageengine; this keeps clear of the in-flight model-label work in #18363, which touches stageengine. The dashboard operator path (RecordOperatorIssueModelReply) still targets parked issues only and can follow separately.

Closes #18357

🤖 Generated with Claude Code

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 requested_by=@clubanderson

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 Nov 16, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 16, 2026
@github-actions

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
#17512 🐛 fix(github): recognise the hive's own unpark replies when it posts as an unconfigured login same files src/pkg/github/issue_unpark_command.go

@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 labels Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/pkg/github/issue_unpark_command.go 347 CONDITIONALS_NEGATION
src/pkg/github/issue_unpark_command.go 350 INCREMENT_DECREMENT
src/pkg/github/item_model_reply.go 143 CONDITIONALS_NEGATION
src/pkg/github/item_model_reply.go 143 CONDITIONALS_NEGATION
src/pkg/github/item_model_reply.go 145 CONDITIONALS_NEGATION

ℹ️ 5 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first lines added lines of each default-context hunk, so non-contiguous edits in one hunk are partly missed. This does not affect the verdict.

File Line Mutation
src/pkg/github/issue_unpark_command.go 261 ARITHMETIC_BASE
src/pkg/github/issue_unpark_command.go 261 ARITHMETIC_BASE
src/pkg/github/issue_unpark_command.go 261 ARITHMETIC_BASE
src/pkg/github/issue_unpark_command.go 261 ARITHMETIC_BASE
src/pkg/github/issue_unpark_command.go 261 ARITHMETIC_BASE

Verdict: uncovered (#17349).

@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 the new item_model_reply.go against the parked-issue path it shares helpers with; routing by current model state, label application and the answered-comment watermark look correct to me, and CI is green.

One low-severity note (src/pkg/github/issue_unpark_command.go:~344): when tryItemModelReply returns an error, the sweep does result.Skipped++; continue, so that item's existing handlers further down (the PR /hive approve acknowledgement, tryUnparkIssue) are skipped too. If the error is persistent (comment listing or permission lookup failing), a bound-model item loses those handlers on every sweep. Falling through to the existing handlers after logging would keep the old behaviour. Suggestion only; not blocking.

— hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive
hivecommons-hive Bot merged commit ee883b9 into v5 Nov 16, 2026
79 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-18357 branch November 16, 2026 06:57
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#18383205f20c` sha256:d65dc34999fd73a17ec22e8e45d69a27edcffaf2f08de1830a6928693cbe25ca — download from the dashboard or `hivectl review evidence #18383`.

@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 Nov 16, 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Workflow models: model reply verbs on PR states and un-parked issues

0 participants