Keep a failed node's traceback on the run

The worker already sent it and the log panel already got it; the failure
outcome kept the one-line error and the node's stdout and dropped the
rest, so reading a failure back meant reproducing it under `run --local`.
It rides in the node's logs now — no schema change, and the API row, the
run detail page and `RunHandle.failures` carry it as they are.

`_record_node` keeps the tail of the log cap rather than the head, so a
chatty node cannot push the traceback past it, and `fluksio run` prints
what each node said when a run does not end ok.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXQv6KNyyvY7Z1etYTUUAd
This commit is contained in:
2026-08-31 07:52:24 +02:00
co-authored by Claude Opus 5
parent 4ac3de38e2
commit 9a5371d4c7
5 changed files with 76 additions and 3 deletions
+4
View File
@@ -120,6 +120,10 @@ def test_observer_reports_a_failing_node_with_its_error():
assert len(seen) == 1
assert not seen[0].ok
assert "no convergence" in seen[0].error
# The traceback rides along in the logs, so a failure can be read back off
# the run rather than reproduced under `run --local`.
assert "Traceback" in seen[0].logs
assert "ValueError: no convergence" in seen[0].logs
def test_a_failing_observer_does_not_take_the_node_down():