<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/src/purgatory/sync/functions.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-24T11:36:39+00:00</updated>
<entry>
<title>rename: fetch_repository_data -&gt; fetch_repository_data_{excluding,with}_purgatory</title>
<updated>2026-02-24T11:36:39+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-02-24T11:36:39+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=c31a313ccf781e54fa15942bc882c1b113d3f590'/>
<id>urn:sha1:c31a313ccf781e54fa15942bc882c1b113d3f590</id>
<content type='text'>
The old name was ambiguous - it wasn't clear whether purgatory was
included or not. The two variants are now explicitly named:
- fetch_repository_data_excluding_purgatory: DB only
- fetch_repository_data_with_purgatory: DB + purgatory overlay

SyncContext trait method also renamed to fetch_repository_data_with_purgatory
to match the free function it delegates to.
</content>
</entry>
<entry>
<title>fix: pass actually fetched OIDs to process_newly_available_git_data</title>
<updated>2026-01-27T21:55:34+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-27T21:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=efc3da477d4edb9d1334718e3e20d197ba711468'/>
<id>urn:sha1:efc3da477d4edb9d1334718e3e20d197ba711468</id>
<content type='text'>
Previously, sync_identifier_from_url passed all needed OIDs to
process_newly_available_git_data, not just the OIDs that were
successfully fetched. This caused incorrect logging (new_oids_count
would show all needed OIDs, not just fetched ones).

While this didn't break functionality (the actual processing uses
can_apply_state which checks the repository on disk), it made
debugging confusing.

Changes:
- Rename oids_fetched to fetched_oids and change type from usize to Vec&lt;String&gt;
- Return Vec&lt;String&gt; from match arms instead of counts
- Pass fetched_oids (not needed_oids) to process_newly_available_git_data
- Return fetched_oids.len() at the end

This ensures logging accurately reflects which OIDs were actually
fetched from the remote.
</content>
</entry>
<entry>
<title>fix: distinguish 0 OIDs fetched from successful fetch in logging</title>
<updated>2026-01-27T21:40:46+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-27T21:40:46+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=847acdecb9c28a5307123b9ee685b769a598cfc1'/>
<id>urn:sha1:847acdecb9c28a5307123b9ee685b769a598cfc1</id>
<content type='text'>
When fetch_oids returns Ok(vec![]) (all requested OIDs missing from
remote), the log message now says 'Fetch returned no OIDs (not available
on remote)' instead of the misleading 'Fetch succeeded' with oids_fetched=0.
</content>
</entry>
<entry>
<title>Add naughty list for git remotes with persistent SSL/DNS errors</title>
<updated>2026-01-10T02:15:22+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-10T02:14:01+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=1b6b669b9b82d1f81b887a32055f19c53d3bb8bf'/>
<id>urn:sha1:1b6b669b9b82d1f81b887a32055f19c53d3bb8bf</id>
<content type='text'>
Implement domain-level naughty list tracking for git remotes, reusing the
existing NaughtyListTracker from relay sync. This prevents repeated attempts
to fetch from git domains with persistent infrastructure issues (SSL/TLS
certificate errors, DNS failures).

Changes:
- Updated NaughtyListTracker to track both relay URLs and git domains
- Added git_naughty_list field to RealSyncContext for error classification
- Modified fetch_oids() to classify git fetch errors and record naughty domains
- Updated sync_identifier_next_url() to filter out naughty domains during URL selection
- Added git_naughty_list parameter to ThrottleManager for domain queue processing
- Threaded naughty list through start_sync_loop and all sync functions
- Updated all tests to pass naughty list parameter

The naughty list uses 12-hour expiration (configurable) to allow domains to
recover from infrastructure issues. First occurrence logs WARN, repeats log DEBUG.
</content>
</entry>
<entry>
<title>chore: upgrade nostr-* packages to rev 4767ad13</title>
<updated>2026-01-08T10:57:51+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-08T10:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=075307804bf66bba10f5bc55cb40e2e6a98a65ee'/>
<id>urn:sha1:075307804bf66bba10f5bc55cb40e2e6a98a65ee</id>
<content type='text'>
- Update nostr-relay-builder, nostr-sdk, nostr-lmdb to latest revision
- Update grasp-audit nostr-sdk dependency
- Fix clippy warnings:
  - Replace .clone() with std::slice::from_ref() in src/git/sync.rs
  - Change &amp;PathBuf to &amp;Path in tests/common/git_server.rs
  - Replace vec![] with array literal in src/purgatory/sync/functions.rs
- Update PR_TEST_COMMIT_HASH in grasp-audit due to event generation changes

