Commit Graph
2 Commits
Author SHA1 Message Date
Niko1221 77c344bdd0 serve: the picture guard inside the replaced-reply rule; its log line marked [DRAFT]
live_tail_is_replaced_reply() takes the live branch's picture positions and answers "park as before" when one is at or past the resume point (unit case picture_at_or_past_checkpoint_parks in reply_branch_test, 16 cases); generate.cpp passes live_imgs' starts instead of checking them beside the call. Same behaviour: a chat request's reply holds no picture, so the guard does not fire from the chat API.
The engine log line of P3 now starts with "[DRAFT] " until the owner words it (par\OWNER-WORDING-1111.md).

Lane AGENT-TURN, P3 follow-up.
2026-11-11 16:27:28 +01:00
Niko1221 5e41f69844 serve: no park of the reply a request replaces
A request that resumes from a checkpoint parks the live branch first. When that checkpoint is the live branch's own turn checkpoint (the history before its last assistant turn), the live branch holds nothing else past it, and the prompt opens the same assistant turn there again, the client has re-sent the history with that reply dropped (an OpenAI-style client sends every earlier reply back without its reasoning), edited, or regenerated. That branch is no longer parked: no request of the client sends the reply back as it was, and the park copied the whole conversation to host memory on the request's path (131-209 ms per turn at 2K-20K on an R9700, lane PERF-AUDIT's chat run) for a copy the next park dropped as superseded.

The rule is live_tail_is_replaced_reply() (include/strata/program/reply_branch.hpp, test src/program/reply_branch_test.cpp): live[resume] and ids[resume] open a turn with the same role token, live has no other turn after it, and both agree before resume. generate.cpp asks it only when nothing else comes in (no parked conversation restored, no borrow, no batch slot, no lent slot, same cvec, no pin sibling) and the live branch has no picture at or past resume. Reuse is unchanged: the request reads from the same checkpoint as before. A real switch to another conversation parks as before. New engine log line [DRAFT]: "conversation cache: the reply this request replaces is not parked (N tokens past the turn checkpoint at M)".

Lane AGENT-TURN, P3.
2026-11-11 15:40:18 +01:00