Skip to content

fix(prefill): preserve unrelated snapshots during jobs - #188

Merged
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/precise-snapshot-reservation-0717
Jul 17, 2026
Merged

fix(prefill): preserve unrelated snapshots during jobs#188
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/precise-snapshot-reservation-0717

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Summary

  • reserve the configured conservative final-snapshot estimate instead of the worker's entire cache budget
  • retain atomic final publication and adaptive-shrink protection from PR fix(prefill): atomically reserve and publish snapshots #187
  • preserve unrelated Generator and Critic snapshots across subsequent Prefill jobs
  • add regression coverage proving old and new content-addressed snapshots coexist

Root cause

The first real full-context run succeeded after PR #187, but its full-budget reservation evicted every existing snapshot at each new job. A later Generator miss therefore erased the prior Critic snapshot, preventing cold restore despite correct atomic publication.

For the measured 1,010-token Critic, the configured reservation is about 404 MB while the actual imported final snapshot is roughly 90 MB. The 1+ GiB cache budget safely accommodates the estimate and unrelated snapshots.

Tests

  • precise reservation and unrelated snapshot preservation — 27 targeted tests pass
  • full platform-neutral suite — 867 passed, 1 skipped
  • Python compile and diff checks pass

Made with Cursor

Reserve only the conservative final-snapshot estimate so atomic publication remains protected without erasing Generator or prior Critic snapshots needed for cold restore.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@FluffyAIcode
FluffyAIcode merged commit d465829 into main Jul 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant