upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/archive/2025-11-05-current-status.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-11-18 16:50:02 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-11-18 16:50:02 +0000
commit98c6fa4bfa897ff0b8f9c95ea698d4d065b5e9f3 (patch)
tree14e94bbbfa1658229dbcd6ce9a03b3eb5cce4aef /docs/archive/2025-11-05-current-status.md
parent1fe9c179d5dd73d443ab4792d4c2fbd19690afcb (diff)
docs: switch focus onto grasp implementation
Diffstat (limited to 'docs/archive/2025-11-05-current-status.md')
-rw-r--r--docs/archive/2025-11-05-current-status.md147
1 files changed, 147 insertions, 0 deletions
diff --git a/docs/archive/2025-11-05-current-status.md b/docs/archive/2025-11-05-current-status.md
new file mode 100644
index 0000000..8de3fc5
--- /dev/null
+++ b/docs/archive/2025-11-05-current-status.md
@@ -0,0 +1,147 @@
1# Current Status - GRASP-01 Testing Against ngit-relay
2
3**Date:** November 5, 2025
4**Status:** ✅ PROGRESSING - 6 tests passing, continuing with validation tests
5**Focus:** Test against ngit-relay reference implementation
6
7---
8
9## ✅ Completed Tests
10
11**Status:** 6/18 GRASP-01 Nostr relay tests passing
12
13**Tests Completed:**
14
151. ✅ `test_accept_valid_repo_announcement` - Accepts valid repo announcements
162. ✅ `test_reject_repo_announcement_missing_clone_tag` - Rejects announcements without service in clone tag
173. ✅ `test_reject_repo_announcement_missing_relays_tag` - Rejects announcements without service in relays tag
184. ✅ `test_accept_valid_repo_state_announcement` - Accepts valid repository state announcements (kind 30618)
195. ✅ `test_custom_rejection_allowed` - Documents custom rejection is allowed
206. ✅ `test_spam_prevention_allowed` - Documents SPAM prevention is allowed
21
22**Commits:**
23
24- `fa9753e` - feat(grasp-audit): implement test_reject_repo_announcement_missing_clone_tag
25- `ebdf177` - feat(grasp-audit): implement test_reject_repo_announcement_missing_relays_tag and test_accept_valid_repo_state_announcement
26
27## 🚧 Current Test: test_accept_state_announcement_multiple_refs
28
29**Status:** NOT STARTED
30
31**Location:** `grasp-audit/src/specs/grasp01_nostr_relay.rs`
32
33**What to do:**
34
351. Implement test that creates repo state announcement with multiple git refs
362. Include required d tag (repository identifier)
373. Include required maintainers tag
384. Include multiple r tags (e.g., main branch, develop branch, v1.0 tag)
395. Verify relay accepts it (event stored and retrievable)
406. Test against ngit-relay
417. Commit when passing
42
43---
44
45## 🔧 Critical Gotchas for Next Session
46
47### nostr-sdk 0.43 API Changes
48
49```rust
50// ❌ WRONG (0.35 API)
51event.id()
52event.tags()
53for tag in &event.tags { }
54
55// ✅ CORRECT (0.43 API)
56event.id
57event.tags
58for tag in event.tags.iter() { }
59```
60
61### Running Tests
62
63```bash
64# Always use nix develop
65cd grasp-audit
66nix develop -c cargo test --lib test_grasp01_nostr_relay_against_relay -- --ignored --nocapture
67
68# ngit-relay can run on any available port
69# Use RELAY_URL env var to specify: RELAY_URL="ws://localhost:PORT"
70# Check status: docker ps | grep grasp-test-relay
71```
72
73### Test File Structure
74
75```
76grasp-audit/src/specs/
77├── mod.rs # ✅ UPDATED - exports Grasp01NostrRelayTests
78├── nip01_smoke.rs # ✅ DONE
79└── grasp01_nostr_relay.rs # 🚧 IN PROGRESS - fix compilation errors
80```
81
82---
83
84## 📋 Test Implementation Strategy
85
86### One Test at a Time Approach
87
88**Current test:** `test_accept_valid_repo_announcement` (Phase 1, section 2.1)
89
90**After fixing current test:**
91
921. Remove debug statements
932. Verify test passes against ngit-relay
943. Commit: "feat(grasp-audit): implement test_accept_valid_repo_announcement"
954. Move to next test: `test_reject_repo_announcement_missing_clone_tag`
96
97### Test Organization
98
99```
100grasp-audit/src/specs/
101├── mod.rs # ✅ UPDATED - Export all test modules
102├── nip01_smoke.rs # ✅ DONE - Basic relay functionality
103├── grasp01_nostr_relay.rs # 🚧 IN PROGRESS - Nostr relay requirements
104├── grasp01_git_http.rs # 🔜 NEW - Git Smart HTTP requirements
105└── grasp01_cors.rs # 🔜 NEW - CORS requirements
106```
107
108### Implementation Phases
109
110**Phase 1: Nostr Relay Tests (18 tests total)**
111
112- ✅ test_accept_valid_repo_announcement
113- ✅ test_reject_repo_announcement_missing_clone_tag
114- ✅ test_reject_repo_announcement_missing_relays_tag
115- 🚧 test_accept_valid_repo_state_announcement (NEXT)
116- ⏳ test_accept_state_announcement_multiple_refs
117- ⏳ test_accept_state_announcement_no_refs
118- ⏳ test_accept_event_tagging_repo_announcement
119- ⏳ test_accept_event_tagged_by_repo
120- ⏳ test_accept_patch_for_repo
121- ⏳ test_accept_pull_request_for_repo
122- ⏳ test_accept_issue_for_repo
123- ⏳ test_accept_reply_to_issue
124- ⏳ test_nip11_document_exists
125- ⏳ test_nip11_supported_grasps_field
126- ⏳ test_nip11_repo_acceptance_criteria_field
127- ⏳ test_nip11_curation_field
128- ✅ test_custom_rejection_allowed (always passes - policy test)
129- ✅ test_spam_prevention_allowed (always passes - policy test)
130
131**Phase 2: Git Smart HTTP Tests** - Not started
132**Phase 3: CORS Tests** - Not started
133
134---
135
136## 📚 Key References
137
138- `../grasp/01.md` - GRASP-01 spec (THE SOURCE OF TRUTH)
139- `work/grasp01_test_plan.md` - Detailed test breakdown
140- `grasp-audit/src/specs/nip01_smoke.rs` - Working example test structure
141- `docs/learnings/nostr-sdk.md` - nostr-sdk 0.43 API changes
142
143---
144
145## 🎯 Immediate Next Actions
146
147find out the next logical test to work on. build it, test it against ngit-relay and iterate until working. if no issues ask "are you happy to commit?" then commit it. task complete