Skip to content

Commit 6f3a03e

Browse files
reid-spencerclaude
andcommitted
Report fences validated, not fences attempted
`total` counts every fence the gate ATTEMPTS, and the summary printed it as "validated". With nothing failing the two coincide, which is why it went unnoticed — every green run reported honestly. But a run with failures overstated its own success: a sample measurement here printed "19 fence(s) validated, 0 skipped, 10 failed", where only 9 passed. Now prints passes, with the attempted count alongside so the arithmetic still reconciles. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent c5865a0 commit 6f3a03e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/validate-riddl-examples.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,12 @@ def main() -> int:
421421
for ln in detail.split("\n")[:8]:
422422
print(" " + ln)
423423

424-
print(f"\n{total} fence(s) validated, {skipped} skipped, {failed} failed")
424+
# `total` counts fences ATTEMPTED, so the passing count is total - failed.
425+
# Reporting `total` as "validated" overstates it whenever anything failed.
426+
print(
427+
f"\n{total - failed} fence(s) validated, {skipped} skipped, "
428+
f"{failed} failed ({total} attempted)"
429+
)
425430
return 1 if failed else 0
426431

427432

0 commit comments

Comments
 (0)