conformance: keep ref-bug files out of the root-cause tables, name the non-ok classes

A ref-bug file's refused objects were still listed as our-error root
causes. The summary line now names every non-ok class and its count, and
an empty root-cause table says None.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-27 22:33:42 -05:00
co-authored by Claude Opus 5.5
parent 96086add99
commit ff0b2f8a4e
2 changed files with 20 additions and 14 deletions
+2 -1
View File
@@ -239,7 +239,8 @@ for rel in files:
"caught": [(p, w, m[:2500]) for p, w, m in caught_panics[:3]], "caught": [(p, w, m[:2500]) for p, w, m in caught_panics[:3]],
"n_caught": len(caught_panics), "n_caught": len(caught_panics),
}) })
for kind, detail, key, rec in issues: # A ref-bug file's differences are listed with the evidence instead.
for kind, detail, key, rec in (issues if cls != "ref-bug" else []):
if kind == "our-error": if kind == "our-error":
add(root_causes, norm(key), rel, detail[:300]) add(root_causes, norm(key), rel, detail[:300])
else: else:
+18 -13
View File
@@ -225,9 +225,8 @@ for c in sorted(by_corpus):
w(f"| **all** | **{len(rows)}** | " + " | ".join(f"**{total.get(k, 0)}**" for k in CLASSES) + " |") w(f"| **all** | **{len(rows)}** | " + " | ".join(f"**{total.get(k, 0)}**" for k in CLASSES) + " |")
w("") w("")
nonok = total.get("our-error", 0) + total.get("mismatch", 0) nonok = total.get("our-error", 0) + total.get("mismatch", 0)
w(f"**Our errors and mismatches: {nonok}.** " w(f"**Our errors and mismatches: {nonok}.** Files not ok: "
+ ("Every file clawhdf5 does not read like h5py is either unreadable by h5py or a confirmed libhdf5 " + (", ".join(f"{total[c]} {c}" for c in CLASSES if c != "ok" and total.get(c)) or "none") + "."
"bug (*ref-bug*)." if nonok == 0 else "See the root causes below.")
+ (f" {len(ref_fixes)} object(s) were compared against h5py's values corrected for a known h5py bug" + (f" {len(ref_fixes)} object(s) were compared against h5py's values corrected for a known h5py bug"
f" ({sum(1 for x in ref_fixes if x[3])} identical to clawhdf5's; see *Reference bugs*)." if ref_fixes else "")) f" ({sum(1 for x in ref_fixes if x[3])} identical to clawhdf5's; see *Reference bugs*)." if ref_fixes else ""))
w("") w("")
@@ -250,19 +249,25 @@ w("")
w("## Our-error root causes") w("## Our-error root causes")
w("") w("")
w("Grouped by normalised error message. *files* counts files whose class this cause affects.") if res["root_causes"]:
w("") w("Grouped by normalised error message. *files* counts files whose class this cause affects.")
w("| files | objects | error | examples |") w("")
w("|---:|---:|---|---|") w("| files | objects | error | examples |")
for k, v in res["root_causes"].items(): w("|---:|---:|---|---|")
w(f"| {v['files']} | {v['count']} | `{k.replace('|', '/')}` | {ex_list(v['file_list'])} |") for k, v in res["root_causes"].items():
w(f"| {v['files']} | {v['count']} | `{k.replace('|', '/')}` | {ex_list(v['file_list'])} |")
else:
w("None.")
w("") w("")
w("## Mismatch root causes") w("## Mismatch root causes")
w("") w("")
w("| files | objects | cause | examples |") if res["mismatch_causes"]:
w("|---:|---:|---|---|") w("| files | objects | cause | examples |")
for k, v in res["mismatch_causes"].items(): w("|---:|---:|---|---|")
w(f"| {v['files']} | {v['count']} | `{k.replace('|', '/')}` | {ex_list(v['file_list'])} |") for k, v in res["mismatch_causes"].items():
w(f"| {v['files']} | {v['count']} | `{k.replace('|', '/')}` | {ex_list(v['file_list'])} |")
else:
w("None.")
w("") w("")
w("## CVE corpus: clawhdf5 vs h5dump vs h5py") w("## CVE corpus: clawhdf5 vs h5dump vs h5py")