Skip to content

fix(snapshot): handle stale dedup references and empty baselines#549

Merged
bobleer merged 1 commit intoGCWing:mainfrom
bobleer:feat/snapshot-dedup-reference-safety
Apr 26, 2026
Merged

fix(snapshot): handle stale dedup references and empty baselines#549
bobleer merged 1 commit intoGCWing:mainfrom
bobleer:feat/snapshot-dedup-reference-safety

Conversation

@bobleer
Copy link
Copy Markdown
Collaborator

@bobleer bobleer commented Apr 26, 2026

Summary

  • Only treat stored content as a deduplicated Reference when the backing content file still exists (avoids stale hash map entries after disk changes).
  • When building snapshot rows, use empty compressed bytes for Reference content instead of unreachable! (matches empty restore path).
  • Add an async core test that creates an empty baseline, snapshots an empty file, and asserts restore is empty without panicking.
  • Rustfmt-only touch-ups in agentic modules and the Anthropic stream processor test.

Testing

  • cargo test -p bitfun-core

- Only emit OptimizedContent::Reference when the content file still exists on disk

- Build compressed row with empty data for Reference instead of unreachable

- Add async test covering empty-baseline dedup without panic

- Apply rustfmt to touched agentic modules and stream processor test
@bobleer bobleer merged commit 50ad4f4 into GCWing:main Apr 26, 2026
4 checks passed
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.

1 participant