<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/src/nostr/policy/pr_event.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>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>docs: clarify why fetch_repository_data excludes purgatory</title>
<updated>2026-02-17T11:43:40+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-02-17T11:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=cad58fccae7ed84bb033e56de0f1323b714a854d'/>
<id>urn:sha1:cad58fccae7ed84bb033e56de0f1323b714a854d</id>
<content type='text'>
Add comments explaining that PR event processing (both incoming and
purgatory) should only use database announcements, not purgatory ones.

This is intentional because:
- Incoming PR events should only be accepted for validated announcements
- Purgatory PR events should only be released when announcement is promoted
- This prevents accepting PR events for announcements that fail validation

Differs from state event processing which uses fetch_repository_data_with_purgatory
because state events check authorization without releasing from purgatory.
</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>refactor: unify event processing logic</title>
<updated>2026-01-07T23:31:38+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2026-01-07T23:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=c67ebe6f33bfa191f17eb0df24d3ee18092c74e1'/>
<id>urn:sha1:c67ebe6f33bfa191f17eb0df24d3ee18092c74e1</id>
<content type='text'>
Eliminates code duplication by extracting core event processing into
reusable functions. All state and PR event processing now uses the same
unified logic from src/git/process.rs.

Changes:
- Add src/git/process.rs with unified processing functions
  - process_state_with_git_data() for state events
  - process_pr_with_git_data() for PR events
  - Pure functions with comprehensive result types

- Refactor policy handlers to use unified processing
  - src/nostr/policy/state.rs: Remove ~70 lines of duplicated logic
  - src/nostr/policy/pr_event.rs: Remove ~40 lines of duplicated logic

- Refactor purgatory processing to use unified functions
  - src/git/sync.rs: Remove ~125 lines of duplicated logic
  - Make extract_owner_from_repo_path() public for reuse

Benefits:
- DRY: Single source of truth for event processing
- Testable: Pure functions with clear contracts
- Maintainable: Changes happen in one place
- Consistent: All code paths use same logic

All 217 unit tests + 40 integration tests pass (257/257).
</content>
</entry>
<entry>
<title>purgatory: fix pr event recieve code</title>
<updated>2025-12-31T10:49:09+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-31T09:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=768fe91caa676e4501aa26e14e01ca47f3ea4ca1'/>
<id>urn:sha1:768fe91caa676e4501aa26e14e01ca47f3ea4ca1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat(purgatory): add broken purgatory implementation</title>
<updated>2025-12-24T11:54:18+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-24T08:02:12+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=70d0197e85ae4ef85202781f6d2dc9e76bd508b3'/>
<id>urn:sha1:70d0197e85ae4ef85202781f6d2dc9e76bd508b3</id>
<content type='text'>
</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: split Nip34WritePolicy into focused sub-policies</title>
<updated>2025-12-04T15:42:00+00:00</updated>
<author>
<name>DanConwayDev</name>
<email>DanConwayDev@protonmail.com</email>
</author>
<published>2025-12-04T15:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1tkq8unhsd5jqx6ueex5lcpsgknrpquxuk44ftpjlpm3ulaake7xs76txrw/ngit-grasp-mirror/commit/?id=819866330c7e2f535a155d1d7efaf2e12dc15dc2'/>
<id>urn:sha1:819866330c7e2f535a155d1d7efaf2e12dc15dc2</id>
<content type='text'>
Split the ~900 line Nip34WritePolicy into focused sub-policies for improved
testability and maintainability:

- AnnouncementPolicy - Repository announcement validation
- StatePolicy - State event validation + ref alignment
- PrEventPolicy - PR/PR Update validation
- RelatedEventPolicy - Forward/backward reference checking

The main Nip34WritePolicy now delegates to these sub-policies via a shared
PolicyContext that provides domain, database, and git_data_path.

Also updates:
- README.md: Accurate project structure reflecting actual implementation
- docs/learnings: Marks this technical debt item as complete
</content>
</entry>
</feed>
