mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-19 23:05:21 +00:00
* fix(server): move updatedAt when archiving an agent that is only in storage Archiving a loaded agent sets its updatedAt to the archive time (markRecordArchived). Archiving an agent that is only in storage, which is also how a parent's archive reaches its children, kept the old updatedAt. Lists sorted by updated_at, such as History, then left a just-archived agent where its last turn put it, sometimes days back, and clients paging such a list by time never reached it. archiveSnapshotUnlocked now records the archive time as updatedAt too. Co-authored-by: RoundRedDot <roundreddot@gmail.com> * fix(server): keep updatedAt from moving back when an archive is restored Archiving a stored-only agent now sets updatedAt to the archive time. When the archive time is earlier than the record's updatedAt, as when a failed send or resume puts an agent's original archive back after unarchiving it, updatedAt stays where it is. Clients drop agent updates that are older than the one they hold, so moving it back left them showing the agent active. Co-authored-by: luke <luopeihuan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(server): keep updatedAt from moving back when a loaded agent's archive is restored The rule that archiving never moves updatedAt backwards now lives in buildArchivedAgentRecord, which both archive paths use. A failed send that resumed the agent before a later loading step failed puts its original archive back through the loaded path, which had the same backwards move. The workspace archive stamp test now uses stamps taken after the agents' activity, as real archive stamps are. Co-authored-by: luke <luopeihuan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(server): require the archive time when building an archived agent buildArchivedAgentRecord no longer accepts an archive that leaves updatedAt unset, the gap #9920 came through, and its tests now assert the rule: a later archive time moves updatedAt, an earlier one keeps it. Co-authored-by: luke <luopeihuan@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: luke <luopeihuan@gmail.com> Co-authored-by: RoundRedDot <roundreddot@gmail.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>