Follow-up to #646 and the implementation in #650.
Problem
Every streamed reasoning update currently supersedes the active snapshot and aborts its provisional Gemma request. During a long, continuously updating thought, the 1-, 5-, and 15-second attempts can all be cancelled, leaving Thinking... visible until final label generation begins after the thought ends.
This came from the important race-safety requirement that a label from an older reasoning snapshot must not arrive late, overwrite a newer summary, or become the retained fallback.
Proposed compromise
Treat the bounded 1-, 5-, and 15-second samples as the authoritative provisional generations. Buffer intervening reasoning for the next sample instead of aborting the current request on every streamed delta. A newer sample, newer thought, terminal transition, deletion, history replacement, or unmount still aborts and invalidates obsolete work, and generation guards ensure only the newest valid request can commit.
Add continuous-stream and out-of-order lifecycle tests for this behavior.
Follow-up to #646 and the implementation in #650.
Problem
Every streamed reasoning update currently supersedes the active snapshot and aborts its provisional Gemma request. During a long, continuously updating thought, the 1-, 5-, and 15-second attempts can all be cancelled, leaving Thinking... visible until final label generation begins after the thought ends.
This came from the important race-safety requirement that a label from an older reasoning snapshot must not arrive late, overwrite a newer summary, or become the retained fallback.
Proposed compromise
Treat the bounded 1-, 5-, and 15-second samples as the authoritative provisional generations. Buffer intervening reasoning for the next sample instead of aborting the current request on every streamed delta. A newer sample, newer thought, terminal transition, deletion, history replacement, or unmount still aborts and invalidates obsolete work, and generation guards ensure only the newest valid request can commit.
Add continuous-stream and out-of-order lifecycle tests for this behavior.