Session archive mirror: close does not await the final mirror, and extend reads whole files #94

Open
opened 2026-10-17 00:45:11 +00:00 by claude · 0 comments
Member

Found during iterative-works/procedures PROC-673 (worker sessions now pass an ArchiveConfig, so the mirror runs in production).

  • Session scope close does not await the final mirror — session scope close only signals the reader fiber (interruptFork), so onClose final mirror is not guaranteed to run or finish; closeAll does not wait for it as the docs assume. Also makes mirror cleanup in real-CLI specs racy.
  • ArchiveMirror.extendInPlace reads two whole files per mirror — a chunked prefix check would make it O(delta). Measured extend of 8.5 MB: 70 ms, so not blocking.
Found during iterative-works/procedures PROC-673 (worker sessions now pass an `ArchiveConfig`, so the mirror runs in production). - [ ] Session scope close does not await the final mirror — session scope close only signals the reader fiber (`interruptFork`), so `onClose` final mirror is not guaranteed to run or finish; `closeAll` does not wait for it as the docs assume. Also makes mirror cleanup in real-CLI specs racy. - [ ] `ArchiveMirror.extendInPlace` reads two whole files per mirror — a chunked prefix check would make it O(delta). Measured extend of 8.5 MB: 70 ms, so not blocking.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/claude-code-query#94
No description provided.