diff options
Diffstat (limited to 'docs/learnings')
| -rw-r--r-- | docs/learnings/grasp-01-implementation.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/learnings/grasp-01-implementation.md b/docs/learnings/grasp-01-implementation.md index dea6389..719f751 100644 --- a/docs/learnings/grasp-01-implementation.md +++ b/docs/learnings/grasp-01-implementation.md | |||
| @@ -156,17 +156,17 @@ This enables parallel CI runs without interference. | |||
| 156 | 156 | ||
| 157 | **Better approach:** Treat architecture docs as living documents. When implementation diverges from the plan, update the doc immediately. The initial design document was valuable and should remain, but it should reflect what was built. | 157 | **Better approach:** Treat architecture docs as living documents. When implementation diverges from the plan, update the doc immediately. The initial design document was valuable and should remain, but it should reflect what was built. |
| 158 | 158 | ||
| 159 | ### 2. Smaller Nip34WritePolicy | 159 | ### 2. ~~Smaller Nip34WritePolicy~~ ✅ DONE |
| 160 | 160 | ||
| 161 | **What happened:** The [`Nip34WritePolicy`](src/nostr/builder.rs:51) grew to ~900 lines handling all event types. | 161 | **What happened:** The `Nip34WritePolicy` grew to ~900 lines handling all event types. |
| 162 | 162 | ||
| 163 | **Better approach:** Split into: | 163 | **Resolution:** Split into focused sub-policies in [`src/nostr/policy/`](src/nostr/policy/mod.rs:1): |
| 164 | - `AnnouncementPolicy` - Repository announcement validation | 164 | - [`AnnouncementPolicy`](src/nostr/policy/announcement.rs:1) - Repository announcement validation |
| 165 | - `StatePolicy` - State event validation + ref alignment | 165 | - [`StatePolicy`](src/nostr/policy/state.rs:1) - State event validation + ref alignment |
| 166 | - `RelatedEventPolicy` - Forward/backward reference checking | 166 | - [`RelatedEventPolicy`](src/nostr/policy/related.rs:1) - Forward/backward reference checking |
| 167 | - `PrEventPolicy` - PR/PR Update validation | 167 | - [`PrEventPolicy`](src/nostr/policy/pr_event.rs:1) - PR/PR Update validation |
| 168 | 168 | ||
| 169 | This would improve testability and readability. | 169 | The main [`Nip34WritePolicy`](src/nostr/builder.rs:51) now delegates to these sub-policies, improving testability and readability. |
| 170 | 170 | ||
| 171 | ### 3. Git Operations Module Organization | 171 | ### 3. Git Operations Module Organization |
| 172 | 172 | ||
| @@ -190,7 +190,7 @@ This would improve testability and readability. | |||
| 190 | 190 | ||
| 191 | ### High Priority | 191 | ### High Priority |
| 192 | 192 | ||
| 193 | 1. **Split `Nip34WritePolicy`** - Too large, hard to test/maintain | 193 | 1. ~~**Split `Nip34WritePolicy`**~~ ✅ DONE - Split into sub-policies in [`src/nostr/policy/`](src/nostr/policy/mod.rs:1) |
| 194 | 2. **Add unit tests for policy logic** - Currently relies on integration tests | 194 | 2. **Add unit tests for policy logic** - Currently relies on integration tests |
| 195 | 3. **Document actual architecture** - Docs describe plans, not implementation | 195 | 3. **Document actual architecture** - Docs describe plans, not implementation |
| 196 | 196 | ||