- stop() restores the original predict_action_chunk so the policy object is
not left permanently patched after the engine goes away
- snapshot the chunk anchor with clone() (guarded against None on the first
tick) so it survives any future in-place mutation of the cached state
- document the engine->step action_names lazy-fill and the torch.compile
ordering the probe relies on
- add tests for reset() re-anchoring across episodes and stop() probe restore
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the relative-action anchor mechanism from "adding relative actions
to sync engine" with one that detects fresh chunks through the public
predict_action_chunk contract instead of introspecting the policy's private
_action_queue. Drops set_hold/_hold_state in favour of a set_cached_state
snapshot/restore, keeps select_action on the hot path (so the prediction-
visualization path is unaffected), and refreshes the anchor every tick for
policies that never chunk.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>