diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-04 15:42:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-12-04 15:42:00 +0000 |
| commit | 819866330c7e2f535a155d1d7efaf2e12dc15dc2 (patch) | |
| tree | d84c8361811544aad9cad089c0358b9028c8fb80 /src/nostr/mod.rs | |
| parent | fd0c87c787d0626b3546fa571541c9c809711821 (diff) | |
refactor: split Nip34WritePolicy into focused sub-policies
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
Diffstat (limited to 'src/nostr/mod.rs')
| -rw-r--r-- | src/nostr/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nostr/mod.rs b/src/nostr/mod.rs index 2bf0346..a2820fc 100644 --- a/src/nostr/mod.rs +++ b/src/nostr/mod.rs | |||
| @@ -1,2 +1,6 @@ | |||
| 1 | pub mod builder; | 1 | pub mod builder; |
| 2 | pub mod events; | 2 | pub mod events; |
| 3 | pub mod policy; | ||
| 4 | |||
| 5 | /// Re-export SharedDatabase for use by policy modules | ||
| 6 | pub use builder::SharedDatabase; | ||