@@ -139,6 +139,7 @@ def test_summary_report_times_spec_structure_and_ordering(tmp_path):
139139 report = _embedded_report (output .read_text (encoding = "utf-8" ))
140140 assert report ["schemaVersion" ] == "1.1"
141141 assert report ["type" ] == "report"
142+ assert report ["title" ] == "Summary Report"
142143
143144 # Exact section hierarchy
144145 sections = report ["sections" ]
@@ -153,23 +154,28 @@ def test_summary_report_times_spec_structure_and_ordering(tmp_path):
153154
154155 # Section titles
155156 assert [s ["title" ] for s in sections ] == [
156- "Event Risk " ,
157+ "Event Probability " ,
157158 "Calibration" ,
158159 "Discrimination" ,
159160 "Utility" ,
160161 "Performance Table" ,
161162 ]
162163
163- # Event Risk section checks
164+ # Event Probability section checks
164165 event_risk_sec = sections [0 ]
166+ assert event_risk_sec ["id" ] == "event-risk"
167+ assert event_risk_sec ["title" ] == "Event Probability"
165168 assert [c ["id" ] for c in event_risk_sec ["items" ]] == ["event-risk" ]
169+ assert event_risk_sec ["items" ][0 ]["title" ] == "Event Probability"
166170 assert event_risk_sec ["items" ][0 ]["spec" ]["schemaVersion" ] == "1.1"
167171 assert event_risk_sec ["items" ][0 ]["spec" ]["type" ] == "summary_metrics"
172+ assert event_risk_sec ["items" ][0 ]["spec" ]["title" ] == "Event Probability"
168173 assert event_risk_sec ["items" ][0 ]["spec" ]["metrics" ][0 ]["metric" ] == "event_risk"
169174
170175 # Explicit omissions check
171176 assert "prevalence" not in section_ids
172177 assert "auroc" not in json .dumps (report )
178+ assert "prediction-distribution" not in section_ids
173179
174180 # Calibration section components
175181 calib = sections [1 ]
@@ -185,30 +191,30 @@ def test_summary_report_times_spec_structure_and_ordering(tmp_path):
185191 assert g1 ["title" ] == "By Probability Threshold"
186192 assert [c ["id" ] for c in g1 ["components" ]] == [
187193 "roc" ,
194+ "lift" ,
188195 "precision-recall" ,
189196 "gains" ,
190- "lift" ,
191197 ]
192198 assert [c ["title" ] for c in g1 ["components" ]] == [
193199 "ROC" ,
200+ "Lift" ,
194201 "Precision-Recall" ,
195202 "Gains" ,
196- "Lift" ,
197203 ]
198204
199205 assert g2 ["id" ] == "discrimination-ppcr"
200206 assert g2 ["title" ] == "By Predicted Positives Condition Rate (PPCR)"
201207 assert [c ["id" ] for c in g2 ["components" ]] == [
202208 "roc-2" ,
209+ "lift-2" ,
203210 "precision-recall-2" ,
204211 "gains-2" ,
205- "lift-2" ,
206212 ]
207213 assert [c ["title" ] for c in g2 ["components" ]] == [
208214 "ROC" ,
215+ "Lift" ,
209216 "Precision-Recall" ,
210217 "Gains" ,
211- "Lift" ,
212218 ]
213219
214220 # Utility section components
@@ -311,12 +317,13 @@ def test_summary_report_times_preserves_standalone_canonical_producers(tmp_path)
311317
312318 report_event_risk = report ["sections" ][0 ]["items" ][0 ]["spec" ]
313319 assert report_event_risk ["schemaVersion" ] == "1.1"
320+ assert report_event_risk ["title" ] == "Event Probability"
314321 report_calib_smooth = report ["sections" ][1 ]["items" ][0 ]["spec" ]
315322 report_roc_thresh = report ["sections" ][2 ]["items" ][0 ]["components" ][0 ]["spec" ]
316- report_pr_thresh = report ["sections" ][2 ]["items" ][0 ]["components" ][1 ]["spec" ]
323+ report_lift_thresh = report ["sections" ][2 ]["items" ][0 ]["components" ][1 ]["spec" ]
324+ report_pr_thresh = report ["sections" ][2 ]["items" ][0 ]["components" ][2 ]["spec" ]
317325 report_roc_ppcr = report ["sections" ][2 ]["items" ][1 ]["components" ][0 ]["spec" ]
318- report_gains_ppcr = report ["sections" ][2 ]["items" ][1 ]["components" ][2 ]["spec" ]
319- report_lift_thresh = report ["sections" ][2 ]["items" ][0 ]["components" ][3 ]["spec" ]
326+ report_gains_ppcr = report ["sections" ][2 ]["items" ][1 ]["components" ][3 ]["spec" ]
320327 report_dc = report ["sections" ][3 ]["items" ][0 ]["spec" ]
321328 report_ia = report ["sections" ][3 ]["items" ][1 ]["spec" ]
322329 report_table_thresh = report ["sections" ][4 ]["items" ][0 ]["components" ][0 ]["spec" ]
0 commit comments