...amples[cat]) < 3:
            key = extract_key_lines(txt)
            samples[cat].append((p, key))

    print("=== FAIL SUMMARY ===")
    total = sum(counts.values())
    print(f"Total fail files: {total}\n")
    for cat, n in counts.most_common():
        print(f"{cat:28s} {n:5d}")

    print("\n=== SAMPLES (first 3 per category) ===")
    for cat, entries in samples.items():
        print(f"\n--- {...