diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-10 21:55:31 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-10 21:57:02 +0000 |
| commit | 46b306dcfa4850a688367c04e9e06e8d9c2883dc (patch) | |
| tree | 6606ef21a60dbc8441dc97f960bf3684f51775bf /tests/git_clone.rs | |
| parent | 466a009d8248aab274a9da419e4c0d83a4b9f466 (diff) | |
fix: enable Layer 3 sync by adding root events to pending queue
When root events (issues/patches) are received via self-subscription,
handle_root_event() was only updating the repo_sync_index directly.
This caused process_batch() to early-return when pending.is_empty(),
so Layer 3 filters for comments/replies were never created.
The fix adds root events to both:
1. repo_sync_index (for immediate availability)
2. pending queue (to trigger Layer 3 filter creation in next batch)
Critical: The pending entry must include relays from repo_sync_index
so derive_relay_targets() knows where to send Layer 3 subscriptions.
The Layer 3 test now verifies that events sent BEFORE the subscription
is established are still synced - proving subscriptions without 'since'
correctly fetch historical events.
Enabled 4 previously ignored Layer 3 tests:
- test_live_sync_layer3_events
- test_layer3_sync_with_lowercase_e_tag
- test_layer3_sync_with_uppercase_e_tag
- test_layer3_sync_with_q_tag
Diffstat (limited to 'tests/git_clone.rs')
0 files changed, 0 insertions, 0 deletions