All 249 tests passing, no breaking changes required.
</content>
</entry>
<entry>
<title>chore: cargo fmt</title>
<updated>2026-01-08T00:50:54+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-08T00:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=f75e1c59aacf5ce668fd327e4e3d827511661c2a'/>
<id>urn:sha1:f75e1c59aacf5ce668fd327e4e3d827511661c2a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: resolve clippy warnings</title>
<updated>2026-01-07T17:16:37+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T17:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=42bf1196003c0b39179d8c9d2c07ecf9a83a4a74'/>
<id>urn:sha1:42bf1196003c0b39179d8c9d2c07ecf9a83a4a74</id>
<content type='text'>
- Prefix unused variable auth_result with underscore
- Prefix unused field git_data_path with underscore in Purgatory struct
- Add #[allow(clippy::too_many_arguments)] to handle_receive_pack
- Replace len() &gt;= 1 with !is_empty()
- Replace .last() with .next_back() on DoubleEndedIterator
- Fix doc list item overindentation
- Replace map_or(true, ...) with is_none_or(...)
- Replace map_or(false, ...) with is_some_and(...)
</content>
</entry>
<entry>
<title>feat(sync): extract clone URLs from PR events in purgatory</title>
<updated>2026-01-07T17:13:17+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T17:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=b71111cc25b99acab786ece4607cb60e9cbebae4'/>
<id>urn:sha1:b71111cc25b99acab786ece4607cb60e9cbebae4</id>
<content type='text'>
Add support for extracting clone URLs from PR/PR-Update events (kind 1618/1619)
during purgatory sync, per NIP-34 specification. This enables fetching PR commits
from URLs specified in the PR event itself, not just from repository announcement
clone URLs.

Changes:
- Add collect_pr_clone_urls() to SyncContext trait
- Implement in RealSyncContext: extract clone tags from PR events in purgatory
- Implement in MockSyncContext: configurable PR clone URLs for testing
- Update sync_identifier_next_url to merge PR clone URLs with announcement URLs
- Update get_throttled_domains_with_untried_urls with same merge logic
- Add unit tests for PR clone URL extraction and filtering
</content>
</entry>
<entry>
<title>Add unified process_newly_available_git_data function</title>
<updated>2026-01-07T12:24:42+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T12:24:42+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=e72edbae86affcb9fc0429bd197639bf438ffb6c'/>
<id>urn:sha1:e72edbae86affcb9fc0429bd197639bf438ffb6c</id>
<content type='text'>
Implement the unified function that handles all post-git-data-available
processing, regardless of how data arrived (git push or purgatory sync).

This function:
- Discovers satisfiable events from purgatory (state and PR events)
- Syncs OIDs to authorized owner repos
- Aligns refs and sets HEAD
- Saves events to database
- Notifies WebSocket subscribers
- Removes from purgatory

New additions:
- ProcessResult struct for tracking processing outcomes
- process_newly_available_git_data async function in src/git/sync.rs
- Helper functions: extract_identifier_from_repo_path, extract_identifier_from_pr_event
- Purgatory::find_prs_for_identifier method for PR event discovery
- Unit tests for all helper functions

Also fixes:
- Simplified extract_domain to avoid url crate dependency
- Removed unused imports in sync/loop.rs
</content>
</entry>
<entry>
<title>Add sync_identifier orchestration and ThrottleManager queue processing</title>
<updated>2026-01-07T11:57:55+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T11:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=8babcee8fdfa5b0f460aa1e6d8057feb7d2fda49'/>
<id>urn:sha1:8babcee8fdfa5b0f460aa1e6d8057feb7d2fda49</id>
<content type='text'>
Implement the main sync orchestration function and trigger-based queue
processing for throttled domains:

sync_identifier function:
- Orchestrates syncing git data for a single identifier
- Tries all non-throttled URLs in sequence
- Checks completion after each fetch (no pending events or all OIDs fetched)
- Enqueues with throttled domains when non-throttled URLs are exhausted
- Returns true if complete, false if events remain (for backoff)

ThrottleManager enhancements:
- Add set_context() to provide SyncContext for queue processing
- Add try_process_next() to spawn tasks when capacity frees
- Add process_queued_identifier() to handle queued work
- Update complete_request() to trigger processing on completion
- Update enqueue_identifier() to trigger processing when capacity available
- Add internal methods for non-Arc testing compatibility

Generic function updates:
- Add ?Sized bound to sync_identifier_next_url, sync_identifier_from_url,
  sync_identifier, and get_throttled_domains_with_untried_urls for
  dynamic dispatch support (Arc&lt;dyn SyncContext&gt;)

Tests:
- sync_identifier_tries_multiple_urls_until_complete: verifies sequential
  URL fetching until all OIDs are available
- sync_identifier_enqueues_throttled_domains_when_incomplete: verifies
  throttled domains get the identifier enqueued for later processing
- has_queued_work_reflects_queue_state: verifies queue state tracking
</content>
</entry>
</feed>
