|
| 1 | +--- |
| 2 | +description: > |
| 3 | + Runs the Issue Verification workflow for a JIRA issue, managing the lifecycle |
| 4 | + from merged MR through errata creation, testing analysis, and status transitions. |
| 5 | +arguments: |
| 6 | + jira_issue: |
| 7 | + description: "JIRA issue key (e.g. RHEL-12345)" |
| 8 | + required: true |
| 9 | + dry_run: |
| 10 | + description: "If true, don't make any changes to JIRA or other systems" |
| 11 | + required: false |
| 12 | + default: "false" |
| 13 | + ignore_needs_attention: |
| 14 | + description: "If true, process the issue even if it has ymir_needs_attention label" |
| 15 | + required: false |
| 16 | + default: "false" |
| 17 | +--- |
| 18 | + |
| 19 | +# Issue Verification Agent |
| 20 | + |
| 21 | +Manages the lifecycle of a JIRA issue after a fix has been backported or rebased. |
| 22 | + |
| 23 | +## MCP Tools Used |
| 24 | + |
| 25 | +From the privileged gateway (`MCP_GATEWAY_URL`): |
| 26 | + |
| 27 | +- `get_jira_details` — Fetch full JIRA issue details |
| 28 | +- `edit_jira_labels` — Add/remove labels |
| 29 | +- `add_jira_comment` — Add comments |
| 30 | +- `change_jira_status` — Transition issue status |
| 31 | +- `update_jira_comment` — Update existing comments |
| 32 | +- `add_jira_attachments` — Add attachments to issues |
| 33 | +- `search_gitlab_project_mrs` — Search for merge requests |
| 34 | +- `get_erratum` — Get erratum details |
| 35 | +- `get_erratum_build_nvr` — Get build NVR from erratum |
| 36 | +- `get_testing_farm_request` — Get Testing Farm request status |
| 37 | +- `reproduce_testing_farm_request` — Reproduce a test run with different build |
| 38 | + |
| 39 | +## Workflow Steps |
| 40 | + |
| 41 | +1. **fetch_and_validate_issue** — Fetch JIRA issue, check labels/components |
| 42 | +2. **check_errata_status** — Branch based on whether errata link exists |
| 43 | +3. **run_before_errata** — Check for merged MRs, wait for errata creation |
| 44 | +4. **run_after_errata** — Validate preliminary testing, test coverage, move status |
| 45 | +5. **analyze_testing** — Call testing_analyst sub-agent for test result analysis (INTEGRATION status) |
| 46 | +6. **check_reproduction** — Check status of baseline test reproduction |
| 47 | + |
| 48 | +## Output Schema |
| 49 | + |
| 50 | +```json |
| 51 | +{ |
| 52 | + "status": "string — description of what happened", |
| 53 | + "reschedule_in": "float — seconds until next check (-1 means don't reschedule)" |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +## How to Run |
| 58 | + |
| 59 | +```python |
| 60 | +from ymir.agents.issue_verification_agent import run_issue_verification |
| 61 | + |
| 62 | +result = await run_issue_verification( |
| 63 | + jira_issue="RHEL-12345", |
| 64 | + dry_run=True, |
| 65 | + ignore_needs_attention=False, |
| 66 | +) |
| 67 | +print(result.status, result.reschedule_in) |
| 68 | +``` |
| 69 | + |
| 70 | +Or standalone: |
| 71 | + |
| 72 | +```bash |
| 73 | +JIRA_ISSUE=RHEL-12345 DRY_RUN=true python -m ymir.agents.issue_verification_agent |
| 74 | +``` |
0 commit comments