Repository navigation
Skip triage for already-closed Jira issues - #661
Conversation
get_jira_labels already calls get_jira_details via MCP but discards the status field. Replace it with get_jira_issue_metadata that extracts both labels and status from the same API response so callers that need status don't pay for a second round-trip. Assisted-by: Claude (Cursor)
When the triage queue is long an issue can be closed before the agent picks it up. Check the issue status right after the existing label dedup and return early for Closed/Done issues, avoiding wasted LLM tokens. For user-triggered runs (ymir_todo) the label is removed and a comment is posted so the requester gets feedback. Assisted-by: Claude (Cursor)
Cover the new metadata helper (labels+status extraction, failure defaults) and the triage agent's process_task behavior: closed/done issues are skipped, user-triggered runs get ymir_todo cleanup and an ack comment, open issues proceed normally. Assisted-by: Claude (Cursor)
There was a problem hiding this comment.
Code Review
This pull request introduces a check to skip triage for Jira issues that are already closed or done, updating the API calls to fetch both labels and status in a single request. Feedback suggests improving the cleanup logic on closed or done issues by unconditionally removing both ymir_todo and ymir_triage_in_progress labels if present, rather than only removing ymir_todo when the run is user-triggered.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
PR Summary by QodoSkip triage for already-closed Jira issues
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
7 rules 1. Stale in-progress label
|
Co-authored-by: Laura Barcziová <49026743+lbarcziova@users.noreply.github.com>
Problem
When the triage queue is long, a Jira issue can be closed externally before the triage agent picks it up. The agent has no status check and burns LLM tokens triaging a resolved issue.
Solution
Add a deterministic pre-check in
process_taskthat skips already-closed issues before any LLM work, by piggybacking on the existingget_jira_detailsAPI call (zero additional Jira round-trips).Changes
tasks.py: Replaceget_jira_labelswithget_jira_issue_metadatathat extracts both labels and status from the sameget_jira_detailsresponse. Returns([], None)on failure so triage proceeds safely.triage_agent.py: After the existing label dedup check, return early if issue status isClosedorDone. For user-triggered runs (ymir_todo), remove the label and post a comment explaining the skip. Both actions respectdry_run.test_tasks.py: Tests for the new metadata helper covering status extraction and failure defaults.test_triage_agent.py: Tests verifyingprocess_taskskips closed issues, cleans upymir_todoon user-triggered runs, and proceeds normally for open issues.