upravy skillu
This commit is contained in:
@@ -394,6 +394,17 @@ class TestRendering:
|
||||
report = reflect_auto.render_report(merged, _stats(), None, WHEN)
|
||||
assert "REGRESSION" in report
|
||||
|
||||
def test_a_regression_outranks_a_higher_severity_finding(self):
|
||||
"""Severity is the model's per-run guess and drifts; `regression_of` is a fact from the audit."""
|
||||
applied = _filed(status="applied", applied={"at": "2026-07-01", "sha": "abc1234", "file": "SOUL.md"})
|
||||
regression = _raw_finding(severity="low")
|
||||
louder = _raw_finding(pattern="speculation-presented-as-fact", severity="high", occurrences=3, sessions_affected=2)
|
||||
merged = reflect_auto.merge_findings([applied], _parsed(_answer(louder, regression)), TODAY)
|
||||
report = reflect_auto.render_report(merged, _stats(), None, WHEN)
|
||||
|
||||
assert [f.status for f in merged] == [reflect_auto.STATUS_OPEN] * 2, "both must be open for the order to matter"
|
||||
assert report.index("`retry-without-diagnosis`") < report.index("`speculation-presented-as-fact`")
|
||||
|
||||
def test_report_renders_a_patch_as_a_diff(self):
|
||||
raw = _raw_finding(patch={"file": "a.md", "old_text": "try again", "new_text": "STOP"})
|
||||
merged = reflect_auto.merge_findings([], _parsed(_answer(raw)), TODAY)
|
||||
|
||||
Reference in New Issue
Block a user