Skip to content

feat(.rootcoz): add rootcoz analysis agents#5580

Draft
rnetser wants to merge 2 commits into
mainfrom
feat/rootcoz-agents
Draft

feat(.rootcoz): add rootcoz analysis agents#5580
rnetser wants to merge 2 commits into
mainfrom
feat/rootcoz-agents

Conversation

@rnetser

@rnetser rnetser commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add 7 domain-specific rootcoz subagents to .rootcoz/agents/. These agents are automatically loaded into rootcoz AI sessions during failure analysis and chat, providing specialized capabilities for classifying test failures.

Depends on: myk-org/rootcoz#184 — rootcoz currently does not expose the subagent tool, so these agents are discovered but cannot be invoked yet. Once that bug is fixed, these agents become functional.

Agents

Agent Purpose Tools
fixture-tracer Trace pytest fixture chains via --setup-plan bash
wait-param-auditor Audit wait params/timeouts for CODE ISSUE elimination bash
quarantine-checker Check quarantine (xfail+QUARANTINED) and Jira conditional skips bash
teardown-cascade-detector Detect cross-test contamination from failed teardowns bash
version-extractor Extract environment versions for the mandatory Environment block read-only
product-code-investigator Trace failures into upstream Go source code (KubeVirt, CDI, HCO) bash
marker-analyzer Analyze pytest markers for hardware/env requirements bash

How it works

  1. rootcoz clones this repo during analysis/chat
  2. copy_rootcoz_pi_resources() copies .rootcoz/agents/<workspace>/.pi/agents/
  3. Pi's DefaultResourceLoader discovers them
  4. The AI delegates to agents via the subagent tool for specialized analysis tasks

Design decisions

  • All agents use OPENSHIFT_VIRTUALIZATION_TEST_IMAGES_ARCH=amd64 to bypass cluster dependency during pytest introspection
  • All agents have pytest fallback instructions (grep/read static analysis when pytest fails)
  • version-extractor is the only read-only agent (no bash) — it only parses JSON files
  • Agents use standardized input placeholders (<test_node_id>, <test_file_path>, etc.)
  • Hybrid output format: Summary + Details (agent-specific) + Classification Impact
  • No model override — agents inherit from the parent rootcoz session
  • Trusted-repo security warning included on agents that run pytest

Review notes

  • These agents were reviewed by 6 parallel reviewers (5 subagents + Cursor peer review) and iterated through fix cycles
  • The quarantine-checker correctly documents both mechanisms: automation quarantine (xfail + QUARANTINED) and Jira conditional skip (pytest.mark.jira + run=False)
  • Console output patterns in teardown-cascade-detector match this repo's custom pytest_report_teststatus format
What this PR does / why we need it:

Adds 7 rootcoz subagents for specialized failure analysis during rootcoz AI sessions.

Which issue(s) this PR fixes:
Special notes for reviewer:

Depends on myk-org/rootcoz#184 for the subagent tool to be exposed.

jira-ticket:

Co-authored-by: Claude noreply@anthropic.com

Add domain-specific pi subagents for rootcoz failure analysis and chat.
These agents are loaded from .rootcoz/agents/ into the workspace during
rootcoz analysis and chat sessions.

Agents:
- fixture-tracer: trace pytest fixture chains via --setup-plan
- wait-param-auditor: audit wait params and timeouts for CODE ISSUE elimination
- quarantine-checker: check quarantine (xfail+QUARANTINED) and Jira conditional skips
- teardown-cascade-detector: detect cross-test contamination from failed teardowns
- version-extractor: extract environment versions for the mandatory Environment block
- product-code-investigator: trace failures into upstream Go source code
- marker-analyzer: analyze pytest markers for hardware/env requirements

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: PI (claude-opus-4-6) <noreply@pi.dev>
Signed-off-by: rnetser <rnetser@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 35df7493-ffbe-42b5-944b-bc17934bc0d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rootcoz-agents

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Replace detailed procedural sections with agent delegation calls
for the 7 .rootcoz/agents/ subagents added in the previous commit.

Changes:
- Add "Available Analysis Agents" table after Section 1
- Slim Environment extraction → delegates to version-extractor
- Slim CODE ISSUE elimination checklist → delegates to wait-param-auditor
- Slim product code verification → delegates to product-code-investigator
- Update quarantine guidance → delegates to quarantine-checker
- Update fixture reading → delegates to fixture-tracer
- Update wait parameter inspection → delegates to wait-param-auditor

Each section keeps inline fallback instructions for when agents are
not available (subagent tool not present).

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Ruth Netser <rnetser@redhat.com>
Signed-off-by: rnetser <rnetser@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants