Fix DS stale state after DO reset by broadcasting delete events#139
Merged
koenvanderveen merged 2 commits intomainfrom Feb 18, 2026
Merged
Fix DS stale state after DO reset by broadcasting delete events#139koenvanderveen merged 2 commits intomainfrom
koenvanderveen merged 2 commits intomainfrom
Conversation
koenvanderveen
added a commit
that referenced
this pull request
Feb 18, 2026
When a DO deletes their SyftBox, the DS still showed stale state (datasets, file_hashes) from the previous session. Fix by broadcasting is_deleted=True events for all tracked files to each approved peer's outbox before cleanup. Also clean up stale dataset collections on DS when they no longer exist remotely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1c38752 to
3034fb2
Compare
When a DO deletes their SyftBox, the DS still showed stale state (datasets, file_hashes) from the previous session. Fix by broadcasting is_deleted=True events for all tracked files to each approved peer's outbox before cleanup. Also clean up stale dataset collections on DS when they no longer exist remotely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3034fb2 to
afafadc
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
delete_syftbox(), broadcastis_deleted=Trueevents for all tracked files to each approved peer's outbox before cleanup_cleanup_stale_dataset_collectionsto DS watcher cache to remove locally cached datasets that no longer exist remotelydelete_directory()to both in-memory and filesystem cache connectionsdelete_multiple_files_by_idsto work with mock drive services (fallback to individual deletes)broadcast_delete_events=Falseparam for test cleanup callsTest plan
test_ds_stale_state_cleared_after_do_delete_syftboxpassesuv run pytest tests/unit/ -n auto)uv run python scripts/repro_reset_bugs.py)🤖 Generated with Claude Code