issue: update 3ca0 - Phase 3 should implement SyncLevel per design, not full confirmation

This commit is contained in:
DanConwayDev
2026-02-13 17:34:56 +00:00
parent 35a3abc8bb
commit f59601a8eb
+17 -11
View File
@@ -45,15 +45,23 @@ This prevents serving announcements for repositories that may never receive stat
- Cleanup task handles announcement expiry
- Updated count()/cleanup() to 3-tuples
- [ ] Phase 3: Fix sync integration (ROOT CAUSE of test failure)
- Sync module treats purgatory announcements as "not confirmed" so
per-repo sync (state events, PRs) never triggers for them
- Partial fix in commit 1d09e4b: ProcessResult::Purgatory now counts
as confirmed for pending_sync_index, and announcements going to
purgatory invalidate rejected state events from hot cache
- Still failing: test_archive_read_only_creates_bare_repo (30s timeout)
- Need to verify the partial fix is correct and sufficient, or if
additional sync plumbing is needed
- [ ] Phase 3: Implement SyncLevel and fix sync integration (ROOT CAUSE of test failure)
- The sync module doesn't fetch state events for purgatory announcements
because they're not saved to DB and thus never "confirmed" as repos
- The fix per design doc (decision #6) is SyncLevel, NOT treating
purgatory as fully confirmed. Full confirmation would over-fetch
L2/L3 events (PRs, issues) that get rejected anyway.
- Add SyncLevel enum (StateOnly vs Full) to RepoSyncNeeds
- When announcement enters purgatory, register in sync index with
SyncLevel::StateOnly (only fetches kind 30618 state events)
- On promotion, upgrade sync level to Full
- Modify filter building in src/sync/filters.rs to partition repos
by sync level and build appropriate filters
- Revert the partial fix in commit 1d09e4b that treats
ProcessResult::Purgatory as confirmed in pending_sync_index
(wrong approach - would trigger full L2/L3 sync)
- Keep the hot cache invalidation for rejected state events (correct)
- This should fix test_archive_read_only_creates_bare_repo
- [ ] Phase 4: Announcement persistence (save/restore)
- save_to_disk() and restore_from_disk() skip announcement_purgatory
@@ -63,8 +71,6 @@ This prevents serving announcements for repositories that may never receive stat
- Need persistence tests (purgatory_persistence.rs currently asserts 0)
- [ ] Phase 5: Remaining design features
- SyncLevel (StateOnly vs Full) - purgatory announcements should only
sync state events, not L2/L3 events
- Soft expiry two-phase - delete bare repo but retain event for 24h,
allow revival on state event arrival
- Expiry extension - extend_announcement_expiry() exists but is never