Skip to content

perf(snapshot): make checkpoint publication async and deduplicated (#67) - #110

Closed
leinasi2014 wants to merge 5 commits into
mainfrom
codex/issue-67-snapshot-io-v2
Closed

leinasi2014 wants to merge 5 commits into
mainfrom
codex/issue-67-snapshot-io-v2

Conversation

@leinasi2014

Copy link
Copy Markdown
Owner

Summary

Finishes the remaining Issue #67 hot-path work after #88 already bounded Python snapshot traversal/context preflight.

  • chunked Host checkpoint commit uses awaited fs/promises I/O and stays inside the cell settlement barrier
  • the exact validated Buffer assembled from checkpoint chunks is consumed once by the Session runtime; durable publication no longer immediately rereads that snapshot synchronously
  • restore-frame reads are asynchronous
  • durable publication uses awaited exclusive temp/write/fsync/rename/directory-sync
  • identical durable content is skipped only when both content hash and the current file fingerprint match the last validated/published generation, so an external replacement cannot be hidden by cache
  • reset/rescan invalidate dedup state
  • real regressions prove unchanged checkpoint content does not rewrite the durable generation and that eval settles only after the durable generation is immediately restorable
  • adds pnpm bench:snapshot for repeatable 0.5/2/6 MiB ephemeral/durable measurements (p50/p95, event-loop p95, peak heap, durable bytes); benchmark has no noisy shared-runner threshold

This intentionally does not reopen #88's already-fixed bounded Python traversal and leaves startup/rescan/reset synchronous because they are not the repeated per-cell hot path.

Final Windows + Ubuntu + development-memory CI is required before merge.

Closes #67.

@leinasi2014

Copy link
Copy Markdown
Owner Author

Superseded by #111 which merged to main (46ce7ff).

@leinasi2014 leinasi2014 closed this Sep 6, 2026
@leinasi2014
leinasi2014 deleted the codex/issue-67-snapshot-io-v2 branch September 6, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] perf(snapshot): bound serialization work and remove redundant synchronous checkpoint I/O

1 participant