← Back to Pull requests

Add PR payload triage and job discovery to yolo-agent #213

Open
lucaconsalvi opened this pull request with 2170 lines diff across 12 files
View on GitHub
lucaconsalvi lucaconsalvi commented on Jul 03, 2026 12:42 UTC
Author

Summary

Adds an AI-powered PR payload CI triage pipeline to the yolo-agent, covering three
phases:

- Payload Job Discovery — auto-discovers correct payload jobs from a PR's changed
files by cross-referencing pipeline_run_if_changed regexes in openshift/release CI
configs against nightly job definitions. Works for any repo (origin, installer,
MCO, etc.)
- Diff-Aware Triage — fetches deep junit artifacts from GCS and the PR diff,
classifies each failure as pr-caused vs flaky based on whether the failing test
appears in the code changes
- Staleness Detection — compares /payload-job comment timestamp against the latest
commit. If a new commit was pushed after the payload was triggered, marks results
as stale and suggests re-triggering with the correct command

Design decisions

- Never auto-posts /payload-job — always asks the user first
- Single comment fetch — reused across all three phases
- Validation checks if existing trigger commands match discovery recommendations
- mode field in JSON output: "triage", "discovery", or "none"
- stale field: true when latest commit is newer than payload trigger
- Graceful fallback when payload pages are expired (no crash)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

