From 1e20ab641c4e587fecf84ffda0fe30ebd10b4a08 Mon Sep 17 00:00:00 2001 From: n-papaioannou Date: Tue, 28 Apr 2026 16:06:32 +0200 Subject: [PATCH] fix(cli): clarify run summary so "failed" stops meaning two different things MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The post-run summary line said "{n} out of {total} tests have failed", but {n} counted only tests with insufficient_evidence. The per-category bars on the same screen marked tests as failed when they didn't pass their score threshold. Same word, two definitions, two visibly contradictory counts (e.g. bars: 8 ✗, line: 6 / 8 failed). Reword to make the distinction explicit: - success branch: "All {N} tests produced sufficient evidence to be scored." - failure branch: "{n} out of {total} tests had insufficient evidence to be scored ({ids}). The remaining tests were scored but may still be below threshold -- see the per-category bars above." --- ifixai/cli/orchestrator.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ifixai/cli/orchestrator.py b/ifixai/cli/orchestrator.py index 43cf6c5d..2f966401 100644 --- a/ifixai/cli/orchestrator.py +++ b/ifixai/cli/orchestrator.py @@ -185,14 +185,21 @@ def _print_insufficient_evidence_summary(result: TestRunResult) -> None: insufficient = [br for br in result.test_results if br.insufficient_evidence] total = len(result.test_results) if not insufficient: - click.echo(click.style(f"0 out of {total} tests have failed.", fg="green")) + click.echo( + click.style( + f"All {total} tests produced sufficient evidence to be scored.", + fg="green", + ) + ) return inspection_ids = ", ".join(sorted(br.test_id for br in insufficient)) click.echo( click.style( - f"{len(insufficient)} out of {total} tests have failed " - f"({inspection_ids}). Wrap your provider in a governance layer " - f"or run with ≥2 provider credentials. See docs/methodology.md.", + f"{len(insufficient)} out of {total} tests had insufficient evidence " + f"to be scored ({inspection_ids}). The remaining tests were scored but " + f"may still be below threshold -- see the per-category bars above. " + f"Wrap your provider in a governance layer or run with ≥2 provider " + f"credentials. See docs/methodology.md.", fg="yellow", ) )