<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/tests/sync.rs, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/atom?h=master</id>
<link rel='self' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/'/>
<updated>2026-01-09T16:17:25+00:00</updated>
<entry>
<title>feat(sync): invalidation + immediate re-processing of maintainer announcements</title>
<updated>2026-01-09T16:17:25+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-09T16:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=83d29a446d96f87e5c947faf49fb33f18db4fc17'/>
<id>urn:sha1:83d29a446d96f87e5c947faf49fb33f18db4fc17</id>
<content type='text'>
- Add two-tier rejected events index (hot cache + cold index)
- Hot cache: 2-minute in-memory storage of full rejected events
- Cold index: 7-day metadata storage for deduplication
- Immediate re-processing when owner announcements list maintainers
- Fix rejection reason detection to match actual error messages
- Rewrite integration tests to use two-relay sync pattern
- All tests passing (3 passed, 1 ignored slow test)
</content>
</entry>
<entry>
<title>test: clear names for sync tests</title>
<updated>2025-12-19T09:25:34+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-19T09:25:34+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=15452be55e727552df10e11facfaf67700845e3a'/>
<id>urn:sha1:15452be55e727552df10e11facfaf67700845e3a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: migrate historic_sync.rs tests to use run_sync_test() helper</title>
<updated>2025-12-18T17:07:30+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-18T17:07:30+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=d7ea44d5b594763116175325be06c1125983490a'/>
<id>urn:sha1:d7ea44d5b594763116175325be06c1125983490a</id>
<content type='text'>
- Refactored all 4 tests in historic_sync.rs to use run_sync_test()
- Tests maintain same logic and assertions, only setup simplified
- Moved run_sync_test() and SyncTestResult outside #[cfg(test)] module
- Updated validation to allow empty event slices (for announcement-only tests)
- All 4 historic_sync tests passing (test_bootstrap_syncs_existing_layer2_events, test_relay_replays_events_after_restart, test_announcement_not_listing_relay_is_not_synced, test_history_sync_without_negentropy)
- Result: 39/40 tests passing (1 more than Phase 1 baseline of 38/40)
</content>
</entry>
<entry>
<title>fix: resolve all fmt and clippy warnings</title>
<updated>2025-12-11T16:53:03+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-11T16:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=2a9160836bb87fdea3ae891563b0169c68d1c2ab'/>
<id>urn:sha1:2a9160836bb87fdea3ae891563b0169c68d1c2ab</id>
<content type='text'>
Main lib (src/):
- Add #[allow(dead_code)] for build_info field (stored to prevent Prometheus unregistration)
- Add #[allow(dead_code)] for first_seen field (reserved for future rate limiting)
- Replace .or_insert_with(RelaySyncNeeds::default) with .or_default()
- Replace manual div_ceil implementations with .div_ceil(100)

Test code (tests/):
- Replace .expect(&amp;format!(...)) with .unwrap_or_else(|_| panic!(...))
- Remove needless borrows in fetch_metrics() calls
- Add #[allow(dead_code)] and #[allow(unused_imports)] to test helpers module

grasp-audit:
- Apply cargo fmt to fix formatting
</content>
</entry>
<entry>
<title>refactor: move metrics tests to tests/sync/ structure (Phase 7)</title>
<updated>2025-12-11T08:47:08+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-11T08:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=61d4796d84960ec9f25392635afceea3a3bd0916'/>
<id>urn:sha1:61d4796d84960ec9f25392635afceea3a3bd0916</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Phase 8: Create catchup sync stub test</title>
<updated>2025-12-10T16:31:47+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-10T16:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=5f3c8b7085f6652fdde4443983df0aad561e3c67'/>
<id>urn:sha1:5f3c8b7085f6652fdde4443983df0aad561e3c67</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Phase 7: Implement tag variation tests</title>
<updated>2025-12-10T16:26:50+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-10T16:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=bb9abe353024878e6bf1884cf3fb5a115e75bd03'/>
<id>urn:sha1:bb9abe353024878e6bf1884cf3fb5a115e75bd03</id>
<content type='text'>
Add comprehensive tests for different Layer 2 and Layer 3 tag variations:

Layer 2 tests (Tests 8a-c) - all pass:
- test_layer2_sync_with_lowercase_a_tag (standard NIP-01)
- test_layer2_sync_with_uppercase_a_tag (NIP-33)
- test_layer2_sync_with_q_tag (NIP-18 quotes)

Layer 3 tests (Tests 9a-c) - marked #[ignore]:
- test_layer3_sync_with_lowercase_e_tag (NIP-01)
- test_layer3_sync_with_uppercase_e_tag (NIP-22)
- test_layer3_sync_with_q_tag (NIP-18)

Layer 3 tests have full implementation but are ignored until
Layer 3 sync is enabled in the relay.
</content>
</entry>
<entry>
<title>Phase 6: Implement live sync tests</title>
<updated>2025-12-10T16:22:19+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-10T16:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=f49644963369ea45ca1856e8e5c6c2e7a33b3aa7'/>
<id>urn:sha1:f49644963369ea45ca1856e8e5c6c2e7a33b3aa7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Phase 5: Migrate bootstrap and discovery tests</title>
<updated>2025-12-10T16:13:51+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-10T16:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=d08878d0b9a8738e57e457a916677d2061775cbd'/>
<id>urn:sha1:d08878d0b9a8738e57e457a916677d2061775cbd</id>
<content type='text'>
Create organized test structure for proactive sync:

tests/common/sync_helpers.rs (from Phase 4):
- TestClient with retry logic for connect/send
- Event builders: build_layer2_issue_event, build_layer3_comment_event
- Tag variants (a/A/q for Layer 2, e/E/q for Layer 3)
- wait_for_event_on_relay() assertion helper
- repo_coord() utility function
- Unit tests for all builders

tests/sync/mod.rs:
- Module organization for sync tests
- Documentation of test categories

tests/sync.rs:
- Main test harness including common and sync modules

tests/sync/bootstrap.rs:
- test_bootstrap_syncs_existing_layer2_events (Test 1)
- test_relay_replays_events_after_restart (Test 4)

tests/sync/discovery.rs:
- test_discovers_layer3_via_layer2 (Test 2)
- test_layer2_discovery_with_chain (Test 3 - simplified)

All 14 tests pass: cargo test --test sync
</content>
</entry>
</feed>
