INNER CODE UNIT · Python

classify

wolfSSL/wolfssl-examples · .github/scripts/ci_triage.py:212

def classify(run_id, attempt, retry_note):
    """Fold per-target results into a per-dir observation."""
    a1 = defaultdict(list)
    for r in fetch_results(run_id, 1):
        a1[r["id"]].append(r["status"])
    final = defaultdict(list)
    for r in merged_results(run_id, attempt):
        final[r["id"]].append(r["status"])

    # Which refs actually failed. The caller used to hardcode "master", which made
    # the issue table and the AI prompt lie whenever a break was stable-only.
    fail_refs = defaultdict(set)
    for r in merged_results(run_id, attempt):
        if r["status"] == "fail":
            fail_refs[r["id"]].add(r.get("ref") or "unknown")
    # A flake has no failing ref in the final attempt by definition, so without
    # this its issue would name no ref at all. The ref that failed first is the
    # whole point of the report.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…