New Features
Added PR-focused payload-monitor CLI modes for payload job discovery and triage, with markdown/json output.
Added a PR review “payload track” that performs discovery/triage, validates existing /payload-job triggers, and flags stale payload runs.
Tests
Added unit tests covering PR discovery, triage classification, and JSON/Markdown formatting.
Documentation
Added usage documentation for the payload triage skill.
Chores
* Updated plugin versions in marketplace metadata and manifests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 2170 lines (+2161 / -9) across 12 files Reviewer: lucaconsalvi Review duration: 221357m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.96) × (1 − Review Confidence (0.83)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.96 · 2170 lines diff across 12 files
0.96
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.94 · 5 substantive comment(s)
0.94
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
82%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.400
Self Review self_review
0.140
Sensitive Paths sensitive_paths
0.096
Real PR Conversation Timeline
39 items
openshift-ci[bot] openshift-ci[bot] commented on Jul 03, 2026 12:43 UTC
Bot

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

openshift-ci[bot] openshift-ci[bot] commented on Jul 03, 2026 12:43 UTC
Bot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: <a href="https://github.com/openshift-eng/edge-tooling/pull/213#" title="Author self-approved">lucaconsalvi</a>

The full list of commands accepted by this bot can be found here.

The pull request process is described here

<details >
Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [lucaconsalvi]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    coderabbitai[bot] coderabbitai[bot] commented on Jul 03, 2026 12:43 UTC
    Bot

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- This is an auto-generated comment: review paused by coderabbit.ai -->

    [!NOTE]

    ## Reviews paused

    > It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

    > Use the following commands to manage reviews:

    - @coderabbitai resume to resume automatic reviews.

    - @coderabbitai review to trigger a single review.

    > Use the checkboxes below for quick actions:

    - [ ] <!-- {"checkboxId": "7f6cc2e2-2e4e-497a-8c31-c9e4573e93d1"} --> ▶️ Resume reviews

    - [ ] <!-- {"checkboxId": "e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review

    <!-- end of auto-generated comment: review paused by coderabbit.ai -->
    <!-- walkthrough_start -->

    Walkthrough

    This PR adds payload-job discovery and PR payload triage to payload-monitor, exposes both through the CLI and shell wrapper, and updates workflow docs plus plugin metadata for the new payload track.

    Changes

    Payload workflow

    |Layer / File(s)|Summary|
    |---|---|
    |Discovery collector <br> payload-monitor/payload_monitor/collectors/payload_job_discovery.py, payload-monitor/tests/test_collectors_payload_job_discovery.py|Adds discovery models, release-repo lookup, PR parsing, version detection, CI matching, nightly filtering, discovery validation, formatting, and tests for discovery paths.|
    |Triage collector <br> payload-monitor/payload_monitor/models.py, payload-monitor/payload_monitor/collectors/pr_payload.py, payload-monitor/tests/test_collectors_pr_payload.py|Adds triage models, Prow/GCS job collection, deep junit parsing, PR diff/file retrieval, failure classification, triage formatting, and tests for triage behavior.|
    |CLI and shell wiring <br> payload-monitor/payload_monitor/__main__.py, plugins/pr-review/scripts/pr-payload.sh|Adds PR-specific CLI branches and a shell wrapper that runs discovery, validates payload-job commands, performs triage, checks staleness, and emits mode-specific JSON.|
    |Docs and metadata <br> plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md, plugins/pr-review/skills/yolo-agent/SKILL.md, plugins/edge-ocp-ci/.claude-plugin/plugin.json, plugins/pr-review/.claude-plugin/plugin.json, .claude-plugin/marketplace.json|Adds payload triage workflow docs, updates payload-track rules and prerequisites, and bumps plugin versions.|

    Estimated code review effort: 4 (Complex) | ~60 minutes

    <!-- walkthrough_end -->
    <!-- pre_merge_checks_walkthrough_start -->

    <details>
    <summary>🚥 Pre-merge checks | ✅ 10 | ❌ 1</summary>

    ❌ Failed checks (1 warning)

    | Check name | Status | Explanation | Resolution |
    | :------------: | :--------- | :-------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
    | Ai-Attribution | ⚠️ Warning | Recent PR commits use Co-Authored-By: Claude... trailers, and no Assisted-by/Generated-by trailers are present. | Amend the affected commits to replace AI Co-Authored-By trailers with Red Hat Assisted-by or Generated-by attribution, then resubmit. |

    <details>
    <summary>✅ Passed checks (10 passed)</summary>

    | Check name | Status | Explanation |
    | :------------------------: | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
    | Title check | ✅ Passed | The title clearly summarizes the main change: adding PR payload triage and job discovery to yolo-agent. |
    | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
    | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
    | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
    | No-Weak-Crypto | ✅ Passed | Changed files use HTTP/GitHub/GCS and string matching only; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons found. |
    | Container-Privileges | ✅ Passed | PASS: The only changed file is a Markdown skill doc; no container/K8s manifests or privilege fields (privileged, hostPID/Network/IPC, SYS_ADMIN, allowPrivilegeEscalation) appear. |
    | No-Sensitive-Data-In-Logs | ✅ Passed | New logs only emit public PR refs/URLs, job names/counts, and generic gh/requests errors; no passwords, tokens, PII, or session data are logged. |
    | No-Hardcoded-Secrets | ✅ Passed | Changed files are docs only; scans found no API keys, passwords, private keys, credentialed URLs, or long base64 literals. |
    | No-Injection-Vectors | ✅ Passed | No listed injection vectors found: subprocess calls use argv lists, YAML uses safe_load, and there’s no eval/exec, shell=True, os.system, or unsafe HTML insertion. |

    </details>

    </details>

    <!-- pre_merge_checks_walkthrough_end -->
    <!-- finishing_touch_checkbox_start -->

    <details>
    <summary>✨ Finishing Touches</summary>

    <details>
    <summary>🧪 Generate unit tests (beta)</summary>

  • <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests
  • </details>

    </details>

    <!-- finishing_touch_checkbox_end -->
    <!-- tips_start -->

    ---

    <sub>Comment @coderabbitai help to get the list of available commands.</sub>

    <!-- tips_end -->
    <!-- internal state start -->

    <!-- N4IgzgxgFgpg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aqsgD62PZuSBOgONZin82PtRCHu53APaj27OgCxqR2p0IYCQAAdKbEYDewO3jhS7OzxRRTt+/0eQQxK7/G53KUG/QjRbgrREBNMld5S2VRMdJQV90lV5XRKqdgbUqW9kH0YGmNXJOWfAQdsGXAgod4cEXVa5bneDBNKCaH/Em7E2j+0R6naD/UeoPqHPH5oDKXyh0MMuZHAX5NOfnHmbGcGnB2ATgA+VqTEAFHVxgQ2FT2enUAFE3zNLwDIBKkAlWynW5F+UDYCAe5kz2o+Y2C1ZogCQDdDFoUQBxhF4RgHr2J1E6ZomjALsE3BiwTvbyBu92vbckerHGHy7p+We3L112cCuws/AXs3nL59zDL8A7kle3n3Fy470t85yg9JlMM9j5SAA=== -->

    <!-- internal state end -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return

    _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_

    Discovery-mode business errors don't produce a non-zero exit.

    When discover_payload_jobs returns a DiscoveryResult with .error set (e.g. "Could not determine OCP version from branch", "No CI config found..."), this branch still prints the result and returns normally — the process exits 0. Downstream, pr-payload.sh's run_discovery only checks the JSON is parseable (jq -c '.'), so it treats this as success; the actual error reason is silently dropped and the wrapper falls into the generic "No payload URL in comments and no matching payload jobs discovered" message, hiding the real cause from the agent/user.

    <details>
    <summary>🐛 Proposed fix</summary>

             result = discover_payload_jobs(pr_ref, changed_files, release_repo)
     
             if output_format == "json":
                 print(format_discovery_json(result))
             else:
                 print(format_discovery_markdown(result))
    +        if result.error:
    +            raise SystemExit(1)
             return
    

    </details>

    <!-- suggestion_start -->

    <details>
    <summary>📝 Committable suggestion</summary>

    ‼️ IMPORTANT

    Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        # --- PR payload job discovery mode ---
        if discover:
            if not pr_ref:
                logger.error("--pr is required when using --discover")
                raise SystemExit(1)
    
            from .collectors.payload_job_discovery import (
                discover_payload_jobs,
                find_release_repo,
                format_discovery_json,
                format_discovery_markdown,
            )
            from .collectors.pr_payload import fetch_pr_changed_files
    
            release_repo = find_release_repo()
            if not release_repo:
                logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
                raise SystemExit(1)
    
            changed_files = fetch_pr_changed_files(pr_ref)
            if not changed_files:
                logger.error(f"No changed files found for {pr_ref}")
                raise SystemExit(1)
    
            result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    
            if output_format == "json":
                print(format_discovery_json(result))
            else:
                print(format_discovery_markdown(result))
            if result.error:
                raise SystemExit(1)
            return
    

    </details>

    <!-- suggestion_end -->

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/__main__.py` around lines 111 - 141, The
    discover path in __main__.py does not treat discover_payload_jobs business
    failures as process failures, so errors inside DiscoveryResult are printed and
    the command exits 0. Update the discover branch around
    discover_payload_jobs/format_discovery_json/format_discovery_markdown to detect
    when the returned result has .error set, log or print that error, and exit
    non-zero instead of continuing normally. Preserve the existing success path when
    no error is present.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:12e0757361ff695ef2bf16ca -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return
    +
    +    # --- PR payload triage mode ---
    +    if pr_payload_url:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --pr-payload-url")
    +            raise SystemExit(1)
    +
    +        from .collectors.pr_payload import (
    +            build_triage_result,
    +            classify_failures,
    +            fetch_pr_changed_files,
    +            fetch_pr_diff,
    +            fetch_pr_payload_run,
    +            format_triage_json,
    +            format_triage_markdown,
    +        )
    +
    +        jobs = fetch_pr_payload_run(pr_payload_url)
    +        if not jobs:
    +            logger.error("No jobs found at the provided URL")
    +            raise SystemExit(1)
    +
    +        pr_files = fetch_pr_changed_files(pr_ref)
    +        diff_content = fetch_pr_diff(pr_ref)
    +        verdicts = classify_failures(jobs, pr_files, diff_content)
    +        result = build_triage_result(pr_payload_url, pr_ref, jobs)
    +        result.verdicts = verdicts
    +
    +        if output_format == "json":
    +            print(format_triage_json(result))
    +        else:
    +            print(format_triage_markdown(result))
    +        return
    +

    _🩺 Stability & Availability_ | _🟡 Minor_ | _⚡ Quick win_

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/bin/bash
    set -euo pipefail
    
    printf '\n== Files ==\n'
    git ls-files 'payload-monitor/payload_monitor/__main__.py' 'payload-monitor/payload_monitor/collectors/pr_payload.py' 'payload-monitor/**/*.sh' | sed 's/^/ - /'
    
    printf '\n== Outline __main__.py ==\n'
    ast-grep outline payload-monitor/payload_monitor/__main__.py --view expanded | sed -n '1,220p'
    
    printf '\n== Outline pr_payload.py ==\n'
    ast-grep outline payload-monitor/payload_monitor/collectors/pr_payload.py --view expanded | sed -n '1,260p'
    
    printf '\n== Relevant snippets __main__.py ==\n'
    sed -n '120,210p' payload-monitor/payload_monitor/__main__.py | cat -n
    
    printf '\n== Relevant snippets pr_payload.py ==\n'
    sed -n '1,260p' payload-monitor/payload_monitor/collectors/pr_payload.py | cat -n
    
    printf '\n== Search pr-payload.sh triage ==\n'
    rg -n "run_triage|stderr|pr-payload|triage" payload-monitor -g '*.sh' -g '*.py' -g '*.md' | sed -n '1,220p'
    

    Repository: openshift-eng/edge-tooling

    Length of output: 21466

    ---

    🏁 Script executed:

    #!/bin/bash
    set -euo pipefail
    
    printf '\n== __main__.py top and entrypoint ==\n'
    sed -n '1,130p' payload-monitor/payload_monitor/__main__.py | cat -n
    
    printf '\n== Any pr-payload shell script ==\n'
    git ls-files 'payload-monitor/**/*.sh' | sed -n '1,200p'
    
    printf '\n== Click exception handling quick probe ==\n'
    python3 - <<'PY'
    import click, inspect
    import click.core
    src = inspect.getsource(click.core.BaseCommand.main)
    print(src[:5000])
    PY
    

    Repository: openshift-eng/edge-tooling

    Length of output: 11650

    ---

    </details>

    Handle triage fetch failures explicitly

    fetch_pr_payload_run() can raise on 4xx/5xx responses, and this branch lets that exception escape the Click command. A stale or expired payload URL will surface as a traceback instead of a clean CLI error; wrap the fetch in a targeted try/except and exit with a logged message.

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/__main__.py` around lines 143 - 175, The PR
    payload triage path in __main__.py lets fetch_pr_payload_run() exceptions escape
    and show a traceback. Wrap the fetch_pr_payload_run(pr_payload_url) call in a
    targeted try/except, log a clear CLI error for 4xx/5xx or stale/expired payload
    URLs, and exit cleanly with SystemExit(1) before continuing to
    fetch_pr_changed_files, fetch_pr_diff, or build_triage_result.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:95ab9a1debaa12a886e60ebb -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]

    _📐 Maintainability & Code Quality_ | _🟡 Minor_ | _⚡ Quick win_

    Ambiguous variable name l — ruff E741 violation.

    <details>
    <summary>🐛 Proposed fix</summary>

    -            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]
    +            return [line.strip() for line in result.stdout.strip().split("\n") if line.strip()]
    

    </details>

    As per coding guidelines, "Python code must pass ruff validation."

    <!-- suggestion_start -->

    <details>
    <summary>📝 Committable suggestion</summary>

    ‼️ IMPORTANT

    Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

                return [line.strip() for line in result.stdout.strip().split("\n") if line.strip()]
    

    </details>

    <!-- suggestion_end -->

    <details>
    <summary>🧰 Tools</summary>

    <details>
    <summary>🪛 Ruff (0.15.20)</summary>

    [error] 76-76: Ambiguous variable name: l

    (E741)

    </details>

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py` at line 76, The
    list comprehension in the PR payload collector uses an ambiguous single-letter
    variable name, which triggers the ruff E741 rule. Update the comprehension in
    the code that processes result.stdout in the PR payload collector to use a
    descriptive name instead of l, keeping the same stripping and filtering
    behavior. Reference the relevant result.stdout parsing logic so the variable
    rename is applied consistently.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:9d14fa45a8582b21dd467f86 -->

    _Source: Linters/SAST tools_

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 9bdadd8

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]
    +        return []
    +    except (subprocess.TimeoutExpired, FileNotFoundError):
    +        return []
    +
    +
    +def _find_e2e_step_name(gcs_base: str) -> Optional[str]:
    +    """Discover the e2e test step directory name from the artifacts."""
    +    artifacts_path = f"{gcs_base}/artifacts/"
    +    dirs = _list_gcs_dir(artifacts_path)
    +    for d in dirs:
    +        # The top-level step directory (e.g. e2e-metal-ovn-two-node-fencing-recovery/)
    +        if d.endswith("/") and "gather" not in d and "release" not in d and "build" not in d:
    +            step_name = d.rstrip("/").rsplit("/", 1)[-1]
    +            return step_name
    +    return None
    +
    +
    +def _fetch_deep_junit_failures(prow_url: str) -> list[FailingTest]:
    +    """Fetch individual test-level failures from the deep junit artifacts.
    +
    +    Looks for junit_e2e__*.xml inside the e2e test step's artifacts/junit/ directory.
    +    These contain the actual Go test names (g.It descriptions), not just step-level results.
    +    """
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return []
    +
    +    step_name = _find_e2e_step_name(gcs_base)
    +    if not step_name:
    +        return []
    +
    +    junit_dir = f"{gcs_base}/artifacts/{step_name}/baremetalds-e2e-test/artifacts/junit/"
    +    files = _list_gcs_dir(junit_dir)
    +
    +    junit_files = [f for f in files if f.endswith(".xml") and "junit_e2e" in f]
    +    if not junit_files:
    +        # Fall back to any junit XML
    +        junit_files = [f for f in files if f.endswith(".xml")]
    +
    +    tests: list[FailingTest] = []
    +    for jf in junit_files:
    +        content = _fetch_gcs_file(jf)
    +        if not content:
    +            continue
    +        try:
    +            root = ET.fromstring(content)
    +            for tc in root.iter("testcase"):
    +                failure = tc.find("failure")
    +                if failure is not None:
    +                    name = tc.get("name", "")
    +                    error_msg = failure.get("message", "") or (failure.text or "")
    +                    error_msg = error_msg.replace("&#xA;", "\n").replace("&#34;", '"')
    +                    duration = float(tc.get("time", "0") or "0")
    +                    tests.append(FailingTest(
    +                        name=name, error_message=error_msg[:500], duration_seconds=duration,
    +                    ))
    +        except ET.ParseError as e:
    +            logger.debug(f"Failed to parse {jf}: {e}")
    +
    +    return tests
    +
    +
    +def _fetch_single_job(prow_url: str) -> PRPayloadJob:
    +    name = _job_name_from_url(prow_url)
    +    result = _fetch_job_result(prow_url)
    +    job = PRPayloadJob(name=name, prow_url=prow_url, result=result)
    +
    +    if result == JobResult.FAILURE:
    +        # Fetch deep junit for individual test names
    +        deep_tests = _fetch_deep_junit_failures(prow_url)
    +        if deep_tests:
    +            job.failing_tests = deep_tests
    +            job.error_summary = "; ".join(t.name[:80] for t in deep_tests[:3])
    +        else:
    +            # Fall back to step-level junit
    +            from .prow import _fetch_junit_failures
    +            tests, summary = _fetch_junit_failures(prow_url)
    +            job.failing_tests = tests
    +            job.error_summary = summary
    +
    +    return job
    +
    +
    +def fetch_pr_payload_run(url: str, max_workers: int = 4) -> list[PRPayloadJob]:
    +    """Fetch a pr-payload-tests run URL and return all jobs with results."""
    +    logger.info(f"Fetching PR payload run: {url}")
    +    resp = _session.get(url)
    +    resp.raise_for_status()
    +
    +    prow_urls = _parse_prow_urls(resp.text)
    +    if not prow_urls:
    +        logger.warning("No Prow job links found on the page")
    +        return []
    +
    +    logger.info(f"Found {len(prow_urls)} job(s), fetching results...")
    +    jobs: list[PRPayloadJob] = []
    +    with ThreadPoolExecutor(max_workers=max_workers) as pool:
    +        futures = {pool.submit(_fetch_single_job, u): u for u in prow_urls}
    +        for future in as_completed(futures):
    +            try:
    +                jobs.append(future.result())
    +            except Exception as e:
    +                logger.error(f"Failed to fetch job {futures[future]}: {e}")
    +
    +    jobs.sort(key=lambda j: j.name)
    +    return jobs

    _🩺 Stability & Availability_ | _🟡 Minor_ | _⚡ Quick win_

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/bin/bash
    set -euo pipefail
    
    printf '\n== Relevant files ==\n'
    git ls-files 'payload-monitor/payload_monitor/**' 'payload-monitor/**/__main__.py' 'payload-monitor/**/.http*' 'payload-monitor/**/http*' | sed -n '1,200p'
    
    printf '\n== Search for create_session and fetch_pr_payload_run usages ==\n'
    rg -n "def create_session|create_session\(|fetch_pr_payload_run\(" payload-monitor -S
    
    printf '\n== Inspect candidate files (line numbers) ==\n'
    for f in \
      payload-monitor/payload_monitor/collectors/pr_payload.py \
      payload-monitor/payload_monitor/http.py \
      payload-monitor/payload_monitor/__main__.py
    do
      if [ -f "$f" ]; then
        echo "--- $f ---"
        wc -l "$f"
        sed -n '1,260p' "$f" | cat -n
      fi
    done
    

    Repository: openshift-eng/edge-tooling

    Length of output: 25859

    ---

    🏁 Script executed:

    #!/bin/bash
    set -euo pipefail
    
    printf '\n== collectors/http.py ==\n'
    sed -n '1,220p' payload-monitor/payload_monitor/collectors/http.py | cat -n
    
    printf '\n== HTTP tests ==\n'
    sed -n '1,220p' payload-monitor/tests/test_collectors_http.py | cat -n
    
    printf '\n== Search for timeout usage in payload-monitor ==\n'
    rg -n "timeout\s*=|default_timeout|RequestException|raise_for_status\(|discover_payload_jobs|discover" payload-monitor/payload_monitor payload-monitor/tests -S
    

    Repository: openshift-eng/edge-tooling

    Length of output: 14242

    ---

    </details>

    Handle expired payload pages gracefully
    create_session() already enforces a default timeout, but resp.raise_for_status() still makes --pr-payload-url abort on 4xx/5xx pages. Catch requests.RequestException here or in __main__.py and return [] so stale payload links fail cleanly instead of stopping triage.

    <details>
    <summary>🧰 Tools</summary>

    <details>
    <summary>🪛 Ruff (0.15.20)</summary>

    [warning] 178-178: Do not catch blind exception: Exception

    (BLE001)

    </details>

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py` around lines 160 -
    182, The PR payload fetch flow in fetch_pr_payload_run currently lets
    resp.raise_for_status() abort on expired or stale pages, so handle
    requests.RequestException around the initial _session.get/raise_for_status path
    and return an empty list instead of crashing. Keep the fallback behavior aligned
    with the existing logging in fetch_pr_payload_run and the caller in __main__.py
    so --pr-payload-url fails cleanly when the payload page is no longer valid.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:f751b76675dd8cb8845b749f -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---

    _🔒 Security & Privacy_ | _🟡 Minor_ | _⚡ Quick win_

    Missing allowed-tools frontmatter for a Bash-running, user-invocable skill.

    This skill is user-invocable: true and instructs running python3 -m payload_monitor via a shell (Line 27), but the frontmatter has no allowed-tools field.

    As per path instructions, "Tools: for user-invocable skills, include minimal allowed-tools; for Bash-running skills, declare Bash explicitly."

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md` around lines 1 - 6,
    The SKILL.md frontmatter for edge-ocp-ci:pr-payload-triage is missing the
    required allowed-tools entry for a user-invocable skill that runs a Bash
    command. Update the frontmatter near the name/description/user-invocable fields
    to include a minimal allowed-tools list that explicitly declares Bash, and keep
    it aligned with the skill’s shell-based payload_monitor invocation.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:83293b9639c846210854fe03 -->

    _Source: Path instructions_

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.

    _🎯 Functional Correctness_ | _🟠 Major_

    No documented failure modes / edge cases.

    The Execution/Output sections don't cover what to do if the payload page has expired, the tool errors out, or gh/gsutil auth fails — only the happy path is described.

    As per path instructions, "Edge cases: failure modes documented, guard checks between phases," and "Flag missing edge cases or safety guards as severity 'high'."

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md` around lines 21 - 42,
    The SKILL.md Execution/Output guidance only describes the happy path and is
    missing failure-mode handling. Update the sections around the payload-monitor
    flow to document what to do when the pr-payload-tests page is
    expired/unavailable, when payload-monitor or its fetch/classification steps
    error out, and when gh/gsutil authentication or access checks fail. Add explicit
    guard/check instructions between the fetch, GCS lookup, junit download, GitHub
    diff fetch, and report steps, and reference the payload-monitor CLI flow and
    markdown triage report output so the edge-case handling is easy to find.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:af2cebfc68c7d5b74681b833 -->

    _Source: Path instructions_

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Confirmed as addressed by @lucaconsalvi

    <!-- This is an auto-generated comment by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |

    _📐 Maintainability & Code Quality_ | _🟡 Minor_ | _⚡ Quick win_

    Emoji usage in a rendered table violates the no-emoji markdown rule.

    🔴/🟡 appear in a plain markdown table, not inside a fenced code block, so the "example output" exception from prior learnings doesn't apply here.

    As per coding guidelines, Markdown must be "professional, terse, and customer-centric — no emojis or filler." Based on learnings, the emoji exception only covers content "inside fenced code blocks... where they're intentionally included as example output."

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md` around lines 44 - 49,
    The rendered markdown table in the Interpreting Results section uses emoji
    icons, which violates the no-emoji rule for regular markdown content. Update the
    verdict examples in SKILL.md so the table entries referenced by the
    interpreting-results guidance use non-emoji text labels or symbols that comply
    with the markdown style rules, and keep the table professional and terse.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:1ee249ef8ec9a73b6079e2fb -->

    _Sources: Coding guidelines, Learnings_

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |
    +
    +### Follow-up Actions
    +
    +Based on the results, suggest:
    +
    +- **All FLAKY**: "All failures are unrelated to your PR. Safe to re-trigger." Then find the original `/payload-job` trigger comment on the PR and suggest re-posting it verbatim.
    +- **Some PR CAUSED**: "Job X failed in a test your PR modified. Check the error and Prow link before re-triggering."
    +- **All PR CAUSED**: "All failures are in tests your PR touches. Investigate before re-triggering."
    +
    +> **Note:** To re-trigger, copy the original `/payload-job <periodic-job-name>` comment from the PR — not just `/payload-job` alone, and never `/retest` (which only re-runs regular CI checks).

    _🩺 Stability & Availability_ | _🟠 Major_ | _⚡ Quick win_

    Re-trigger suggestion lacks an explicit confirmation requirement.

    "suggest re-posting it verbatim" doesn't explicitly instruct the agent to ask the user before posting a /payload-job comment (compare to the parent yolo-agent skill's Payload Track, which is explicit: "ask the user before posting"/"Never auto-post"). Since this skill is directly user-invocable and may run outside that orchestration, it should state its own confirmation requirement.

    As per path instructions, "Safety: destructive operations require user confirmation... Flag missing edge cases or safety guards as severity 'high'."

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md` around lines 51 - 59,
    The Follow-up Actions guidance in SKILL.md should explicitly require user
    confirmation before any `/payload-job` re-post, since the current wording only
    says to suggest re-posting the original comment verbatim. Update the
    instructions around the “All FLAKY” path and the `/payload-job` note to say the
    agent must ask the user before posting and must not auto-post or assume
    permission. Reference the “Follow-up Actions” section and the `/payload-job`
    re-trigger note so the confirmation requirement is unambiguous.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:f5edabfc5b67af3b75a76963 -->

    _Source: Path instructions_

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/pr-review/scripts/pr-payload.sh:1
    @@ -0,0 +1,262 @@
    +#!/usr/bin/bash
    +set -euo pipefail
    +
    +# Detect PR payload test runs, discover appropriate payload jobs, and triage
    +# failures via payload-monitor.
    +#
    +# Three-phase flow:
    +#   Phase 1: Discovery — find which payload jobs match the PR's changed files
    +#   Phase 2: Validation — check if existing /payload-job comments match discovery
    +#   Phase 3: Triage — analyze payload test results if a run exists
    +#
    +# Exit codes: 0=results found (triage or discovery), 1=no matches, 3=error
    +
    +URL_PATTERN='^https://github\.com/[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+/pull/[0-9]+$'
    +PAYLOAD_URL_PATTERN='https://pr-payload-tests\.ci\.openshift\.org/runs/ci/[^ )"'"'"']*'
    +
    +die() {
    +    echo "Error: $1" >&2
    +    exit 3
    +}
    +
    +check_dependencies() {
    +    command -v gh >/dev/null 2>&1 || die "gh CLI is not installed"
    +    command -v jq >/dev/null 2>&1 || die "jq is not installed"
    +    command -v python3 >/dev/null 2>&1 || die "python3 is not installed"
    +    command -v gsutil >/dev/null 2>&1 || die "gsutil is not installed"
    +    gh auth status >/dev/null 2>&1 || die "gh CLI is not authenticated — run 'gh auth login'"
    +}
    +
    +validate_url() {
    +    local url="$1"
    +    if [[ ! "${url}" =~ ${URL_PATTERN} ]]; then
    +        die "Invalid PR URL: ${url}"
    +    fi
    +}
    +
    +parse_url() {
    +    local url="$1"
    +    ORG=$(echo "${url}" | cut -d'/' -f4)
    +    REPO=$(echo "${url}" | cut -d'/' -f5)
    +    PR_NUMBER=$(echo "${url}" | cut -d'/' -f7)
    +}
    +
    +find_payload_monitor_dir() {
    +    if [[ -n "${PAYLOAD_MONITOR_DIR:-}" ]]; then
    +        if [[ -d "${PAYLOAD_MONITOR_DIR}" ]]; then
    +            echo "${PAYLOAD_MONITOR_DIR}"
    +            return
    +        fi
    +        die "PAYLOAD_MONITOR_DIR set but does not exist: ${PAYLOAD_MONITOR_DIR}"
    +    fi
    +
    +    local script_dir
    +    script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    +
    +    local candidates=(
    +        "${script_dir}/../../../payload-monitor"
    +        "${PWD}/repos/edge-tooling/payload-monitor"
    +    )
    +
    +    local base_dirs=("${HOME}/Documents/Projects" "${HOME}/Projects" "${HOME}/src")
    +    for base in "${base_dirs[@]}"; do
    +        candidates+=("${base}/edge-tooling/payload-monitor")
    +    done
    +
    +    for candidate in "${candidates[@]}"; do
    +        if [[ -d "${candidate}" ]]; then
    +            echo "$(cd "${candidate}" && pwd)"
    +            return
    +        fi
    +    done
    +
    +    die "Cannot find payload-monitor directory. Set PAYLOAD_MONITOR_DIR or run from edge-tooling repo."
    +}
    +
    +fetch_pr_comments() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh api "repos/${org}/${repo}/issues/${pr_number}/comments" \
    +        --paginate 2>/dev/null \
    +        || die "Failed to fetch PR comments for ${org}/${repo}#${pr_number}"
    +}
    +
    +fetch_latest_payload_url() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE "${PAYLOAD_URL_PATTERN}" | tail -1
    +}
    +
    +fetch_trigger_command() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE '^/payload-job .+' | tail -1
    +}
    +
    +fetch_payload_comment_timestamp() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '
    +        [.[] | select(.body | test("^/payload-job "))] | last | .created_at // empty
    +    ' 2>/dev/null
    +}
    +
    +fetch_latest_commit_timestamp() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh pr view "${pr_number}" --repo "${org}/${repo}" \
    +        --json commits --jq '.commits[-1].committedDate' 2>/dev/null
    +}
    +
    +run_discovery() {
    +    local pr_ref="$1" pm_dir="$2"
    +
    +    local discovery_output
    +    discovery_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --discover --pr "${pr_ref}" --format json 2>/dev/null) || return 1
    +
    +    echo "${discovery_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${discovery_output}"
    +}
    +
    +run_triage() {
    +    local payload_url="$1" pr_ref="$2" pm_dir="$3"
    +
    +    local triage_output
    +    triage_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --pr-payload-url "${payload_url}" \
    +        --pr "${pr_ref}" \
    +        --format json 2>/dev/null) || return 1
    +
    +    echo "${triage_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${triage_output}"
    +}
    +
    +main() {
    +    [[ $# -lt 1 ]] && die "Usage: $(basename "$0") <github-pr-url>"
    +
    +    local pr_url="$1"
    +
    +    check_dependencies
    +    validate_url "${pr_url}"
    +    parse_url "${pr_url}"
    +
    +    local pm_dir
    +    pm_dir=$(find_payload_monitor_dir)
    +
    +    local pr_ref="${ORG}/${REPO}#${PR_NUMBER}"
    +
    +    # Fetch comments once — reused by discovery, validation, and triage
    +    local comments
    +    comments=$(fetch_pr_comments "${ORG}" "${REPO}" "${PR_NUMBER}")
    +
    +    # --- Phase 1: Discovery ---
    +    local discovery_json=""
    +    discovery_json=$(run_discovery "${pr_ref}" "${pm_dir}" 2>/dev/null || true)
    +
    +    # --- Phase 2: Validate existing /payload-job comments ---
    +    local existing_cmd validation_json=""
    +    existing_cmd=$(fetch_trigger_command "${comments}" 2>/dev/null || true)
    +    if [[ -n "${existing_cmd}" && -n "${discovery_json}" ]]; then
    +        local suggestion_names
    +        suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].as_name' 2>/dev/null || true)
    +
    +        local job_name
    +        job_name=$(echo "${existing_cmd}" | sed 's|^/payload-job ||')
    +
    +        local is_valid="false"
    +        local note=""
    +        while IFS= read -r name; do
    +            if [[ -n "${name}" && "${job_name}" == *"${name}"* ]]; then
    +                is_valid="true"
    +                note="Matches discovered job ${name}"
    +                break
    +            fi
    +        done <<< "${suggestion_names}"
    +
    +        if [[ "${is_valid}" == "false" ]]; then
    +            note="Does not match any discovered job for the changed files"
    +        fi
    +
    +        validation_json=$(jq -n \
    +            --arg cmd "${existing_cmd}" \
    +            --argjson valid "${is_valid}" \
    +            --arg note "${note}" \
    +            '{existing_command: $cmd, is_valid: $valid, note: $note}')
    +    fi

    _🎯 Functional Correctness_ | _🟡 Minor_ | _⚡ Quick win_

    Substring matching for trigger-command validation risks false positives.

    suggestion_names is populated with the short as_name values, then matched against job_name via [[ "${job_name}" == "${name}" ]] (a substring test). Short/common as_name values (e.g. "aws", "images") can accidentally match unrelated periodic job names, producing an incorrect "Matches discovered job" verdict. Matching against periodic_name (the full, unique nightly job identifier) instead of as_name would be more precise.

    <details>
    <summary>🛠️ Proposed fix</summary>

    -        suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].as_name' 2>/dev/null || true)
    +        suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].periodic_name' 2>/dev/null || true)
    

    </details>

    Also, per shellcheck (SC2001), Line 167's sed invocation can be replaced with a parameter expansion:

    -        job_name=$(echo "${existing_cmd}" | sed 's|^/payload-job ||')
    +        job_name="${existing_cmd#/payload-job }"
    

    <!-- suggestion_start -->

    <details>
    <summary>📝 Committable suggestion</summary>

    ‼️ IMPORTANT

    Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        # --- Phase 2: Validate existing /payload-job comments ---
        local existing_cmd validation_json=""
        existing_cmd=$(fetch_trigger_command "${comments}" 2>/dev/null || true)
        if [[ -n "${existing_cmd}" && -n "${discovery_json}" ]]; then
            local suggestion_names
            suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].periodic_name' 2>/dev/null || true)
    
            local job_name
            job_name="${existing_cmd#/payload-job }"
    
            local is_valid="false"
            local note=""
            while IFS= read -r name; do
                if [[ -n "${name}" && "${job_name}" == *"${name}"* ]]; then
                    is_valid="true"
                    note="Matches discovered job ${name}"
                    break
                fi
            done <<< "${suggestion_names}"
    
            if [[ "${is_valid}" == "false" ]]; then
                note="Does not match any discovered job for the changed files"
            fi
    
            validation_json=$(jq -n \
                --arg cmd "${existing_cmd}" \
                --argjson valid "${is_valid}" \
                --arg note "${note}" \
                '{existing_command: $cmd, is_valid: $valid, note: $note}')
        fi
    

    </details>

    <!-- suggestion_end -->

    <details>
    <summary>🧰 Tools</summary>

    <details>
    <summary>🪛 Shellcheck (0.11.0)</summary>

    [style] 167-167: See if you can use ${variable//search/replace} instead.

    (SC2001)

    </details>

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/pr-review/scripts/pr-payload.sh` around lines 159 - 188, The
    /payload-job validation in the existing_cmd block is using short
    suggestion_names with a substring test against job_name, which can misclassify
    unrelated jobs; switch the matching logic to compare against the unique
    periodic_name values from discovery_json instead of as_name, and keep the
    validation_json note based on that exact match. Also update the job_name
    extraction in the same flow to use shell parameter expansion instead of the sed
    command for the /payload-job prefix removal.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:54012a46ac0488402c273d84 -->

    _Source: Linters/SAST tools_

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:05 UTC
    Code Review
    plugins/pr-review/skills/yolo-agent/SKILL.md:1
    @@ -228,6 +244,80 @@ skill:
     Classify each failure as **infrastructure** (recommend retrigger) or **code**
     (propose fix as trivial or non-trivial).
     
    +**Payload Track** (if `pr-payload.sh` returned exit 0 in step 2a):
    +
    +This track is **completely independent** from the CI Track. Payload jobs
    +and regular CI checks are separate systems. Report Payload Track results
    +in their own section — never merge with CI Track.
    +
    +**Do NOT check the `analyzed` list for payload URLs. Do NOT skip the
    +Payload Track. The script runs every cycle and returns fresh data.
    +Always present the results.**
    +
    +Check the `mode` field in the JSON output to determine which sub-flow
    +to follow:
    +
    +**Triage mode** (`mode: "triage"`):
    +
    +The JSON contains:
    +- `complete` — `true` when all jobs have final results, `false` when
    +  jobs are still running
    +- `jobs[]` — each with `verdict` (`pr-caused` or `flaky`), `reason`,
    +  `prow_url`, `failing_tests`
    +- `recommendation` — the action to suggest to the user
    +- `trigger_command` — the exact command for re-triggering
    +- `stale` — `true` if a new commit was pushed after the payload was
    +  triggered, `false` otherwise
    +- `stale_reason` — explanation of the staleness (timestamps)
    +- `discovery.suggestions[]` — the payload jobs the tool discovered as
    +  appropriate for this PR's **current** changed files
    +- `validation` — whether the existing `/payload-job` command matches
    +  the discovered jobs. If `is_valid: false`, warn the user.
    +
    +**Check `stale` first to decide how to present results:**
    +
    +When `stale: false` — results are current. Present the triage verdicts
    +as the Payload Track report. **Do NOT reinterpret, override, or
    +second-guess the verdicts.** The tool's diff-aware classification is
    +authoritative. When suggesting a re-trigger, post the exact
    +`trigger_command` string as a PR comment — NOT just `/payload-job` and
    +NOT `/retest`.

    _🩺 Stability & Availability_ | _🟠 Major_ | _⚡ Quick win_

    Missing "ask before posting" guard for the non-stale re-trigger path.

    The stale: false branch says: "When suggesting a re-trigger, post the exact trigger_command string as a PR comment" with no confirmation gate. Both the stale: true branches (Lines 299-301: "ask the user before posting... Never auto-post") and the discovery-mode section (Line 318: "Do NOT auto-post /payload-job... always ask first") explicitly require confirmation. This asymmetry means the most common path (current, non-stale results) is the one path missing the safety guard, directly contradicting the PR's stated design constraint of "never auto-posting /payload-job."

    <details>
    <summary>📝 Proposed fix</summary>

    -authoritative. When suggesting a re-trigger, post the exact
    -`trigger_command` string as a PR comment — NOT just `/payload-job` and
    -NOT `/retest`.
    +authoritative. When suggesting a re-trigger, present the exact
    +`trigger_command` string and ask the user before posting it as a PR
    +comment — NOT just `/payload-job` and NOT `/retest`. Never auto-post.
    

    </details>

    <!-- suggestion_start -->

    <details>
    <summary>📝 Committable suggestion</summary>

    ‼️ IMPORTANT

    Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    **Check `stale` first to decide how to present results:**
    
    When `stale: false` — results are current. Present the triage verdicts
    as the Payload Track report. **Do NOT reinterpret, override, or
    second-guess the verdicts.** The tool's diff-aware classification is
    authoritative. When suggesting a re-trigger, present the exact
    `trigger_command` string and ask the user before posting it as a PR
    comment — NOT just `/payload-job` and NOT `/retest`. Never auto-post.
    

    </details>

    <!-- suggestion_end -->

    <details>
    <summary>🧰 Tools</summary>

    <details>
    <summary>🪛 SkillSpector (2.3.7)</summary>

    [warning] 210: [EA2] Autonomous Decision Making: Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

    Remediation: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.

    (Excessive Agency (EA2))

    </details>

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 277 - 284, The
    non-stale re-trigger path in SKILL.md is missing the “ask before posting”
    confirmation guard, so update the guidance around the stale:false handling to
    match the safer behavior used elsewhere. In the section that references checking
    stale first and posting the exact trigger_command, explicitly require asking the
    user before posting any PR comment and forbid auto-posting, consistent with the
    stale:true and discovery-mode instructions. Keep the wording aligned with the
    existing triage/report flow so the authoritative verdict handling in the
    stale:false branch is unchanged.
    

    </details>

    <!-- fingerprinting:phantom:poseidon:beignet -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:ca9cc90fed28f61f8416db37 -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    ✅ Addressed in commit 035063d

    coderabbitai[bot] coderabbitai[bot] requested changes on Jul 03, 2026 13:05 UTC
    Changes Requested Reviewer

    Actionable comments posted: 10

    [!CAUTION]

    Some comments are outside the diff and can’t be posted inline due to platform limitations.

    >

    > <details>

    <summary>⚠️ Outside diff range comments (1)</summary><blockquote>

    > <details>

    <summary>plugins/pr-review/skills/yolo-agent/SKILL.md (1)</summary><blockquote>

    > 138-152: _🎯 Functional Correctness_ | _🟠 Major_ | _🏗️ Heavy lift_

    > "PR is ready" never becomes reachable for payload-matching PRs

    pr-payload.sh keeps returning discovery for PRs whose changed files match a payload job, or triage once a payload URL exists. Because step 2b only completes when payload mode is "none", payload-relevant PRs stay in the 2c loop and never hit the complete state. If that’s intentional, document the manual exit path; otherwise add a completion branch for payload flows.

    > <details>

    <summary>🤖 Prompt for AI Agents</summary>

    >
    > Verify each finding against current code. Fix only still-valid issues, skip the
    > rest with a brief reason, keep changes minimal, and validate.
    > 
    > In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 138 - 152, The
    > completion path in the yolo-agent flow is unreachable for payload-matching PRs
    > because step 2b only allows `"PR is ready"` when payload mode from step 2a is
    > `"none"`. Update the decision logic around the 2b/2c branches so
    > payload-relevant PRs can still reach `complete` when CI is green and there are
    > no new or resurfaced comments, or explicitly document the intended manual exit
    > path. Use the existing step labels and the `pr-payload.sh` payload mode handling
    > to locate the branching logic.
    > 

    > </details>

    > <!-- cr-comment:v1:2e9ba212737b2b70f481a301 -->

    > </blockquote></details>

    > </blockquote></details>

    <details>
    <summary>🧹 Nitpick comments (5)</summary><blockquote>

    <details>
    <summary>payload-monitor/payload_monitor/models.py (1)</summary><blockquote>

    286-289: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_

    Consider Literal typing for verdict field.

    The comment documents allowed values ("pr-caused" | "flaky" | "unknown") but the field is a plain str. Using Literal["pr-caused", "flaky", "unknown"] would let static analysis (mypy/pyright) catch typos at the source instead of relying on the comment.

    <details>
    <summary>♻️ Proposed refactor</summary>

    +from typing import Literal
    +
     `@dataclass`
     class FailureVerdict:
    -    verdict: str          # "pr-caused" | "flaky" | "unknown"
    +    verdict: Literal["pr-caused", "flaky", "unknown"]
         reason: str
         matched_files: list[str] = field(default_factory=list)
    

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/models.py` around lines 286 - 289, Update the
    FailureVerdict model so verdict uses a Literal type instead of a plain str,
    matching the documented allowed values pr-caused, flaky, and unknown. Adjust the
    FailureVerdict class definition in models.py to import and apply Literal to the
    verdict field while keeping reason and matched_files unchanged, so static type
    checkers can catch invalid verdict values.
    

    </details>

    <!-- cr-comment:v1:90aca3799e7bb86208cbb8f4 -->

    </blockquote></details>
    <details>
    <summary>payload-monitor/payload_monitor/collectors/payload_job_discovery.py (1)</summary><blockquote>

    80-92: _🎯 Functional Correctness_ | _🔵 Trivial_ | _⚡ Quick win_

    Silent fallback to "main" on gh failure hides real errors.

    If gh pr view fails (non-zero exit, auth error, network issue) or returns empty output, the function silently returns "main" with no log line. This can silently mis-detect the branch/version downstream, producing a confusing "No CI config found" error rather than surfacing the actual gh failure.

    <details>
    <summary>♻️ Proposed fix</summary>

         try:
             result = subprocess.run(
                 ["gh", "pr", "view", number, "--repo", f"{org}/{repo}",
                  "--json", "baseRefName", "--jq", ".baseRefName"],
                 capture_output=True, text=True, timeout=15,
             )
             if result.returncode == 0 and result.stdout.strip():
                 return result.stdout.strip()
    +        logger.warning(f"gh pr view failed for {org}/{repo}#{number}: {result.stderr.strip()}")
         except (subprocess.TimeoutExpired, FileNotFoundError):
    -        pass
    +        logger.warning(f"gh pr view timed out or gh not found for {org}/{repo}#{number}")
         return "main"
    

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/collectors/payload_job_discovery.py` around
    lines 80 - 92, The _get_pr_branch helper is silently falling back to "main" when
    gh pr view fails or returns empty output, which hides the real problem. Update
    _get_pr_branch in payload_job_discovery.py to log the gh failure details
    (non-zero exit, stderr, timeout, or missing output) before returning the
    default, and make sure the fallback is only used after recording enough context
    to diagnose the branch lookup issue.
    

    </details>

    <!-- cr-comment:v1:7fcf12bd5f2fa34e540d74cc -->

    </blockquote></details>
    <details>
    <summary>payload-monitor/payload_monitor/collectors/pr_payload.py (2)</summary><blockquote>

    94-136: _🔒 Security & Privacy_ | _🔵 Trivial_ | _⚡ Quick win_

    Parsing untrusted junit XML with xml.etree.ElementTree instead of defusedxml.

    _fetch_deep_junit_failures parses XML fetched from CI artifacts (produced by test code that may include PR-authored content) with the standard library ET.fromstring, which is susceptible to entity-expansion DoS. Prefer defusedxml.ElementTree.fromstring as a drop-in, safer replacement.

    <details>
    <summary>🛡️ Proposed fix</summary>

    -import xml.etree.ElementTree as ET
    +import defusedxml.ElementTree as ET
    

    </details>

    Please confirm defusedxml is an acceptable/available dependency for this package before adopting it.

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py` around lines 94 -
    136, The XML parsing in _fetch_deep_junit_failures currently uses
    xml.etree.ElementTree.fromstring on CI-provided junit artifacts, which should be
    switched to the safer defusedxml.ElementTree equivalent. Update the imports and
    parsing call in _fetch_deep_junit_failures to use defusedxml as a drop-in
    replacement, and first verify that defusedxml is already available for
    payload_monitor before making the change.
    

    </details>

    <!-- cr-comment:v1:3109084a9d821bf11cead3fc -->

    _Source: Linters/SAST tools_

    ---

    204-211: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_

    pr_payload._parse_pr_ref shadows payload_job_discovery._parse_pr_ref with a different return shape.

    Two different modules export a same-named _parse_pr_ref (one returns (org, repo, number), this one returns (repo, number)). The alias _parse_pr_ref_3 on import (line 21) already signals this friction. Renaming this wrapper (e.g. _parse_repo_and_number) would remove the ambiguity for future readers/importers.

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py` around lines 204 -
    211, The local pr_payload._parse_pr_ref wrapper is confusing because it shadows
    payload_job_discovery._parse_pr_ref while returning a different shape. Rename
    this wrapper to something explicit like _parse_repo_and_number, update any
    internal callers in pr_payload.py, and keep using _parse_pr_ref_3 only as the
    underlying parser so the repo/number return shape is obvious and the name
    collision is removed.
    

    </details>

    <!-- cr-comment:v1:d3324ab4cf81458ec2bb9b33 -->

    </blockquote></details>
    <details>
    <summary>plugins/pr-review/scripts/pr-payload.sh (1)</summary><blockquote>

    66-71: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_

    Simplify per shellcheck (SC2005).

    echo "$(cd "${candidate}" && pwd)" is an unnecessary echo-of-command-substitution.

    <details>
    <summary>♻️ Proposed fix</summary>

    -        if [[ -d "${candidate}" ]]; then
    -            echo "$(cd "${candidate}" && pwd)"
    -            return
    -        fi
    +        if [[ -d "${candidate}" ]]; then
    +            (cd "${candidate}" && pwd)
    +            return
    +        fi
    

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/pr-review/scripts/pr-payload.sh` around lines 66 - 71, The candidate
    path resolution in the shell loop uses an unnecessary echo around command
    substitution, triggering SC2005. Update the logic in the candidate search block
    to print the resolved directory directly from the subshell output instead of
    wrapping it in echo, while keeping the existing behavior in the candidate
    iteration and directory check intact.
    

    </details>

    <!-- cr-comment:v1:773edc38d8d371c42db2bc5b -->

    _Source: Linters/SAST tools_

    </blockquote></details>

    </blockquote></details>

    <details>
    <summary>🤖 Prompt for all review comments with AI agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    Inline comments:
    In `@payload-monitor/payload_monitor/__main__.py`:
    - Around line 111-141: The discover path in __main__.py does not treat
    discover_payload_jobs business failures as process failures, so errors inside
    DiscoveryResult are printed and the command exits 0. Update the discover branch
    around discover_payload_jobs/format_discovery_json/format_discovery_markdown to
    detect when the returned result has .error set, log or print that error, and
    exit non-zero instead of continuing normally. Preserve the existing success path
    when no error is present.
    - Around line 143-175: The PR payload triage path in __main__.py lets
    fetch_pr_payload_run() exceptions escape and show a traceback. Wrap the
    fetch_pr_payload_run(pr_payload_url) call in a targeted try/except, log a clear
    CLI error for 4xx/5xx or stale/expired payload URLs, and exit cleanly with
    SystemExit(1) before continuing to fetch_pr_changed_files, fetch_pr_diff, or
    build_triage_result.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py`:
    - Line 76: The list comprehension in the PR payload collector uses an ambiguous
    single-letter variable name, which triggers the ruff E741 rule. Update the
    comprehension in the code that processes result.stdout in the PR payload
    collector to use a descriptive name instead of l, keeping the same stripping and
    filtering behavior. Reference the relevant result.stdout parsing logic so the
    variable rename is applied consistently.
    - Around line 160-182: The PR payload fetch flow in fetch_pr_payload_run
    currently lets resp.raise_for_status() abort on expired or stale pages, so
    handle requests.RequestException around the initial
    _session.get/raise_for_status path and return an empty list instead of crashing.
    Keep the fallback behavior aligned with the existing logging in
    fetch_pr_payload_run and the caller in __main__.py so --pr-payload-url fails
    cleanly when the payload page is no longer valid.
    
    In `@plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md`:
    - Around line 51-59: The Follow-up Actions guidance in SKILL.md should
    explicitly require user confirmation before any `/payload-job` re-post, since
    the current wording only says to suggest re-posting the original comment
    verbatim. Update the instructions around the “All FLAKY” path and the
    `/payload-job` note to say the agent must ask the user before posting and must
    not auto-post or assume permission. Reference the “Follow-up Actions” section
    and the `/payload-job` re-trigger note so the confirmation requirement is
    unambiguous.
    - Around line 1-6: The SKILL.md frontmatter for edge-ocp-ci:pr-payload-triage is
    missing the required allowed-tools entry for a user-invocable skill that runs a
    Bash command. Update the frontmatter near the name/description/user-invocable
    fields to include a minimal allowed-tools list that explicitly declares Bash,
    and keep it aligned with the skill’s shell-based payload_monitor invocation.
    - Around line 21-42: The SKILL.md Execution/Output guidance only describes the
    happy path and is missing failure-mode handling. Update the sections around the
    payload-monitor flow to document what to do when the pr-payload-tests page is
    expired/unavailable, when payload-monitor or its fetch/classification steps
    error out, and when gh/gsutil authentication or access checks fail. Add explicit
    guard/check instructions between the fetch, GCS lookup, junit download, GitHub
    diff fetch, and report steps, and reference the payload-monitor CLI flow and
    markdown triage report output so the edge-case handling is easy to find.
    - Around line 44-49: The rendered markdown table in the Interpreting Results
    section uses emoji icons, which violates the no-emoji rule for regular markdown
    content. Update the verdict examples in SKILL.md so the table entries referenced
    by the interpreting-results guidance use non-emoji text labels or symbols that
    comply with the markdown style rules, and keep the table professional and terse.
    
    In `@plugins/pr-review/scripts/pr-payload.sh`:
    - Around line 159-188: The /payload-job validation in the existing_cmd block is
    using short suggestion_names with a substring test against job_name, which can
    misclassify unrelated jobs; switch the matching logic to compare against the
    unique periodic_name values from discovery_json instead of as_name, and keep the
    validation_json note based on that exact match. Also update the job_name
    extraction in the same flow to use shell parameter expansion instead of the sed
    command for the /payload-job prefix removal.
    
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md`:
    - Around line 277-284: The non-stale re-trigger path in SKILL.md is missing the
    “ask before posting” confirmation guard, so update the guidance around the
    stale:false handling to match the safer behavior used elsewhere. In the section
    that references checking stale first and posting the exact trigger_command,
    explicitly require asking the user before posting any PR comment and forbid
    auto-posting, consistent with the stale:true and discovery-mode instructions.
    Keep the wording aligned with the existing triage/report flow so the
    authoritative verdict handling in the stale:false branch is unchanged.
    
    ---
    
    Outside diff comments:
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md`:
    - Around line 138-152: The completion path in the yolo-agent flow is unreachable
    for payload-matching PRs because step 2b only allows `"PR is ready"` when
    payload mode from step 2a is `"none"`. Update the decision logic around the
    2b/2c branches so payload-relevant PRs can still reach `complete` when CI is
    green and there are no new or resurfaced comments, or explicitly document the
    intended manual exit path. Use the existing step labels and the `pr-payload.sh`
    payload mode handling to locate the branching logic.
    
    ---
    
    Nitpick comments:
    In `@payload-monitor/payload_monitor/collectors/payload_job_discovery.py`:
    - Around line 80-92: The _get_pr_branch helper is silently falling back to
    "main" when gh pr view fails or returns empty output, which hides the real
    problem. Update _get_pr_branch in payload_job_discovery.py to log the gh failure
    details (non-zero exit, stderr, timeout, or missing output) before returning the
    default, and make sure the fallback is only used after recording enough context
    to diagnose the branch lookup issue.
    
    In `@payload-monitor/payload_monitor/collectors/pr_payload.py`:
    - Around line 94-136: The XML parsing in _fetch_deep_junit_failures currently
    uses xml.etree.ElementTree.fromstring on CI-provided junit artifacts, which
    should be switched to the safer defusedxml.ElementTree equivalent. Update the
    imports and parsing call in _fetch_deep_junit_failures to use defusedxml as a
    drop-in replacement, and first verify that defusedxml is already available for
    payload_monitor before making the change.
    - Around line 204-211: The local pr_payload._parse_pr_ref wrapper is confusing
    because it shadows payload_job_discovery._parse_pr_ref while returning a
    different shape. Rename this wrapper to something explicit like
    _parse_repo_and_number, update any internal callers in pr_payload.py, and keep
    using _parse_pr_ref_3 only as the underlying parser so the repo/number return
    shape is obvious and the name collision is removed.
    
    In `@payload-monitor/payload_monitor/models.py`:
    - Around line 286-289: Update the FailureVerdict model so verdict uses a Literal
    type instead of a plain str, matching the documented allowed values pr-caused,
    flaky, and unknown. Adjust the FailureVerdict class definition in models.py to
    import and apply Literal to the verdict field while keeping reason and
    matched_files unchanged, so static type checkers can catch invalid verdict
    values.
    
    In `@plugins/pr-review/scripts/pr-payload.sh`:
    - Around line 66-71: The candidate path resolution in the shell loop uses an
    unnecessary echo around command substitution, triggering SC2005. Update the
    logic in the candidate search block to print the resolved directory directly
    from the subshell output instead of wrapping it in echo, while keeping the
    existing behavior in the candidate iteration and directory check intact.
    

    </details>

    <details>
    <summary>🪄 Autofix (Beta)</summary>

    Fix all unresolved CodeRabbit comments on this PR:

  • <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)

  • <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes
  • </details>

    ---

    <details>
    <summary>ℹ️ Review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: Repository YAML (base), Central YAML (inherited)

    Review profile: CHILL

    Plan: Enterprise

    Run ID: dced00b1-459f-4b32-954f-5360773cd83d

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between 54f8bc85706924512022838b6eea0148b42a6928 and 0e76f3fed727429d78e31c1c2c4391ecaec808ab.

    </details>

    <details>
    <summary>📒 Files selected for processing (9)</summary>

    payload-monitor/payload_monitor/__main__.py
    payload-monitor/payload_monitor/collectors/payload_job_discovery.py
    payload-monitor/payload_monitor/collectors/pr_payload.py
    payload-monitor/payload_monitor/models.py
    payload-monitor/tests/test_collectors_payload_job_discovery.py
    payload-monitor/tests/test_collectors_pr_payload.py
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md
    plugins/pr-review/scripts/pr-payload.sh

  • plugins/pr-review/skills/yolo-agent/SKILL.md
  • </details>

    </details>

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:26 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]

    Renamed ambiguous variable l to line in _list_gcs_dir to fix ruff E741 violation (also simplified unnecessary echo "$(cd ...)" to (cd ...) in pr-payload.sh to fix SC2005).

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:26 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |

    Not addressing: the emoji icons (🔴/🟡) in the verdict table are intentional status indicators for visual scanning — not prose filler. The no-emoji rule targets decorative emoji in prose; structured pass/fail status data is exempt.

    This message is AI generated by the yolo-agent of edge-tooling.

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:26 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]

    @lucaconsalvi Thanks for the fix! Confirmed the rename resolves the ruff E741 violation, and appreciate the extra SC2005 cleanup in pr-payload.sh as well.

    <!-- <review_comment_addressed> -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:26 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |

    @lucaconsalvi, understood — noted that structured status/verdict tables (e.g., pass/fail icons for visual scanning) are treated as an exception to the no-emoji rule, distinct from decorative emoji in prose. I'll withdraw this comment.

    <!-- <review_comment_withdrawn> -->

    ---

    <details>
    <summary>✏️ Learnings added</summary>

    Learnt from: lucaconsalvi
    Repo: openshift-eng/edge-tooling PR: 213
    File: plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:44-49
    Timestamp: 2026-07-03T13:26:47.505Z
    Learning: In the openshift-eng/edge-tooling repository, the "no emojis" rule for Markdown prose does not apply to emoji icons used as structured status/verdict indicators in tables (e.g., 🔴/🟡 for PR-CAUSED/FLAKY classifications) intended for visual scanning. This is distinct from the existing exception for emojis inside fenced code blocks. Do not flag emoji usage in such structured status tables as a no-emoji rule violation.
    

    Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

    </details>

    ---

    <details>
    <summary>🧠 Learnings used</summary>

    Learnt from: ggiguash
    Repo: openshift-eng/edge-tooling PR: 192
    File: plugins/microshift-ci/skills/doctor/SKILL.md:88-116
    Timestamp: 2026-06-13T07:44:05.330Z
    Learning: For any Claude/agent workflow skill documentation file named SKILL.md, co-locate failure policies and edge-case rules inline with the specific step that needs them (place them immediately before/after the relevant tool invocation within that step). Do not move these rules to a separate top-level “Edge Cases” (or similar) section, because the LLM reads the step linearly and won’t reliably re-consult reference sections mid-execution—this creates two sources of truth and can increase token usage without improving compliance. Use a “CRITICAL” block for hard stops and “Error Handling” bullets for partial failures, placed directly in the step context.
    

    ---

    Learnt from: dhensel-rh
    Repo: openshift-eng/edge-tooling PR: 178
    File: plugins/two-node/evals/cluster-diagnostic.md:83-83
    Timestamp: 2026-06-16T13:37:50.326Z
    Learning: In the openshift-eng/edge-tooling repository, the term should be written as the two separate words "bare metal" (not "bare-metal") throughout all Markdown documentation. During code review, do not flag or propose changes treating "bare metal" as a compound-adjective hyphenation issue.
    

    ---

    Learnt from: agullon
    Repo: openshift-eng/edge-tooling PR: 201
    File: plugins/microshift-release/skills/advisory-promotion/SKILL.md:123-163
    Timestamp: 2026-06-24T07:30:54.767Z
    Learning: When reviewing Markdown in this repo, enforce the “no emojis” rule for prose text, but do NOT flag emoji characters that appear inside fenced code blocks (i.e., text between 
    ... `), where they’re intentionally included as example output/terminal/script results (for example, status emoji constants/dictionaries like _STATUS_EMOJI).
    ```

    </details>

    <!-- This is an auto-generated reply by CodeRabbit -->

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return

    Added if result.error: raise SystemExit(1) after printing the discovery result, so downstream callers (e.g. pr-payload.sh) receive a non-zero exit when discover_payload_jobs returns a business error.

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return
    +
    +    # --- PR payload triage mode ---
    +    if pr_payload_url:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --pr-payload-url")
    +            raise SystemExit(1)
    +
    +        from .collectors.pr_payload import (
    +            build_triage_result,
    +            classify_failures,
    +            fetch_pr_changed_files,
    +            fetch_pr_diff,
    +            fetch_pr_payload_run,
    +            format_triage_json,
    +            format_triage_markdown,
    +        )
    +
    +        jobs = fetch_pr_payload_run(pr_payload_url)
    +        if not jobs:
    +            logger.error("No jobs found at the provided URL")
    +            raise SystemExit(1)
    +
    +        pr_files = fetch_pr_changed_files(pr_ref)
    +        diff_content = fetch_pr_diff(pr_ref)
    +        verdicts = classify_failures(jobs, pr_files, diff_content)
    +        result = build_triage_result(pr_payload_url, pr_ref, jobs)
    +        result.verdicts = verdicts
    +
    +        if output_format == "json":
    +            print(format_triage_json(result))
    +        else:
    +            print(format_triage_markdown(result))
    +        return
    +

    Wrapped fetch_pr_payload_run() in try/except requests.RequestException in __main__.py. A stale or expired URL now produces a clean CLI error via click.echo and exits 1 instead of surfacing a traceback.

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]
    +        return []
    +    except (subprocess.TimeoutExpired, FileNotFoundError):
    +        return []
    +
    +
    +def _find_e2e_step_name(gcs_base: str) -> Optional[str]:
    +    """Discover the e2e test step directory name from the artifacts."""
    +    artifacts_path = f"{gcs_base}/artifacts/"
    +    dirs = _list_gcs_dir(artifacts_path)
    +    for d in dirs:
    +        # The top-level step directory (e.g. e2e-metal-ovn-two-node-fencing-recovery/)
    +        if d.endswith("/") and "gather" not in d and "release" not in d and "build" not in d:
    +            step_name = d.rstrip("/").rsplit("/", 1)[-1]
    +            return step_name
    +    return None
    +
    +
    +def _fetch_deep_junit_failures(prow_url: str) -> list[FailingTest]:
    +    """Fetch individual test-level failures from the deep junit artifacts.
    +
    +    Looks for junit_e2e__*.xml inside the e2e test step's artifacts/junit/ directory.
    +    These contain the actual Go test names (g.It descriptions), not just step-level results.
    +    """
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return []
    +
    +    step_name = _find_e2e_step_name(gcs_base)
    +    if not step_name:
    +        return []
    +
    +    junit_dir = f"{gcs_base}/artifacts/{step_name}/baremetalds-e2e-test/artifacts/junit/"
    +    files = _list_gcs_dir(junit_dir)
    +
    +    junit_files = [f for f in files if f.endswith(".xml") and "junit_e2e" in f]
    +    if not junit_files:
    +        # Fall back to any junit XML
    +        junit_files = [f for f in files if f.endswith(".xml")]
    +
    +    tests: list[FailingTest] = []
    +    for jf in junit_files:
    +        content = _fetch_gcs_file(jf)
    +        if not content:
    +            continue
    +        try:
    +            root = ET.fromstring(content)
    +            for tc in root.iter("testcase"):
    +                failure = tc.find("failure")
    +                if failure is not None:
    +                    name = tc.get("name", "")
    +                    error_msg = failure.get("message", "") or (failure.text or "")
    +                    error_msg = error_msg.replace("&#xA;", "\n").replace("&#34;", '"')
    +                    duration = float(tc.get("time", "0") or "0")
    +                    tests.append(FailingTest(
    +                        name=name, error_message=error_msg[:500], duration_seconds=duration,
    +                    ))
    +        except ET.ParseError as e:
    +            logger.debug(f"Failed to parse {jf}: {e}")
    +
    +    return tests
    +
    +
    +def _fetch_single_job(prow_url: str) -> PRPayloadJob:
    +    name = _job_name_from_url(prow_url)
    +    result = _fetch_job_result(prow_url)
    +    job = PRPayloadJob(name=name, prow_url=prow_url, result=result)
    +
    +    if result == JobResult.FAILURE:
    +        # Fetch deep junit for individual test names
    +        deep_tests = _fetch_deep_junit_failures(prow_url)
    +        if deep_tests:
    +            job.failing_tests = deep_tests
    +            job.error_summary = "; ".join(t.name[:80] for t in deep_tests[:3])
    +        else:
    +            # Fall back to step-level junit
    +            from .prow import _fetch_junit_failures
    +            tests, summary = _fetch_junit_failures(prow_url)
    +            job.failing_tests = tests
    +            job.error_summary = summary
    +
    +    return job
    +
    +
    +def fetch_pr_payload_run(url: str, max_workers: int = 4) -> list[PRPayloadJob]:
    +    """Fetch a pr-payload-tests run URL and return all jobs with results."""
    +    logger.info(f"Fetching PR payload run: {url}")
    +    resp = _session.get(url)
    +    resp.raise_for_status()
    +
    +    prow_urls = _parse_prow_urls(resp.text)
    +    if not prow_urls:
    +        logger.warning("No Prow job links found on the page")
    +        return []
    +
    +    logger.info(f"Found {len(prow_urls)} job(s), fetching results...")
    +    jobs: list[PRPayloadJob] = []
    +    with ThreadPoolExecutor(max_workers=max_workers) as pool:
    +        futures = {pool.submit(_fetch_single_job, u): u for u in prow_urls}
    +        for future in as_completed(futures):
    +            try:
    +                jobs.append(future.result())
    +            except Exception as e:
    +                logger.error(f"Failed to fetch job {futures[future]}: {e}")
    +
    +    jobs.sort(key=lambda j: j.name)
    +    return jobs

    Wrapped resp.raise_for_status() in try/except requests.RequestException inside fetch_pr_payload_run(). An expired or 4xx/5xx payload URL now logs a warning and returns [] instead of raising.

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---

    Added allowed-tools: [Bash] to the frontmatter in SKILL.md.

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.

    Added an Error Handling section documenting: expired/unavailable payload pages, no-jobs-found, gh auth failure, gsutil auth failure, and generic tool errors. Also added guard-check guidance between the fetch, GCS lookup, and classification phases.

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |
    +
    +### Follow-up Actions
    +
    +Based on the results, suggest:
    +
    +- **All FLAKY**: "All failures are unrelated to your PR. Safe to re-trigger." Then find the original `/payload-job` trigger comment on the PR and suggest re-posting it verbatim.
    +- **Some PR CAUSED**: "Job X failed in a test your PR modified. Check the error and Prow link before re-triggering."
    +- **All PR CAUSED**: "All failures are in tests your PR touches. Investigate before re-triggering."
    +
    +> **Note:** To re-trigger, copy the original `/payload-job <periodic-job-name>` comment from the PR — not just `/payload-job` alone, and never `/retest` (which only re-runs regular CI checks).

    Updated the All FLAKY follow-up to explicitly require user confirmation before posting the re-trigger comment (ask the user to confirm before posting it as a PR comment; never auto-post).

    This message is AI generated by the yolo-agent of edge-tooling.

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    plugins/pr-review/scripts/pr-payload.sh:1
    @@ -0,0 +1,262 @@
    +#!/usr/bin/bash
    +set -euo pipefail
    +
    +# Detect PR payload test runs, discover appropriate payload jobs, and triage
    +# failures via payload-monitor.
    +#
    +# Three-phase flow:
    +#   Phase 1: Discovery — find which payload jobs match the PR's changed files
    +#   Phase 2: Validation — check if existing /payload-job comments match discovery
    +#   Phase 3: Triage — analyze payload test results if a run exists
    +#
    +# Exit codes: 0=results found (triage or discovery), 1=no matches, 3=error
    +
    +URL_PATTERN='^https://github\.com/[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+/pull/[0-9]+$'
    +PAYLOAD_URL_PATTERN='https://pr-payload-tests\.ci\.openshift\.org/runs/ci/[^ )"'"'"']*'
    +
    +die() {
    +    echo "Error: $1" >&2
    +    exit 3
    +}
    +
    +check_dependencies() {
    +    command -v gh >/dev/null 2>&1 || die "gh CLI is not installed"
    +    command -v jq >/dev/null 2>&1 || die "jq is not installed"
    +    command -v python3 >/dev/null 2>&1 || die "python3 is not installed"
    +    command -v gsutil >/dev/null 2>&1 || die "gsutil is not installed"
    +    gh auth status >/dev/null 2>&1 || die "gh CLI is not authenticated — run 'gh auth login'"
    +}
    +
    +validate_url() {
    +    local url="$1"
    +    if [[ ! "${url}" =~ ${URL_PATTERN} ]]; then
    +        die "Invalid PR URL: ${url}"
    +    fi
    +}
    +
    +parse_url() {
    +    local url="$1"
    +    ORG=$(echo "${url}" | cut -d'/' -f4)
    +    REPO=$(echo "${url}" | cut -d'/' -f5)
    +    PR_NUMBER=$(echo "${url}" | cut -d'/' -f7)
    +}
    +
    +find_payload_monitor_dir() {
    +    if [[ -n "${PAYLOAD_MONITOR_DIR:-}" ]]; then
    +        if [[ -d "${PAYLOAD_MONITOR_DIR}" ]]; then
    +            echo "${PAYLOAD_MONITOR_DIR}"
    +            return
    +        fi
    +        die "PAYLOAD_MONITOR_DIR set but does not exist: ${PAYLOAD_MONITOR_DIR}"
    +    fi
    +
    +    local script_dir
    +    script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    +
    +    local candidates=(
    +        "${script_dir}/../../../payload-monitor"
    +        "${PWD}/repos/edge-tooling/payload-monitor"
    +    )
    +
    +    local base_dirs=("${HOME}/Documents/Projects" "${HOME}/Projects" "${HOME}/src")
    +    for base in "${base_dirs[@]}"; do
    +        candidates+=("${base}/edge-tooling/payload-monitor")
    +    done
    +
    +    for candidate in "${candidates[@]}"; do
    +        if [[ -d "${candidate}" ]]; then
    +            echo "$(cd "${candidate}" && pwd)"
    +            return
    +        fi
    +    done
    +
    +    die "Cannot find payload-monitor directory. Set PAYLOAD_MONITOR_DIR or run from edge-tooling repo."
    +}
    +
    +fetch_pr_comments() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh api "repos/${org}/${repo}/issues/${pr_number}/comments" \
    +        --paginate 2>/dev/null \
    +        || die "Failed to fetch PR comments for ${org}/${repo}#${pr_number}"
    +}
    +
    +fetch_latest_payload_url() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE "${PAYLOAD_URL_PATTERN}" | tail -1
    +}
    +
    +fetch_trigger_command() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE '^/payload-job .+' | tail -1
    +}
    +
    +fetch_payload_comment_timestamp() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '
    +        [.[] | select(.body | test("^/payload-job "))] | last | .created_at // empty
    +    ' 2>/dev/null
    +}
    +
    +fetch_latest_commit_timestamp() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh pr view "${pr_number}" --repo "${org}/${repo}" \
    +        --json commits --jq '.commits[-1].committedDate' 2>/dev/null
    +}
    +
    +run_discovery() {
    +    local pr_ref="$1" pm_dir="$2"
    +
    +    local discovery_output
    +    discovery_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --discover --pr "${pr_ref}" --format json 2>/dev/null) || return 1
    +
    +    echo "${discovery_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${discovery_output}"
    +}
    +
    +run_triage() {
    +    local payload_url="$1" pr_ref="$2" pm_dir="$3"
    +
    +    local triage_output
    +    triage_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --pr-payload-url "${payload_url}" \
    +        --pr "${pr_ref}" \
    +        --format json 2>/dev/null) || return 1
    +
    +    echo "${triage_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${triage_output}"
    +}
    +
    +main() {
    +    [[ $# -lt 1 ]] && die "Usage: $(basename "$0") <github-pr-url>"
    +
    +    local pr_url="$1"
    +
    +    check_dependencies
    +    validate_url "${pr_url}"
    +    parse_url "${pr_url}"
    +
    +    local pm_dir
    +    pm_dir=$(find_payload_monitor_dir)
    +
    +    local pr_ref="${ORG}/${REPO}#${PR_NUMBER}"
    +
    +    # Fetch comments once — reused by discovery, validation, and triage
    +    local comments
    +    comments=$(fetch_pr_comments "${ORG}" "${REPO}" "${PR_NUMBER}")
    +
    +    # --- Phase 1: Discovery ---
    +    local discovery_json=""
    +    discovery_json=$(run_discovery "${pr_ref}" "${pm_dir}" 2>/dev/null || true)
    +
    +    # --- Phase 2: Validate existing /payload-job comments ---
    +    local existing_cmd validation_json=""
    +    existing_cmd=$(fetch_trigger_command "${comments}" 2>/dev/null || true)
    +    if [[ -n "${existing_cmd}" && -n "${discovery_json}" ]]; then
    +        local suggestion_names
    +        suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].as_name' 2>/dev/null || true)
    +
    +        local job_name
    +        job_name=$(echo "${existing_cmd}" | sed 's|^/payload-job ||')
    +
    +        local is_valid="false"
    +        local note=""
    +        while IFS= read -r name; do
    +            if [[ -n "${name}" && "${job_name}" == *"${name}"* ]]; then
    +                is_valid="true"
    +                note="Matches discovered job ${name}"
    +                break
    +            fi
    +        done <<< "${suggestion_names}"
    +
    +        if [[ "${is_valid}" == "false" ]]; then
    +            note="Does not match any discovered job for the changed files"
    +        fi
    +
    +        validation_json=$(jq -n \
    +            --arg cmd "${existing_cmd}" \
    +            --argjson valid "${is_valid}" \
    +            --arg note "${note}" \
    +            '{existing_command: $cmd, is_valid: $valid, note: $note}')
    +    fi

    Switched jq -r '.suggestions[].as_name' to jq -r '.suggestions[].periodic_name' for trigger-command validation. The full periodic job name is unique and avoids false positives from short as_name substrings.

    This message is AI generated by the yolo-agent of edge-tooling.

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return

    @lucaconsalvi Thanks for confirming — that matches the proposed fix exactly. This ensures pr-payload.sh and other callers will correctly see a non-zero exit when discovery encounters a business error.

    <!-- <review_comment_addressed> -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    lucaconsalvi lucaconsalvi commented on code on Jul 03, 2026 13:50 UTC
    Code Review
    plugins/pr-review/skills/yolo-agent/SKILL.md:1
    @@ -228,6 +244,80 @@ skill:
     Classify each failure as **infrastructure** (recommend retrigger) or **code**
     (propose fix as trivial or non-trivial).
     
    +**Payload Track** (if `pr-payload.sh` returned exit 0 in step 2a):
    +
    +This track is **completely independent** from the CI Track. Payload jobs
    +and regular CI checks are separate systems. Report Payload Track results
    +in their own section — never merge with CI Track.
    +
    +**Do NOT check the `analyzed` list for payload URLs. Do NOT skip the
    +Payload Track. The script runs every cycle and returns fresh data.
    +Always present the results.**
    +
    +Check the `mode` field in the JSON output to determine which sub-flow
    +to follow:
    +
    +**Triage mode** (`mode: "triage"`):
    +
    +The JSON contains:
    +- `complete` — `true` when all jobs have final results, `false` when
    +  jobs are still running
    +- `jobs[]` — each with `verdict` (`pr-caused` or `flaky`), `reason`,
    +  `prow_url`, `failing_tests`
    +- `recommendation` — the action to suggest to the user
    +- `trigger_command` — the exact command for re-triggering
    +- `stale` — `true` if a new commit was pushed after the payload was
    +  triggered, `false` otherwise
    +- `stale_reason` — explanation of the staleness (timestamps)
    +- `discovery.suggestions[]` — the payload jobs the tool discovered as
    +  appropriate for this PR's **current** changed files
    +- `validation` — whether the existing `/payload-job` command matches
    +  the discovered jobs. If `is_valid: false`, warn the user.
    +
    +**Check `stale` first to decide how to present results:**
    +
    +When `stale: false` — results are current. Present the triage verdicts
    +as the Payload Track report. **Do NOT reinterpret, override, or
    +second-guess the verdicts.** The tool's diff-aware classification is
    +authoritative. When suggesting a re-trigger, post the exact
    +`trigger_command` string as a PR comment — NOT just `/payload-job` and
    +NOT `/retest`.

    Added the "ask the user to confirm before posting" guard to the stale: false re-trigger path, matching the behavior of the stale: true and discovery-mode branches. "Never auto-post" is now explicit for all three paths.

    This message is AI generated by the yolo-agent of edge-tooling.

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.
    +
    +### Interpreting Results
    +
    +| Verdict | Icon | Meaning |
    +|---------|------|---------|
    +| PR CAUSED | 🔴 | The failing test was modified by the PR — investigate |
    +| FLAKY | 🟡 | The failure is in a test the PR did not touch — safe to `/retest` |
    +
    +### Follow-up Actions
    +
    +Based on the results, suggest:
    +
    +- **All FLAKY**: "All failures are unrelated to your PR. Safe to re-trigger." Then find the original `/payload-job` trigger comment on the PR and suggest re-posting it verbatim.
    +- **Some PR CAUSED**: "Job X failed in a test your PR modified. Check the error and Prow link before re-triggering."
    +- **All PR CAUSED**: "All failures are in tests your PR touches. Investigate before re-triggering."
    +
    +> **Note:** To re-trigger, copy the original `/payload-job <periodic-job-name>` comment from the PR — not just `/payload-job` alone, and never `/retest` (which only re-runs regular CI checks).

    @lucaconsalvi, thanks for the update. The revised wording explicitly requiring user confirmation and prohibiting auto-posting addresses the safety concern raised.

    <!-- <review_comment_addressed> -->

    ---

    <details>
    <summary>🧠 Learnings used</summary>

    Learnt from: ggiguash
    Repo: openshift-eng/edge-tooling PR: 192
    File: plugins/microshift-ci/skills/doctor/SKILL.md:88-116
    Timestamp: 2026-06-13T07:44:05.330Z
    Learning: For any Claude/agent workflow skill documentation file named SKILL.md, co-locate failure policies and edge-case rules inline with the specific step that needs them (place them immediately before/after the relevant tool invocation within that step). Do not move these rules to a separate top-level “Edge Cases” (or similar) section, because the LLM reads the step linearly and won’t reliably re-consult reference sections mid-execution—this creates two sources of truth and can increase token usage without improving compliance. Use a “CRITICAL” block for hard stops and “Error Handling” bullets for partial failures, placed directly in the step context.
    

    ---

    Learnt from: dhensel-rh
    Repo: openshift-eng/edge-tooling PR: 178
    File: plugins/two-node/evals/cluster-diagnostic.md:83-83
    Timestamp: 2026-06-16T13:37:50.326Z
    Learning: In the openshift-eng/edge-tooling repository, the term should be written as the two separate words "bare metal" (not "bare-metal") throughout all Markdown documentation. During code review, do not flag or propose changes treating "bare metal" as a compound-adjective hyphenation issue.
    

    ---

    Learnt from: agullon
    Repo: openshift-eng/edge-tooling PR: 201
    File: plugins/microshift-release/skills/advisory-promotion/SKILL.md:123-163
    Timestamp: 2026-06-24T07:30:54.767Z
    Learning: When reviewing Markdown in this repo, enforce the “no emojis” rule for prose text, but do NOT flag emoji characters that appear inside fenced code blocks (i.e., text between 
    ... `), where they’re intentionally included as example output/terminal/script results (for example, status emoji constants/dictionaries like _STATUS_EMOJI).
    
    ---
    
    

    Learnt from: lucaconsalvi
    Repo: openshift-eng/edge-tooling PR: 213
    File: plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:44-49
    Timestamp: 2026-07-03T13:26:47.505Z
    Learning: When reviewing Markdown in openshift-eng/edge-tooling, do not treat emoji characters as a violation of a “no emojis” rule if they are used as structured status/verdict icons in Markdown tables for visual scanning (e.g., 🔴/🟡 to denote PR-CAUSED/FLAKY classifications). This exception applies to emoji used in table cells as classification indicators; it does not apply to emoji in normal prose (and is separate from the existing exemption for emojis inside fenced code blocks).
    ```

    </details>

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    payload-monitor/payload_monitor/__main__.py:1
    @@ -90,15 +90,89 @@ def _collect_jobs_by_type(report: MonitorReport, job_type: JobType) -> list[dict
                   help="Number of payloads to analyze per stream (1-10, default 5)")
     @click.option("--merge-analysis", "merge_analysis_path", type=click.Path(exists=True), default=None,
                   help="Merge analysis JSON into an existing HTML report (or into --from-json data)")
    +@click.option("--pr-payload-url", type=str, default=None,
    +              help="Triage a PR payload run (e.g., https://pr-payload-tests.ci.openshift.org/runs/ci/...)")
    +@click.option("--pr", "pr_ref", type=str, default=None,
    +              help="PR reference for triage (e.g., 'openshift/origin#31276' or full URL)")
    +@click.option("--format", "output_format", type=click.Choice(["markdown", "json"]),
    +              default="markdown", help="Output format for PR triage (default: markdown)")
    +@click.option("--discover", is_flag=True, default=False,
    +              help="Discover which payload jobs match the PR's changed files (use with --pr)")
     def main(
         versions, output_path, from_json, export_json,
         open_browser, verbose, skip_prow, skip_sippy, with_timing,
    -    payloads, merge_analysis_path,
    +    payloads, merge_analysis_path, pr_payload_url, pr_ref, output_format,
    +    discover,
     ):
         """Edge OCP Payload Monitor — monitor OpenShift nightly payloads for edge topology failures."""
         _setup_logging(verbose)
         logger = logging.getLogger("payload_monitor")
     
    +    # --- PR payload job discovery mode ---
    +    if discover:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --discover")
    +            raise SystemExit(1)
    +
    +        from .collectors.payload_job_discovery import (
    +            discover_payload_jobs,
    +            find_release_repo,
    +            format_discovery_json,
    +            format_discovery_markdown,
    +        )
    +        from .collectors.pr_payload import fetch_pr_changed_files
    +
    +        release_repo = find_release_repo()
    +        if not release_repo:
    +            logger.error("Cannot find openshift/release repo. Set RELEASE_REPO_DIR or clone it locally.")
    +            raise SystemExit(1)
    +
    +        changed_files = fetch_pr_changed_files(pr_ref)
    +        if not changed_files:
    +            logger.error(f"No changed files found for {pr_ref}")
    +            raise SystemExit(1)
    +
    +        result = discover_payload_jobs(pr_ref, changed_files, release_repo)
    +
    +        if output_format == "json":
    +            print(format_discovery_json(result))
    +        else:
    +            print(format_discovery_markdown(result))
    +        return
    +
    +    # --- PR payload triage mode ---
    +    if pr_payload_url:
    +        if not pr_ref:
    +            logger.error("--pr is required when using --pr-payload-url")
    +            raise SystemExit(1)
    +
    +        from .collectors.pr_payload import (
    +            build_triage_result,
    +            classify_failures,
    +            fetch_pr_changed_files,
    +            fetch_pr_diff,
    +            fetch_pr_payload_run,
    +            format_triage_json,
    +            format_triage_markdown,
    +        )
    +
    +        jobs = fetch_pr_payload_run(pr_payload_url)
    +        if not jobs:
    +            logger.error("No jobs found at the provided URL")
    +            raise SystemExit(1)
    +
    +        pr_files = fetch_pr_changed_files(pr_ref)
    +        diff_content = fetch_pr_diff(pr_ref)
    +        verdicts = classify_failures(jobs, pr_files, diff_content)
    +        result = build_triage_result(pr_payload_url, pr_ref, jobs)
    +        result.verdicts = verdicts
    +
    +        if output_format == "json":
    +            print(format_triage_json(result))
    +        else:
    +            print(format_triage_markdown(result))
    +        return
    +

    @lucaconsalvi, confirmed — the current code wraps fetch_pr_payload_run(pr_payload_url) in a try/except requests.RequestException, logs via click.echo(..., err=True), and exits with SystemExit(1), so a stale/expired payload URL will now produce a clean CLI error instead of an unhandled traceback. Thanks for the fix!

    <!-- <review_comment_addressed> -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    plugins/pr-review/scripts/pr-payload.sh:1
    @@ -0,0 +1,262 @@
    +#!/usr/bin/bash
    +set -euo pipefail
    +
    +# Detect PR payload test runs, discover appropriate payload jobs, and triage
    +# failures via payload-monitor.
    +#
    +# Three-phase flow:
    +#   Phase 1: Discovery — find which payload jobs match the PR's changed files
    +#   Phase 2: Validation — check if existing /payload-job comments match discovery
    +#   Phase 3: Triage — analyze payload test results if a run exists
    +#
    +# Exit codes: 0=results found (triage or discovery), 1=no matches, 3=error
    +
    +URL_PATTERN='^https://github\.com/[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+/pull/[0-9]+$'
    +PAYLOAD_URL_PATTERN='https://pr-payload-tests\.ci\.openshift\.org/runs/ci/[^ )"'"'"']*'
    +
    +die() {
    +    echo "Error: $1" >&2
    +    exit 3
    +}
    +
    +check_dependencies() {
    +    command -v gh >/dev/null 2>&1 || die "gh CLI is not installed"
    +    command -v jq >/dev/null 2>&1 || die "jq is not installed"
    +    command -v python3 >/dev/null 2>&1 || die "python3 is not installed"
    +    command -v gsutil >/dev/null 2>&1 || die "gsutil is not installed"
    +    gh auth status >/dev/null 2>&1 || die "gh CLI is not authenticated — run 'gh auth login'"
    +}
    +
    +validate_url() {
    +    local url="$1"
    +    if [[ ! "${url}" =~ ${URL_PATTERN} ]]; then
    +        die "Invalid PR URL: ${url}"
    +    fi
    +}
    +
    +parse_url() {
    +    local url="$1"
    +    ORG=$(echo "${url}" | cut -d'/' -f4)
    +    REPO=$(echo "${url}" | cut -d'/' -f5)
    +    PR_NUMBER=$(echo "${url}" | cut -d'/' -f7)
    +}
    +
    +find_payload_monitor_dir() {
    +    if [[ -n "${PAYLOAD_MONITOR_DIR:-}" ]]; then
    +        if [[ -d "${PAYLOAD_MONITOR_DIR}" ]]; then
    +            echo "${PAYLOAD_MONITOR_DIR}"
    +            return
    +        fi
    +        die "PAYLOAD_MONITOR_DIR set but does not exist: ${PAYLOAD_MONITOR_DIR}"
    +    fi
    +
    +    local script_dir
    +    script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    +
    +    local candidates=(
    +        "${script_dir}/../../../payload-monitor"
    +        "${PWD}/repos/edge-tooling/payload-monitor"
    +    )
    +
    +    local base_dirs=("${HOME}/Documents/Projects" "${HOME}/Projects" "${HOME}/src")
    +    for base in "${base_dirs[@]}"; do
    +        candidates+=("${base}/edge-tooling/payload-monitor")
    +    done
    +
    +    for candidate in "${candidates[@]}"; do
    +        if [[ -d "${candidate}" ]]; then
    +            echo "$(cd "${candidate}" && pwd)"
    +            return
    +        fi
    +    done
    +
    +    die "Cannot find payload-monitor directory. Set PAYLOAD_MONITOR_DIR or run from edge-tooling repo."
    +}
    +
    +fetch_pr_comments() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh api "repos/${org}/${repo}/issues/${pr_number}/comments" \
    +        --paginate 2>/dev/null \
    +        || die "Failed to fetch PR comments for ${org}/${repo}#${pr_number}"
    +}
    +
    +fetch_latest_payload_url() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE "${PAYLOAD_URL_PATTERN}" | tail -1
    +}
    +
    +fetch_trigger_command() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '.[].body' 2>/dev/null \
    +        | grep -oE '^/payload-job .+' | tail -1
    +}
    +
    +fetch_payload_comment_timestamp() {
    +    local comments_json="$1"
    +
    +    echo "${comments_json}" | jq -r '
    +        [.[] | select(.body | test("^/payload-job "))] | last | .created_at // empty
    +    ' 2>/dev/null
    +}
    +
    +fetch_latest_commit_timestamp() {
    +    local org="$1" repo="$2" pr_number="$3"
    +
    +    gh pr view "${pr_number}" --repo "${org}/${repo}" \
    +        --json commits --jq '.commits[-1].committedDate' 2>/dev/null
    +}
    +
    +run_discovery() {
    +    local pr_ref="$1" pm_dir="$2"
    +
    +    local discovery_output
    +    discovery_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --discover --pr "${pr_ref}" --format json 2>/dev/null) || return 1
    +
    +    echo "${discovery_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${discovery_output}"
    +}
    +
    +run_triage() {
    +    local payload_url="$1" pr_ref="$2" pm_dir="$3"
    +
    +    local triage_output
    +    triage_output=$(cd "${pm_dir}" && python3 -m payload_monitor \
    +        --pr-payload-url "${payload_url}" \
    +        --pr "${pr_ref}" \
    +        --format json 2>/dev/null) || return 1
    +
    +    echo "${triage_output}" | jq -c '.' >/dev/null 2>&1 || return 1
    +    echo "${triage_output}"
    +}
    +
    +main() {
    +    [[ $# -lt 1 ]] && die "Usage: $(basename "$0") <github-pr-url>"
    +
    +    local pr_url="$1"
    +
    +    check_dependencies
    +    validate_url "${pr_url}"
    +    parse_url "${pr_url}"
    +
    +    local pm_dir
    +    pm_dir=$(find_payload_monitor_dir)
    +
    +    local pr_ref="${ORG}/${REPO}#${PR_NUMBER}"
    +
    +    # Fetch comments once — reused by discovery, validation, and triage
    +    local comments
    +    comments=$(fetch_pr_comments "${ORG}" "${REPO}" "${PR_NUMBER}")
    +
    +    # --- Phase 1: Discovery ---
    +    local discovery_json=""
    +    discovery_json=$(run_discovery "${pr_ref}" "${pm_dir}" 2>/dev/null || true)
    +
    +    # --- Phase 2: Validate existing /payload-job comments ---
    +    local existing_cmd validation_json=""
    +    existing_cmd=$(fetch_trigger_command "${comments}" 2>/dev/null || true)
    +    if [[ -n "${existing_cmd}" && -n "${discovery_json}" ]]; then
    +        local suggestion_names
    +        suggestion_names=$(echo "${discovery_json}" | jq -r '.suggestions[].as_name' 2>/dev/null || true)
    +
    +        local job_name
    +        job_name=$(echo "${existing_cmd}" | sed 's|^/payload-job ||')
    +
    +        local is_valid="false"
    +        local note=""
    +        while IFS= read -r name; do
    +            if [[ -n "${name}" && "${job_name}" == *"${name}"* ]]; then
    +                is_valid="true"
    +                note="Matches discovered job ${name}"
    +                break
    +            fi
    +        done <<< "${suggestion_names}"
    +
    +        if [[ "${is_valid}" == "false" ]]; then
    +            note="Does not match any discovered job for the changed files"
    +        fi
    +
    +        validation_json=$(jq -n \
    +            --arg cmd "${existing_cmd}" \
    +            --argjson valid "${is_valid}" \
    +            --arg note "${note}" \
    +            '{existing_command: $cmd, is_valid: $valid, note: $note}')
    +    fi

    @lucaconsalvi Confirmed — using periodic_name for the substring match resolves the false-positive risk since it's the full, unique job identifier. Thanks for the fix.

    <!-- <review_comment_addressed> -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    plugins/pr-review/skills/yolo-agent/SKILL.md:1
    @@ -228,6 +244,80 @@ skill:
     Classify each failure as **infrastructure** (recommend retrigger) or **code**
     (propose fix as trivial or non-trivial).
     
    +**Payload Track** (if `pr-payload.sh` returned exit 0 in step 2a):
    +
    +This track is **completely independent** from the CI Track. Payload jobs
    +and regular CI checks are separate systems. Report Payload Track results
    +in their own section — never merge with CI Track.
    +
    +**Do NOT check the `analyzed` list for payload URLs. Do NOT skip the
    +Payload Track. The script runs every cycle and returns fresh data.
    +Always present the results.**
    +
    +Check the `mode` field in the JSON output to determine which sub-flow
    +to follow:
    +
    +**Triage mode** (`mode: "triage"`):
    +
    +The JSON contains:
    +- `complete` — `true` when all jobs have final results, `false` when
    +  jobs are still running
    +- `jobs[]` — each with `verdict` (`pr-caused` or `flaky`), `reason`,
    +  `prow_url`, `failing_tests`
    +- `recommendation` — the action to suggest to the user
    +- `trigger_command` — the exact command for re-triggering
    +- `stale` — `true` if a new commit was pushed after the payload was
    +  triggered, `false` otherwise
    +- `stale_reason` — explanation of the staleness (timestamps)
    +- `discovery.suggestions[]` — the payload jobs the tool discovered as
    +  appropriate for this PR's **current** changed files
    +- `validation` — whether the existing `/payload-job` command matches
    +  the discovered jobs. If `is_valid: false`, warn the user.
    +
    +**Check `stale` first to decide how to present results:**
    +
    +When `stale: false` — results are current. Present the triage verdicts
    +as the Payload Track report. **Do NOT reinterpret, override, or
    +second-guess the verdicts.** The tool's diff-aware classification is
    +authoritative. When suggesting a re-trigger, post the exact
    +`trigger_command` string as a PR comment — NOT just `/payload-job` and
    +NOT `/retest`.

    @lucaconsalvi, confirmed — the stale: false re-trigger path now requires explicit user confirmation before posting, consistent with the stale: true and discovery-mode branches. Thanks for the fix.

    <!-- <review_comment_addressed> -->

    ---

    <details>
    <summary>🧠 Learnings used</summary>

    Learnt from: ggiguash
    Repo: openshift-eng/edge-tooling PR: 192
    File: plugins/microshift-ci/skills/doctor/SKILL.md:88-116
    Timestamp: 2026-06-13T07:44:05.330Z
    Learning: For any Claude/agent workflow skill documentation file named SKILL.md, co-locate failure policies and edge-case rules inline with the specific step that needs them (place them immediately before/after the relevant tool invocation within that step). Do not move these rules to a separate top-level “Edge Cases” (or similar) section, because the LLM reads the step linearly and won’t reliably re-consult reference sections mid-execution—this creates two sources of truth and can increase token usage without improving compliance. Use a “CRITICAL” block for hard stops and “Error Handling” bullets for partial failures, placed directly in the step context.
    

    ---

    Learnt from: dhensel-rh
    Repo: openshift-eng/edge-tooling PR: 178
    File: plugins/two-node/evals/cluster-diagnostic.md:83-83
    Timestamp: 2026-06-16T13:37:50.326Z
    Learning: In the openshift-eng/edge-tooling repository, the term should be written as the two separate words "bare metal" (not "bare-metal") throughout all Markdown documentation. During code review, do not flag or propose changes treating "bare metal" as a compound-adjective hyphenation issue.
    

    ---

    Learnt from: agullon
    Repo: openshift-eng/edge-tooling PR: 201
    File: plugins/microshift-release/skills/advisory-promotion/SKILL.md:123-163
    Timestamp: 2026-06-24T07:30:54.767Z
    Learning: When reviewing Markdown in this repo, enforce the “no emojis” rule for prose text, but do NOT flag emoji characters that appear inside fenced code blocks (i.e., text between 
    ... `), where they’re intentionally included as example output/terminal/script results (for example, status emoji constants/dictionaries like _STATUS_EMOJI).
    
    ---
    
    

    Learnt from: lucaconsalvi
    Repo: openshift-eng/edge-tooling PR: 213
    File: plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:44-49
    Timestamp: 2026-07-03T13:26:47.505Z
    Learning: When reviewing Markdown in openshift-eng/edge-tooling, do not treat emoji characters as a violation of a “no emojis” rule if they are used as structured status/verdict icons in Markdown tables for visual scanning (e.g., 🔴/🟡 to denote PR-CAUSED/FLAKY classifications). This exception applies to emoji used in table cells as classification indicators; it does not apply to emoji in normal prose (and is separate from the existing exemption for emojis inside fenced code blocks).
    ```

    </details>

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---
    +
    +# PR Payload Triage Skill
    +
    +You are helping a developer triage the results of a PR payload test run triggered by `/payload-job` on a GitHub PR. The goal is to classify each failing job as either **PR-caused** (the failing test was modified by the PR) or **flaky/unrelated** (the failure is in a test the PR did not touch).
    +
    +## Arguments
    +
    +The user provides two arguments:
    +
    +1. **PR payload URL** — the `pr-payload-tests.ci.openshift.org` link from the openshift-ci bot comment on the PR
    +2. **PR reference** — the GitHub PR in `owner/repo#number` format (e.g., `openshift/origin#31276`) or a full URL
    +
    +If the user provides only the payload URL, ask for the PR reference. If they provide only a PR URL and mention payload, check the PR comments for the payload link.
    +
    +## Execution
    +
    +Run the payload-monitor CLI in PR triage mode:
    +
    +```bash
    +cd <edge-tooling-repo>/payload-monitor
    +python3 -m payload_monitor \
    +  --pr-payload-url "<payload-url>" \
    +  --pr "<pr-ref>" \
    +  --verbose
    +```
    +
    +The tool will:
    +1. Fetch the pr-payload-tests page and extract Prow job URLs
    +2. Check each job's pass/fail status via GCS `finished.json`
    +3. For failing jobs, fetch deep junit artifacts to get individual Go test names
    +4. Fetch the PR diff from GitHub
    +5. Classify each failure by checking if the failing test description appears in the diff
    +
    +## Output
    +
    +The tool prints a markdown triage report to stdout. Present it to the user as-is.

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/bin/bash
    cat -n plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md
    

    Length of output: 5019

    ---

    </details>

    The Error Handling section and guard checks fully address the concern, covering expired pages, no-jobs-found, gh/gsutil auth failures, generic tool errors, and inter-phase guard checks. Thanks for the update!

    <!-- <review_comment_addressed> -->

    ---

    <details>
    <summary>🧠 Learnings used</summary>

    Learnt from: ggiguash
    Repo: openshift-eng/edge-tooling PR: 192
    File: plugins/microshift-ci/skills/doctor/SKILL.md:88-116
    Timestamp: 2026-06-13T07:44:05.330Z
    Learning: For any Claude/agent workflow skill documentation file named SKILL.md, co-locate failure policies and edge-case rules inline with the specific step that needs them (place them immediately before/after the relevant tool invocation within that step). Do not move these rules to a separate top-level “Edge Cases” (or similar) section, because the LLM reads the step linearly and won’t reliably re-consult reference sections mid-execution—this creates two sources of truth and can increase token usage without improving compliance. Use a “CRITICAL” block for hard stops and “Error Handling” bullets for partial failures, placed directly in the step context.
    

    ---

    Learnt from: dhensel-rh
    Repo: openshift-eng/edge-tooling PR: 178
    File: plugins/two-node/evals/cluster-diagnostic.md:83-83
    Timestamp: 2026-06-16T13:37:50.326Z
    Learning: In the openshift-eng/edge-tooling repository, the term should be written as the two separate words "bare metal" (not "bare-metal") throughout all Markdown documentation. During code review, do not flag or propose changes treating "bare metal" as a compound-adjective hyphenation issue.
    

    ---

    Learnt from: agullon
    Repo: openshift-eng/edge-tooling PR: 201
    File: plugins/microshift-release/skills/advisory-promotion/SKILL.md:123-163
    Timestamp: 2026-06-24T07:30:54.767Z
    Learning: When reviewing Markdown in this repo, enforce the “no emojis” rule for prose text, but do NOT flag emoji characters that appear inside fenced code blocks (i.e., text between 
    ... `), where they’re intentionally included as example output/terminal/script results (for example, status emoji constants/dictionaries like _STATUS_EMOJI).
    
    ---
    
    

    Learnt from: lucaconsalvi
    Repo: openshift-eng/edge-tooling PR: 213
    File: plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:44-49
    Timestamp: 2026-07-03T13:26:47.505Z
    Learning: When reviewing Markdown in openshift-eng/edge-tooling, do not treat emoji characters as a violation of a “no emojis” rule if they are used as structured status/verdict icons in Markdown tables for visual scanning (e.g., 🔴/🟡 to denote PR-CAUSED/FLAKY classifications). This exception applies to emoji used in table cells as classification indicators; it does not apply to emoji in normal prose (and is separate from the existing exemption for emojis inside fenced code blocks).
    ```

    </details>

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:1
    @@ -0,0 +1,75 @@
    +---
    +name: edge-ocp-ci:pr-payload-triage
    +description: "Triage a PR payload test run — classify failures as PR-caused vs. flaky by matching failing tests against the PR diff"
    +argument-hint: "<pr-payload-url> <pr-ref>"
    +user-invocable: true
    +---

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/bin/bash
    sed -n '1,10p' plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md
    

    Length of output: 511

    ---

    </details>

    @lucaconsalvi Confirmed — the allowed-tools: [Bash] entry is now present in the frontmatter. Thanks for the fix.

    <!-- <review_comment_addressed> -->

    ---

    <details>
    <summary>🧠 Learnings used</summary>

    Learnt from: ggiguash
    Repo: openshift-eng/edge-tooling PR: 192
    File: plugins/microshift-ci/skills/doctor/SKILL.md:88-116
    Timestamp: 2026-06-13T07:44:05.330Z
    Learning: For any Claude/agent workflow skill documentation file named SKILL.md, co-locate failure policies and edge-case rules inline with the specific step that needs them (place them immediately before/after the relevant tool invocation within that step). Do not move these rules to a separate top-level “Edge Cases” (or similar) section, because the LLM reads the step linearly and won’t reliably re-consult reference sections mid-execution—this creates two sources of truth and can increase token usage without improving compliance. Use a “CRITICAL” block for hard stops and “Error Handling” bullets for partial failures, placed directly in the step context.
    

    ---

    Learnt from: dhensel-rh
    Repo: openshift-eng/edge-tooling PR: 178
    File: plugins/two-node/evals/cluster-diagnostic.md:83-83
    Timestamp: 2026-06-16T13:37:50.326Z
    Learning: In the openshift-eng/edge-tooling repository, the term should be written as the two separate words "bare metal" (not "bare-metal") throughout all Markdown documentation. During code review, do not flag or propose changes treating "bare metal" as a compound-adjective hyphenation issue.
    

    ---

    Learnt from: agullon
    Repo: openshift-eng/edge-tooling PR: 201
    File: plugins/microshift-release/skills/advisory-promotion/SKILL.md:123-163
    Timestamp: 2026-06-24T07:30:54.767Z
    Learning: When reviewing Markdown in this repo, enforce the “no emojis” rule for prose text, but do NOT flag emoji characters that appear inside fenced code blocks (i.e., text between 
    ... `), where they’re intentionally included as example output/terminal/script results (for example, status emoji constants/dictionaries like _STATUS_EMOJI).
    
    ---
    
    

    Learnt from: lucaconsalvi
    Repo: openshift-eng/edge-tooling PR: 213
    File: plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md:44-49
    Timestamp: 2026-07-03T13:26:47.505Z
    Learning: When reviewing Markdown in openshift-eng/edge-tooling, do not treat emoji characters as a violation of a “no emojis” rule if they are used as structured status/verdict icons in Markdown tables for visual scanning (e.g., 🔴/🟡 to denote PR-CAUSED/FLAKY classifications). This exception applies to emoji used in table cells as classification indicators; it does not apply to emoji in normal prose (and is separate from the existing exemption for emojis inside fenced code blocks).
    ```

    </details>

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 03, 2026 13:51 UTC
    Code Review
    payload-monitor/payload_monitor/collectors/pr_payload.py:1
    @@ -0,0 +1,439 @@
    +"""Fetch and triage PR payload test runs from pr-payload-tests.ci.openshift.org."""
    +
    +from __future__ import annotations
    +
    +import json
    +import logging
    +import re
    +import subprocess
    +import xml.etree.ElementTree as ET
    +from concurrent.futures import ThreadPoolExecutor, as_completed
    +from typing import Optional
    +
    +from ..models import (
    +    FailingTest,
    +    FailureVerdict,
    +    JobResult,
    +    PRPayloadJob,
    +    PRTriageResult,
    +)
    +from .http import create_session
    +from .payload_job_discovery import _parse_pr_ref as _parse_pr_ref_3
    +from .prow import _fetch_gcs_file, _prow_url_to_gcs_path
    +
    +logger = logging.getLogger(__name__)
    +
    +_session = create_session()
    +
    +# Matches Prow job links embedded in the pr-payload-tests page
    +_PROW_HREF_RE = re.compile(
    +    r'href="(https://prow\.ci\.openshift\.org/view/gs/[^"]+)"'
    +)
    +# Extracts job name and build ID from a Prow URL
    +_PROW_JOB_RE = re.compile(r'/logs/([^/]+)/(\d+)')
    +
    +
    +def _parse_prow_urls(html: str) -> list[str]:
    +    return list(dict.fromkeys(_PROW_HREF_RE.findall(html)))  # deduplicated, order preserved
    +
    +
    +def _job_name_from_url(prow_url: str) -> str:
    +    m = _PROW_JOB_RE.search(prow_url)
    +    return m.group(1) if m else prow_url
    +
    +
    +def _fetch_job_result(prow_url: str) -> JobResult:
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return JobResult.UNKNOWN
    +    content = _fetch_gcs_file(f"{gcs_base}/finished.json")
    +    if not content:
    +        return JobResult.UNKNOWN
    +    try:
    +        data = json.loads(content)
    +        result = data.get("result", "").upper()
    +        if result == "SUCCESS" or data.get("passed") is True:
    +            return JobResult.SUCCESS
    +        if result in ("FAILURE", "FAILED", "ERROR"):
    +            return JobResult.FAILURE
    +        if result in ("PENDING", "RUNNING"):
    +            return JobResult.PENDING
    +        return JobResult.UNKNOWN
    +    except json.JSONDecodeError:
    +        return JobResult.UNKNOWN
    +
    +
    +# --- Deep junit: fetch individual test results from step artifacts ---
    +
    +def _list_gcs_dir(gcs_path: str) -> list[str]:
    +    """List files in a GCS directory."""
    +    try:
    +        result = subprocess.run(
    +            ["gsutil", "ls", gcs_path],
    +            capture_output=True, text=True, timeout=30,
    +        )
    +        if result.returncode == 0:
    +            return [l.strip() for l in result.stdout.strip().split("\n") if l.strip()]
    +        return []
    +    except (subprocess.TimeoutExpired, FileNotFoundError):
    +        return []
    +
    +
    +def _find_e2e_step_name(gcs_base: str) -> Optional[str]:
    +    """Discover the e2e test step directory name from the artifacts."""
    +    artifacts_path = f"{gcs_base}/artifacts/"
    +    dirs = _list_gcs_dir(artifacts_path)
    +    for d in dirs:
    +        # The top-level step directory (e.g. e2e-metal-ovn-two-node-fencing-recovery/)
    +        if d.endswith("/") and "gather" not in d and "release" not in d and "build" not in d:
    +            step_name = d.rstrip("/").rsplit("/", 1)[-1]
    +            return step_name
    +    return None
    +
    +
    +def _fetch_deep_junit_failures(prow_url: str) -> list[FailingTest]:
    +    """Fetch individual test-level failures from the deep junit artifacts.
    +
    +    Looks for junit_e2e__*.xml inside the e2e test step's artifacts/junit/ directory.
    +    These contain the actual Go test names (g.It descriptions), not just step-level results.
    +    """
    +    gcs_base = _prow_url_to_gcs_path(prow_url)
    +    if not gcs_base:
    +        return []
    +
    +    step_name = _find_e2e_step_name(gcs_base)
    +    if not step_name:
    +        return []
    +
    +    junit_dir = f"{gcs_base}/artifacts/{step_name}/baremetalds-e2e-test/artifacts/junit/"
    +    files = _list_gcs_dir(junit_dir)
    +
    +    junit_files = [f for f in files if f.endswith(".xml") and "junit_e2e" in f]
    +    if not junit_files:
    +        # Fall back to any junit XML
    +        junit_files = [f for f in files if f.endswith(".xml")]
    +
    +    tests: list[FailingTest] = []
    +    for jf in junit_files:
    +        content = _fetch_gcs_file(jf)
    +        if not content:
    +            continue
    +        try:
    +            root = ET.fromstring(content)
    +            for tc in root.iter("testcase"):
    +                failure = tc.find("failure")
    +                if failure is not None:
    +                    name = tc.get("name", "")
    +                    error_msg = failure.get("message", "") or (failure.text or "")
    +                    error_msg = error_msg.replace("&#xA;", "\n").replace("&#34;", '"')
    +                    duration = float(tc.get("time", "0") or "0")
    +                    tests.append(FailingTest(
    +                        name=name, error_message=error_msg[:500], duration_seconds=duration,
    +                    ))
    +        except ET.ParseError as e:
    +            logger.debug(f"Failed to parse {jf}: {e}")
    +
    +    return tests
    +
    +
    +def _fetch_single_job(prow_url: str) -> PRPayloadJob:
    +    name = _job_name_from_url(prow_url)
    +    result = _fetch_job_result(prow_url)
    +    job = PRPayloadJob(name=name, prow_url=prow_url, result=result)
    +
    +    if result == JobResult.FAILURE:
    +        # Fetch deep junit for individual test names
    +        deep_tests = _fetch_deep_junit_failures(prow_url)
    +        if deep_tests:
    +            job.failing_tests = deep_tests
    +            job.error_summary = "; ".join(t.name[:80] for t in deep_tests[:3])
    +        else:
    +            # Fall back to step-level junit
    +            from .prow import _fetch_junit_failures
    +            tests, summary = _fetch_junit_failures(prow_url)
    +            job.failing_tests = tests
    +            job.error_summary = summary
    +
    +    return job
    +
    +
    +def fetch_pr_payload_run(url: str, max_workers: int = 4) -> list[PRPayloadJob]:
    +    """Fetch a pr-payload-tests run URL and return all jobs with results."""
    +    logger.info(f"Fetching PR payload run: {url}")
    +    resp = _session.get(url)
    +    resp.raise_for_status()
    +
    +    prow_urls = _parse_prow_urls(resp.text)
    +    if not prow_urls:
    +        logger.warning("No Prow job links found on the page")
    +        return []
    +
    +    logger.info(f"Found {len(prow_urls)} job(s), fetching results...")
    +    jobs: list[PRPayloadJob] = []
    +    with ThreadPoolExecutor(max_workers=max_workers) as pool:
    +        futures = {pool.submit(_fetch_single_job, u): u for u in prow_urls}
    +        for future in as_completed(futures):
    +            try:
    +                jobs.append(future.result())
    +            except Exception as e:
    +                logger.error(f"Failed to fetch job {futures[future]}: {e}")
    +
    +    jobs.sort(key=lambda j: j.name)
    +    return jobs

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/bin/bash
    set -euo pipefail
    sed -n '160,200p' payload-monitor/payload_monitor/collectors/pr_payload.py
    

    Length of output: 1647

    ---

    </details>

    @lucaconsalvi Confirmed — the fix in fetch_pr_payload_run() correctly wraps the fetch/raise_for_status() call in try/except requests.RequestException, logs a warning, and returns [] on failure. This resolves the concern about expired or 4xx/5xx payload pages crashing the triage flow. Thanks for the quick turnaround!

    <!-- <review_comment_addressed> -->

    <!-- This is an auto-generated reply by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] requested changes on Jul 03, 2026 13:59 UTC
    Changes Requested Reviewer

    Actionable comments posted: 1

    <details>
    <summary>🧹 Nitpick comments (1)</summary><blockquote>

    <details>
    <summary>plugins/pr-review/skills/yolo-agent/SKILL.md (1)</summary><blockquote>

    282-284: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_

    Reword the fragmented trailing clause for clarity.

    The confirmation guard is a correct fix, but "NOT just /payload-job and NOT /retest" now dangles as a disconnected fragment after "Never auto-post," making it unclear what it modifies.

    <details>
    <summary>📝 Proposed fix</summary>

    -authoritative. When suggesting a re-trigger, ask the user to confirm
    -before posting the exact `trigger_command` string as a PR comment.
    -Never auto-post. NOT just `/payload-job` and NOT `/retest`.
    +authoritative. When suggesting a re-trigger, ask the user to confirm
    +before posting the exact `trigger_command` string as a PR comment —
    +never auto-post, and never substitute `/payload-job` or `/retest`
    +for the exact command.
    

    </details>

    As per coding guidelines: "Markdown must be professional, terse, customer-centric — no emojis or filler."

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 282 - 284, The
    trailing restriction in the re-trigger guidance is fragmented and should be
    rewritten for clarity in SKILL.md. Update the guidance around the confirmation
    guard and the exact `trigger_command` wording so the “NOT just `/payload-job`
    and NOT `/retest`” requirement is grammatically attached to the instruction
    about posting the comment, rather than left as a dangling clause; keep the
    wording concise and professional in the same section.
    

    </details>

    <!-- cr-comment:v1:9aad85ddbcd3b2ea8e75e174 -->

    _Source: Coding guidelines_

    </blockquote></details>

    </blockquote></details>

    <details>
    <summary>🤖 Prompt for all review comments with AI agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    Inline comments:
    In `@payload-monitor/payload_monitor/__main__.py`:
    - Around line 162-169: The `fetch_pr_payload_run` error path in `__main__.py` is
    re-raising `SystemExit` without preserving the caught
    `requests.RequestException` context. Update the `except
    requests.RequestException as exc` block so the `raise SystemExit(1)` is chained
    from `exc`, keeping the original cause visible while leaving the `click.echo`
    and `logger.error` behavior unchanged.
    
    ---
    
    Nitpick comments:
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md`:
    - Around line 282-284: The trailing restriction in the re-trigger guidance is
    fragmented and should be rewritten for clarity in SKILL.md. Update the guidance
    around the confirmation guard and the exact `trigger_command` wording so the
    “NOT just `/payload-job` and NOT `/retest`” requirement is grammatically
    attached to the instruction about posting the comment, rather than left as a
    dangling clause; keep the wording concise and professional in the same section.
    

    </details>

    <details>
    <summary>🪄 Autofix (Beta)</summary>

    Fix all unresolved CodeRabbit comments on this PR:

  • <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)

  • <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes
  • </details>

    ---

    <details>
    <summary>ℹ️ Review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: Repository YAML (base), Central YAML (inherited)

    Review profile: CHILL

    Plan: Enterprise

    Run ID: 64038a0c-2086-4839-a74b-d3a9bb08844d

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between 9bdadd8d70d8a959491d4818a6762ea54d77aace and bb0b3236d65ff2bda3facdcbe4f8b7f6d94e1429.

    </details>

    <details>
    <summary>📒 Files selected for processing (9)</summary>

    .claude-plugin/marketplace.json
    payload-monitor/payload_monitor/__main__.py
    payload-monitor/payload_monitor/collectors/payload_job_discovery.py
    payload-monitor/payload_monitor/collectors/pr_payload.py
    plugins/edge-ocp-ci/.claude-plugin/plugin.json
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md
    plugins/pr-review/.claude-plugin/plugin.json
    plugins/pr-review/scripts/pr-payload.sh
    plugins/pr-review/skills/yolo-agent/SKILL.md

    </details>

    <details>
    <summary>✅ Files skipped from review due to trivial changes (4)</summary>

    plugins/edge-ocp-ci/.claude-plugin/plugin.json
    .claude-plugin/marketplace.json
    plugins/pr-review/.claude-plugin/plugin.json
    plugins/edge-ocp-ci/skills/pr-payload-triage/SKILL.md

    </details>

    <details>
    <summary>🚧 Files skipped from review as they are similar to previous changes (3)</summary>

    payload-monitor/payload_monitor/collectors/payload_job_discovery.py
    payload-monitor/payload_monitor/collectors/pr_payload.py
    plugins/pr-review/scripts/pr-payload.sh

    </details>

    </details>

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    coderabbitai[bot] coderabbitai[bot] approved these changes on Jul 03, 2026 14:16 UTC
    Approved Reviewer

    Approved these changes.

    coderabbitai[bot] coderabbitai[bot] commented on Jul 03, 2026 14:28 UTC
    Reviewer

    [!CAUTION]

    Some comments are outside the diff and can’t be posted inline due to platform limitations.

    >

    > <details>

    <summary>⚠️ Outside diff range comments (2)</summary><blockquote>

    > <details>

    <summary>plugins/pr-review/skills/yolo-agent/SKILL.md (2)</summary><blockquote>

    > 332-343: _🔒 Security & Privacy_ | _🟠 Major_ | _⚡ Quick win_

    > Require explicit confirmation before any push.

    > The --yolo path still auto-applies changes and batches them for pr-push.sh, which gives the agent a branch-mutating action without human approval.

    > <details>

    <summary>Proposed fix</summary>

    >
    > -  - Trivial changes: apply directly, batch for auto-push
    > -  - Non-trivial changes: if `--yolo` is active, apply directly and batch for auto-push (same as trivial). Otherwise, display diff and ask for confirmation
    > +  - Trivial changes: apply directly, then ask for confirmation before `pr-push.sh`
    > +  - Non-trivial changes: if `--yolo` is active, apply directly, then ask for confirmation before `pr-push.sh`. Otherwise, display diff and ask for confirmation
    > 

    </details>

    > As per path instructions, side effects safety: explicitly declare side effects/read-only, require user confirmation for destructive actions.

    > <details>

    <summary>🤖 Prompt for AI Agents</summary>

    >
    > Verify each finding against current code. Fix only still-valid issues, skip the
    > rest with a brief reason, keep changes minimal, and validate.
    > 
    > In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 332 - 343, Update
    > the workflow in SKILL.md so push actions are never automatic: in the logic
    > around `--yolo`, `pr-push.sh`, and the “On successful push” section, require
    > explicit user confirmation before any branch-mutating step, including applying
    > non-trivial changes and batching for push. Make the side-effect policy explicit
    > by separating read-only guidance from destructive actions, and ensure the
    > confirmation gate is checked before calling `pr-push.sh` regardless of `--yolo`.
    > 

    > </details>

    > <!-- cr-comment:v1:6e18f47317f2425dbe174c93 -->

    > _Sources: Path instructions, Linters/SAST tools_

    > ---

    > 138-157: _🎯 Functional Correctness_ | _🟠 Major_ | _⚡ Quick win_

    > Exclude stale triage from the ready-label branch.

    A completed triage run with zero pr-caused verdicts can still be stale after a newer commit, and this path would auto-post /label ready-for-human-review for obsolete results. Require stale: false here.

    > <details>

    <summary>🤖 Prompt for AI Agents</summary>

    >
    > Verify each finding against current code. Fix only still-valid issues, skip the
    > rest with a brief reason, keep changes minimal, and validate.
    > 
    > In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 138 - 157, The
    > ready-label branch in the yolo-agent flow is missing a freshness check, so
    > completed triage results can still trigger a stale /label ready-for-human-review
    > comment after newer commits. Update the condition in the decision logic around
    > the payload/triage checks to also require stale: false before posting the PR
    > comment and marking the run complete, keeping the existing checks for mode,
    > complete, and zero pr-caused verdicts.
    > 

    > </details>

    > <!-- cr-comment:v1:0371da0bf2a71823a77ebea8 -->

    > </blockquote></details>

    > </blockquote></details>

    <details>
    <summary>🧹 Nitpick comments (1)</summary><blockquote>

    <details>
    <summary>plugins/pr-review/skills/yolo-agent/SKILL.md (1)</summary><blockquote>

    380-385: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_

    Inline the failure policy in this step.

    This step delegates reply/thread failure handling to ${PLUGIN_DIR}/references/error-handling.md, which makes the recovery path harder to follow when the agent is already handling an error.

    Based on learnings, co-locate failure policies and edge-case rules inline with the specific step that needs them.

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md` around lines 380 - 385, Inline
    the reply/thread failure policy directly in the “Reply failure handling” step
    instead of delegating to `${PLUGIN_DIR}/references/error-handling.md`. Update
    the guidance near the reply handling section in `SKILL.md` so it explicitly
    states the non-fatal retry-tracked behavior, 3-strike escalation, and
    thread-resolution failure handling rules in place, keeping the recovery path
    co-located with the step that uses it.
    

    </details>

    <!-- cr-comment:v1:3f3d7dced56de8cafd4e374c -->

    _Source: Learnings_

    </blockquote></details>

    </blockquote></details>

    <details>
    <summary>🤖 Prompt for all review comments with AI agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    Outside diff comments:
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md`:
    - Around line 332-343: Update the workflow in SKILL.md so push actions are never
    automatic: in the logic around `--yolo`, `pr-push.sh`, and the “On successful
    push” section, require explicit user confirmation before any branch-mutating
    step, including applying non-trivial changes and batching for push. Make the
    side-effect policy explicit by separating read-only guidance from destructive
    actions, and ensure the confirmation gate is checked before calling `pr-push.sh`
    regardless of `--yolo`.
    - Around line 138-157: The ready-label branch in the yolo-agent flow is missing
    a freshness check, so completed triage results can still trigger a stale /label
    ready-for-human-review comment after newer commits. Update the condition in the
    decision logic around the payload/triage checks to also require stale: false
    before posting the PR comment and marking the run complete, keeping the existing
    checks for mode, complete, and zero pr-caused verdicts.
    
    ---
    
    Nitpick comments:
    In `@plugins/pr-review/skills/yolo-agent/SKILL.md`:
    - Around line 380-385: Inline the reply/thread failure policy directly in the
    “Reply failure handling” step instead of delegating to
    `${PLUGIN_DIR}/references/error-handling.md`. Update the guidance near the reply
    handling section in `SKILL.md` so it explicitly states the non-fatal
    retry-tracked behavior, 3-strike escalation, and thread-resolution failure
    handling rules in place, keeping the recovery path co-located with the step that
    uses it.
    

    </details>

    ---

    <details>
    <summary>ℹ️ Review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: Repository YAML (base), Central YAML (inherited)

    Review profile: CHILL

    Plan: Enterprise

    Run ID: f6da322d-bd00-453b-baf7-d4ebe12bc640

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between 3a9ee2f776b01ca958dc95782fda1901230d6f87 and 01616931457874605f50291b67563cd0e552c831.

    </details>

    <details>
    <summary>📒 Files selected for processing (1)</summary>

  • plugins/pr-review/skills/yolo-agent/SKILL.md
  • </details>

    </details>

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    lucaconsalvi lucaconsalvi commented on Jul 03, 2026 14:42 UTC
    Author

    /label ready-for-human-review

    This message is AI generated by the yolo-agent of edge-tooling.

    Reviewers
    Assignees
    lucaconsalvi lucaconsalvi
    Labels
    risk: low confidence: 82.9% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 96% (HIGH) · Higher = larger blast radius
    96%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 82.9% · Lower = rushed or shallow review
    82.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.4% · Safe to merge
    16.4%