<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/tests/purgatory_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-02-26T15:42:09+00:00</updated>
<entry>
<title>chore: apply cargo fmt and fix clippy warnings</title>
<updated>2026-02-26T15:42:09+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-02-26T15:42:09+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=9d86cf15f0275ffeee4519bd054e3b61dc8992ac'/>
<id>urn:sha1:9d86cf15f0275ffeee4519bd054e3b61dc8992ac</id>
<content type='text'>
Fix pre-existing clippy lints:
- &amp;PathBuf -&gt; &amp;Path in audit_cleanup.rs
- too_many_arguments on process_newly_available_git_data,
  process_purgatory_announcements, and HttpService::new
- clone_on_copy for PublicKey (Copy type) in purgatory cleanup loop
</content>
</entry>
<entry>
<title>fix: restructure PR clone tag test to use bootstrap relay instead of user-submitted purgatory announcement</title>
<updated>2026-02-18T20:40:25+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-02-18T20:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=cdd129b715753c7b4042a519a7c3fb92be94da04'/>
<id>urn:sha1:cdd129b715753c7b4042a519a7c3fb92be94da04</id>
<content type='text'>
The test was failing because submitting an announcement directly to syncing_relay
(user-submitted, no bootstrap) leaves the announcement in purgatory with no mechanism
to trigger relay discovery - there are no existing sync connections whose batch EOSE
would fire recompute_new_sync_filters_for_relay.

Fix: start syncing_relay with source_grasp as bootstrap. The promoted announcement
syncs via L1 generic filter → purgatory (no local git data) → StateOnly subscription
→ state event → purgatory sync fetches git data → announcement promoted → SelfSubscriber
upgrades to Full → connects to mock_relay → PR event synced and promoted.

The test's primary purpose (PR event partial OID aggregation from multiple clone
URL sources) is fully preserved.
</content>
</entry>
<entry>
<title>test: rewrite PR sync tests to reflect purgatory-first announcement flow</title>
<updated>2026-02-18T17:12:27+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-02-18T17:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=07c8c00274298e90654207d8baceb1089514ccae'/>
<id>urn:sha1:07c8c00274298e90654207d8baceb1089514ccae</id>
<content type='text'>
The tests now correctly reflect the actual purgatory behavior:
1. Announcement goes to purgatory (StateOnly) - not immediately accepted
2. State event goes to purgatory
3. Git push promotes announcement to Full and releases state event
4. PR event is sent AFTER announcement promotion (accepted since repo is Full)
5. PR commit push releases PR event from purgatory

This matches the design: announcements require git data validation before
being promoted to the database, which means PR events can only be accepted
for repos with promoted announcements.

Also routes relay stdout to /tmp/relay-{port}.log for easier debugging.
</content>
</entry>
<entry>
<title>refactor: replace hardcoded Kind constants with rust-nostr variants</title>
<updated>2026-01-08T11:23:28+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-08T11:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=5d02ad6b893f9059044914c115d77cf9d8e589c3'/>
<id>urn:sha1:5d02ad6b893f9059044914c115d77cf9d8e589c3</id>
<content type='text'>
- Replace KIND_REPOSITORY_ANNOUNCEMENT with Kind::GitRepoAnnouncement
- Replace KIND_REPOSITORY_STATE with Kind::RepoState
- Replace KIND_PR with Kind::GitPullRequest
- Replace KIND_PR_UPDATE with Kind::GitPullRequestUpdate
- Replace KIND_USER_GRASP_LIST with Kind::GitUserGraspList
- Replace KIND_PATCH with Kind::GitPatch
- Replace KIND_ISSUE with Kind::GitIssue
- Replace KIND_COMMENT with Kind::Comment
- Replace all Kind::Custom(30617|30618|1617|1618|1619|1621|1111|10317) patterns
- Remove all hardcoded KIND_* constants from events.rs
- Update all match statements to use Kind enum directly
- Update all filter builders to use Kind variants
- Update all test helpers and assertions

Benefits:
- Type safety: compiler prevents wrong kind numbers
- Readability: Kind::GitRepoAnnouncement is self-documenting
- Maintainability: single source of truth (rust-nostr)
- IDE support: full autocompletion and refactoring
- Standards: aligns with rust-nostr best practices

Files modified: 21
Constants removed: 9
Patterns replaced: 100+
Tests passing: 222/222
</content>
</entry>
<entry>
<title>test: add WIP SmartHttpServer to test</title>
<updated>2026-01-07T21:33:22+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T21:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=0550b3229f35ef3ee125bac47d85bbd08d1250b1'/>
<id>urn:sha1:0550b3229f35ef3ee125bac47d85bbd08d1250b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: added purgatory git data sync intergration tests agregating from mulitple git servers</title>
<updated>2026-01-07T20:41:01+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T20:41:01+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=7467aa9ace94b4e132eedd03c9daddb2d59813c4'/>
<id>urn:sha1:7467aa9ace94b4e132eedd03c9daddb2d59813c4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add integration test for concurrent state and PR event sync</title>
<updated>2026-01-07T15:58:37+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T15:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=e557d07ddbb1ea1a8ca6604f9ba945f359f54ce7'/>
<id>urn:sha1:e557d07ddbb1ea1a8ca6604f9ba945f359f54ce7</id>
<content type='text'>
Implements test_concurrent_state_and_pr_sync which verifies that when both
a state event and a PR event for the same repository enter purgatory, both
are correctly synced from a remote relay and released when git data arrives.

The test:
1. Creates a source relay with a repo containing two commits
2. Sends both state event (referencing main branch) and PR event to source
3. Pushes git data to source relay, releasing both events from purgatory
4. Starts syncing relay that connects to source
5. Verifies both events sync to the syncing relay and are served
6. Confirms refs are correct (main branch and refs/nostr/&lt;event-id&gt;)

This validates that the purgatory sync mechanism handles multiple concurrent
events for the same repository without race conditions or conflicts.
</content>
</entry>
<entry>
<title>test: add test_pr_event_syncs_from_remote</title>
<updated>2026-01-07T15:50:50+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T15:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=049cff14fa731c95b9b0074f67469df3af19870b'/>
<id>urn:sha1:049cff14fa731c95b9b0074f67469df3af19870b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test: add test_state_event_syncs_from_remote integration test</title>
<updated>2026-01-07T15:39:48+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T15:39:48+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=1db877d53c4ff45971c69fecc5165c352ec316c9'/>
<id>urn:sha1:1db877d53c4ff45971c69fecc5165c352ec316c9</id>
<content type='text'>
Implements Phase 3 of the purgatory sync integration test plan.

Key changes:
- Add immediate sync triggering for sync-received events that go to
  purgatory (instead of default 3-minute delay for user-submitted events)
- TestRelay now respects RUST_LOG environment variable for debugging
- New test verifies end-to-end flow: state event syncs from source relay,
  enters purgatory, git data is fetched from source's clone URL, and
  event is released and served
</content>
</entry>
<entry>
<title>Add integration test for git push triggering purgatory release</title>
<updated>2026-01-07T14:58:59+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T14:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=3de0156b2a974408643c1dc6287595ba998b5afd'/>
<id>urn:sha1:3de0156b2a974408643c1dc6287595ba998b5afd</id>
<content type='text'>
This test verifies the end-to-end flow where:
1. A state event is sent to the relay before git data exists
2. The event goes to purgatory (not served)
3. A git push delivers the required commits
4. The event is released from purgatory and served

This validates that process_newly_available_git_data is correctly
triggered after a git push and properly releases state events.
</content>
</entry>
</feed>
