Files
Pulse/docs/release-control
rcourtman 6aef85ac88 fix: keep streamed chat summary prefix before a leaked tool call (#3004)
Since 51a45493d1 the final summary turn discarded any clean prefix it
had already streamed whenever the model then leaked a textual tool call,
and appended the generic fallback instead. Interactive chat showed
prefix plus fallback while persisting only the fallback, so a reload no
longer matched what streamed.

- Interactive chat keeps the non-empty clean prefix as the final
message; it falls back only when the trimmed prefix is empty.
- Patrol investigations still reject a leaked summary with the failure
receipt and error. The orchestrator classifies unmarked prose as
NEEDS_ATTENTION (terminal), so a model that was still investigating must
not become a conclusion; the run stays eligible for the next scheduled
check.
- ai-runtime contract note added under "Incomplete investigation
follow-up".

Tests: `TestInteractiveFinalSummaryKeepsCleanPrefixBeforeLeakedToolCall`
(fails on main, passes here) and
`TestInvestigationFinalSummaryWithLeakedToolCallIsNotAConclusion`, plus
the existing final-summary and incomplete-investigation tests.
2026-10-17 00:23:23 +01:00
..