Skip to content

Add standalone errata-workflow agent with MCP tools#594

Open
martinky82 wants to merge 19 commits into
packit:mainfrom
martinky82:main
Open

Add standalone errata-workflow agent with MCP tools#594
martinky82 wants to merge 19 commits into
packit:mainfrom
martinky82:main

Conversation

@martinky82

Copy link
Copy Markdown
Contributor

Convert the supervisor's ErratumHandler into a standalone BeeAI workflow agent that communicates exclusively through MCP tools. This includes:

  • Errata models in ymir/common/models.py (ErratumBuild, TransitionRuleSet, RHELVersion, ErratumPushDetails, etc.)
  • 9 new errata MCP tools in ymir/tools/privileged/errata.py (transition rules, build maps, stage push, state changes, ownership, comments)
  • CreateJiraIssueTool in ymir/tools/privileged/jira.py
  • All tools registered in gateway.py
  • errata_workflow_agent.py with full workflow: fetch erratum, check attention flags, verify ownership, route by status, advance through states, and verify product listings
  • compose.yaml service and Makefile target for standalone execution
  • SKILL.md documenting the complete workflow

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.
  • Update or write new documentation in packit/packit.dev.
  • ‹fill in›

Fixes

Related to

Merge before/after

RELEASE NOTES BEGIN

Packit now supports automatic ordering of ☕ after all checks pass.

RELEASE NOTES END

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a standalone Errata Workflow Agent using the BeeAI framework to manage the lifecycle of errata, along with several new MCP tools for interacting with the Errata Tool and Jira. The review feedback identifies several critical runtime issues and robustness improvements. These include a potential TypeError in _get_rel_prep_lookup from accessing list data incorrectly, potential IndexErrors when handling empty API responses or HTML tables, and a logical flaw in the agent where failed JIRA fetches could bypass ownership verification. Additionally, improvements are suggested for BeautifulSoup class extraction and Jira Cloud/Server compatibility when resolving user identifiers.

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.

Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/jira.py Outdated
Comment thread ymir/tools/privileged/jira.py Outdated
Comment thread ymir/agents/errata_workflow_agent.py Outdated
Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/errata.py
Comment thread agents_as_skills/errata_workflow/SKILL.md Outdated
Comment thread agents_as_skills/errata_workflow/SKILL.md Outdated
Comment thread ymir/agents/errata_workflow_agent.py Outdated
Comment thread ymir/agents/errata_workflow_agent.py Outdated
Comment thread ymir/agents/errata_workflow_agent.py
Comment thread ymir/agents/errata_workflow_agent.py Outdated
Comment thread ymir/common/models.py
Comment thread ymir/tools/privileged/errata.py
Comment thread ymir/tools/privileged/jira.py Outdated
martinky82 and others added 16 commits June 24, 2026 19:18
Convert the supervisor's ErratumHandler into a standalone BeeAI workflow
agent that communicates exclusively through MCP tools. This includes:

- Errata models in ymir/common/models.py (ErratumBuild, TransitionRuleSet,
  RHELVersion, ErratumPushDetails, etc.)
- 9 new errata MCP tools in ymir/tools/privileged/errata.py (transition
  rules, build maps, stage push, state changes, ownership, comments)
- CreateJiraIssueTool in ymir/tools/privileged/jira.py
- All tools registered in gateway.py
- errata_workflow_agent.py with full workflow: fetch erratum, check
  attention flags, verify ownership, route by status, advance through
  states, and verify product listings
- compose.yaml service and Makefile target for standalone execution
- SKILL.md documenting the complete workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Mirrors the JIRA_ALLOW_STATUS_CHANGES pattern from issue verification
agent. Erratum state changes are skipped unless the env var is explicitly
set to true, preventing accidental state transitions in production.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The errata.py updates left old code alongside new robustness
improvements, causing ruff and Python syntax failures. Also fix
line-too-long and unused variable in errata_workflow_agent.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace _get_user_account_id with _get_user_identifier that returns
a (field_key, value) tuple to properly support both Jira Server and
Cloud. Remove leftover duplicate assignee block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
beautifulsoup4, lxml, and requests-gssapi are imported by errata.py
but were only listed in the root requirements.txt, not in the
ymir-tools sub-package requirements used by CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SearchJiraIssuesTool returns JSONToolOutput(result=list), so
output.result is already the issues list — no .get("issues") needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
martinky82 and others added 3 commits June 24, 2026 19:50
- Remove ownership check step (agent should not change erratum ownership)
- Clarify product listing verification purpose in SKILL.md
- Remove module docstring (not used elsewhere in the project)
- Rename JOTNAR constants to YMIR
- Revert accidental SearchJiraIssuesTool return value change

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add name field and remove unsupported arguments from SKILL.md frontmatter
- Add beautifulsoup4 and lxml to test container dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
underscore is not allowed in skill names
@martinky82 martinky82 requested a review from TomasKorbar June 25, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants