Commit ·
9f5b58c
1
Parent(s): 0e64f6b
[NOTICKET] fix(report): no default chart for descriptive evidence
Browse files- Since 0e64f6ba a descriptive answer's report evidence is its statistics
table (column, count, mean, median, std, min, max).
- analyze_descriptive draws no chart, so _default_chart built one from the
first measure, `count`: "Count by column" with identical bars (1080 x 4 on
the test-demo Q13 record).
- The other statistics mix units (PA in %, MTBS/MTTR in hours), so no single
bar chart reads right.
- _default_chart now returns None when the record ran analyze_descriptive;
the statistics table stays, rankings keep their default chart.
- Reported by Rifqi in the review of 3 Nov.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/agents/report/anchored.py
CHANGED
|
@@ -785,6 +785,15 @@ def _default_chart(info: RecordInfo, lang: str) -> dict | None:
|
|
| 785 |
"""
|
| 786 |
if not info.evidence_raw:
|
| 787 |
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 788 |
cols, rows = info.evidence_raw
|
| 789 |
if len(rows) < 2:
|
| 790 |
return None
|
|
|
|
| 785 |
"""
|
| 786 |
if not info.evidence_raw:
|
| 787 |
return None
|
| 788 |
+
# A descriptive table's first measure is `count`, equal for every column: the
|
| 789 |
+
# default bar was "Count by column" with identical bars (review 2026-11-03). Its
|
| 790 |
+
# other stats mix units (% vs hours), so no single bar reads right — table only.
|
| 791 |
+
if any(
|
| 792 |
+
o.tool == "analyze_descriptive"
|
| 793 |
+
for r in info.record.results_snapshot.values()
|
| 794 |
+
for o in r.outputs
|
| 795 |
+
):
|
| 796 |
+
return None
|
| 797 |
cols, rows = info.evidence_raw
|
| 798 |
if len(rows) < 2:
|
| 799 |
return None
|