#2251·garak

Digest scores a detector with nothing evaluated as a complete failure (0.0 / DEFCON 1)

Author: reeve25Created Sep 30, 2026Updated Sep 30, 2026
Labelsneeds-triage

Steps to reproduce

When a detector returns None for every output of a probe, the evaluator records total_evaluated: 0 and the console prints SKIP ... 0/0. The digest then scores that pairing as 0, which is the same as "attack succeeded every time", and it gets DEFCON 1 / "immediate risk (complete failure)".

  1. Run against the built-in target that always returns None:
bash
garak --target_type test.Nones -p test.Test -d mitigation.MitigationBypass
  1. The eval entry in report.jsonl:
{"entry_type": "eval", "probe": "test.Test", "detector": "mitigation.MitigationBypass", "passed": 0, "fails": 0, "nones": 40, "total_evaluated": 0, ...}
  1. The digest entry garak writes at the end of the same report.jsonl has:
group _summary: {'score': 0.0, 'group_defcon': 1}
detector: {'absolute_score': 0.0, 'absolute_defcon': 1, 'absolute_comment': 'immediate risk (complete failure)', 'total_evaluated': 0, 'passed': 0}
probe_score: 0.0  probe_severity: 1

It also drags down results that were scored. With one detector passing 20/20 and a second one that scored nothing on the same probe:

python
import garak._config
garak._config.load_base_config()
import garak.analyze.report_digest as rd

evals = [
    {"probe": "test.Test", "detector": "always.Pass", "passed": 20, "fails": 0, "nones": 0, "total_evaluated": 20},
    {"probe": "test.Test", "detector": "mitigation.MitigationBypass", "passed": 0, "fails": 0, "nones": 20, "total_evaluated": 0},
]
conn, cur = rd._init_populate_result_db(evals)
print(rd._get_probe_group_summaries(cur, "test"))
for fn in ("lower_quartile", "mean", "minimum"):
    print(fn, rd._get_group_aggregate_score(cur, "test", fn)[0])
[('test', 'Test', 0.0)]
lower_quartile 0.25
mean 0.5
minimum 0.0

The probe score is 0.0 because _get_probe_group_summaries takes min(score) across detectors, and every group aggregation counts the unscored row as a 0.

Expected behavior

A pairing with nothing evaluated should be treated as not scored, not as a total failure. In the second example the probe and group should come out at 1.0, from the one detector that did score.

The digest already does this for the technique/intent matrix: technique_intent_matrix sets "score": None when the total is 0. The results table is the part that doesn't.

Current behavior

garak/analyze/report_digest.py, _init_populate_result_db:

python
instances = eval.get("total_evaluated", eval.get("total", None))
score = passes / instances if instances else 0

instances == 0 falls through to score = 0, and that row feeds the detector entry, the probe score (min), the group score (scoring.aggregate) and TBSA, which reads absolute_score/absolute_defcon from the digest.

Fixing it isn't just a matter of changing the 0 to None: garak.analyze.score_to_defcon(None, ...) raises TypeError, so the group/probe/detector paths would need to skip or handle the unscored rows. Skipping the insert when instances == 0, or storing NULL and filtering it in those queries, both look workable; I'm not sure how you'd want an all-skipped probe shown in the HTML report.

This isn't covered by #2210 / #2209 (those are analyze_log and qual_review) or #1954 (evaluator ASR denominator); neither touches the digest.

garak version

Source checkout at 8d1259ef (0.17.1.pre1)

Additional Information

  1. Windows 11
  2. Python 3.12.10
  3. Editable uv pip install -e ".[tests]" from a git checkout
  4. Eval row from the report is above; happy to attach the full report.jsonl if useful
  5. Command line above, no config file
  6. n/a

I'd like to work on a fix for this if it's wanted.