Two backend root causes the Chat webapp currently defends against client-side (Chat #39 C5) but that should be fixed at the source:
_sse / chat_engine serialize Phase-1 tool payloads with Python json that emits bare NaN/Infinity literals (e.g. PaceOutput.delta_vs_median at a new circuit). Standard JSON.parse rejects these, so a client without a sanitized-retry drops the whole tool_result frame. Fix: sanitize non-finite floats to null (or use allow_nan=False + replace) when building the SSE data.
_build_tool_result_payload sets summary only on tool_error (empty string on success), so any consumer using summary as the human-readable line gets nothing for successful runs. Fix: populate a short success summary.
Also noted: is_valid on lap_times actually carries IsPersonalBest (telemetry_service.py:216) — a semantic wart that makes nearly every lap render as an 'invalid' dot.
Two backend root causes the Chat webapp currently defends against client-side (Chat #39 C5) but that should be fixed at the source:
_sse/chat_engineserialize Phase-1 tool payloads with Python json that emits bareNaN/Infinityliterals (e.g. PaceOutput.delta_vs_median at a new circuit). Standard JSON.parse rejects these, so a client without a sanitized-retry drops the whole tool_result frame. Fix: sanitize non-finite floats to null (or useallow_nan=False+ replace) when building the SSE data._build_tool_result_payloadsetssummaryonly on tool_error (empty string on success), so any consumer usingsummaryas the human-readable line gets nothing for successful runs. Fix: populate a short success summary.Also noted:
is_validon lap_times actually carries IsPersonalBest (telemetry_service.py:216) — a semantic wart that makes nearly every lap render as an 'invalid' dot.