Port of the conversation block of generate.cpp as a device-independent policy
(ConversationManager over a SessionEngine): park_current with the RAM
admission rule, the live/checkpoint/parked resume choice, parked-image
validation and fallback, steering isolation, the root-pinned turn/periodic
checkpoint chain, STRATA_CKPT_REREAD, cancelled prompts and the end-of-request
live-state update, plus the PromptPlan bookkeeping hook.
Verified three ways: (1) a simulated device whose bytes are a pure function of
the token prefix proves that every resume path (live, checkpoint, parked live,
parked checkpoint, empty) leaves the device in exactly the state of a fresh
read of ids[..resume], across 16 random traffic seeds; (2) scenario tests for
A/B/A parking, rewritten tails, pinned root rotation, RAM/byte/slot pressure,
invalid and failing restores; (3) a differential test against 28 random +
4 scripted (#342 sub-agent) traces generated by the transliterated C++ policy
running over the real ConversationCache/eviction_victim/memory admission.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>