feat(channels): add no-op after_checkpoint hook to BaseChannel

This commit is contained in:
Sydney Runkle
2026-04-22 14:03:36 -04:00
parent d0af83b746
commit c345d337bb
@@ -119,3 +119,12 @@ class BaseChannel(Generic[Value, Update, Checkpoint], ABC):
Returns `True` if the channel was updated, `False` otherwise.
"""
return False
def after_checkpoint(self, version: Any) -> None:
"""Called after checkpoint() with the assigned version, and after
from_checkpoint() with the current channel version.
No-op by default. Override in channels that track their own version
for incremental checkpointing (e.g. DiffChannel).
"""
pass