A restored node whose source run is gone says its curve was lost

The run detail works out curve_lost per node when read, from whether its
cached_from run still exists. The run page names the deleted run in place
of the generic NO_CURVE note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 10:22:09 +02:00
co-authored by Claude Opus 5.5
parent df2620cede
commit f0bddc56a4
7 changed files with 50 additions and 10 deletions
+5
View File
@@ -1108,6 +1108,11 @@ def test_a_curve_whose_run_is_gone_is_empty_rather_than_an_error(
)
assert answer.status_code == 200
assert answer.json() == []
# And the run says why, rather than leaving an empty chart to explain itself.
(node,) = client.get(
f"{settings.API_V1_STR}/runs/reuse-1", headers=superuser_token_headers
).json()["nodes"]
assert node["curve_lost"] is True
def _metric(run_id: str, name: str, step: int, value: float, ts: float) -> RunMetric: