Repository navigation
✨ models: route reply verbs by model state on PRs and un-parked issues - #18383
Conversation
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>
|
[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
|
Mutation testing5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
ℹ️ 5 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first
Verdict: |
There was a problem hiding this comment.
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
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 thanpkg/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