upleb.uk

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

summaryrefslogtreecommitdiff
path: root/CURRENT_STATUS.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-11-04 10:25:53 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-11-04 10:25:53 +0000
commit52bad9954cdddf55ab749fd0c6387edbc766632f (patch)
treed9dd2078b70a627a71d1adb9555cee83faec5cd0 /CURRENT_STATUS.md
parentdb460efdd4cf34d3b6ac8c19b1b8f89f22bc279f (diff)
docs: use DiΓ‘taxis structure
Diffstat (limited to 'CURRENT_STATUS.md')
-rw-r--r--CURRENT_STATUS.md464
1 files changed, 0 insertions, 464 deletions
diff --git a/CURRENT_STATUS.md b/CURRENT_STATUS.md
deleted file mode 100644
index 417691a..0000000
--- a/CURRENT_STATUS.md
+++ /dev/null
@@ -1,464 +0,0 @@
1# ngit-grasp - Current Status
2
3**Date:** November 4, 2025
4**Phase:** Audit Tool Complete - Ready for NIP-01 Implementation
5**Status:** 🟒 All Systems Green
6
7---
8
9## Quick Summary
10
11βœ… **grasp-audit tool complete** - NIP-01 smoke tests passing
12βœ… **Tag migration complete** - Using standard NIP-01 "t" tags
13βœ… **nostr-sdk upgraded** - Version 0.43.x (latest stable)
14βœ… **Nix flakes migrated** - Modern reproducible builds
15βœ… **Documentation cleaned** - Clear structure established
16
17**Next:** Build NIP-01 relay implementation, test with grasp-audit
18
19---
20
21## Project Structure
22
23```
24ngit-grasp/
25β”œβ”€β”€ README.md # Project overview
26β”œβ”€β”€ AGENTS.md # AI agent guidelines
27β”œβ”€β”€ CURRENT_STATUS.md # This file
28β”‚
29β”œβ”€β”€ docs/ # Permanent documentation
30β”‚ β”œβ”€β”€ ARCHITECTURE.md # System design
31β”‚ β”œβ”€β”€ TEST_STRATEGY.md # Testing approach
32β”‚ β”œβ”€β”€ GETTING_STARTED.md # Setup guide
33β”‚ β”œβ”€β”€ GIT_PROTOCOL.md # Git protocol reference
34β”‚ β”œβ”€β”€ COMPARISON.md # vs ngit-relay
35β”‚ β”œβ”€β”€ DECISION_SUMMARY.md # Key decisions
36β”‚ β”‚
37β”‚ β”œβ”€β”€ learnings/ # Reusable knowledge
38β”‚ β”‚ β”œβ”€β”€ nix-flakes.md # Nix flake patterns
39β”‚ β”‚ β”œβ”€β”€ nostr-sdk.md # nostr-sdk 0.43 notes
40β”‚ β”‚ └── grasp-audit.md # Audit tool patterns
41β”‚ β”‚
42β”‚ └── archive/ # Historical documents
43β”‚ β”œβ”€β”€ 2025-11-04-tag-migration.md
44β”‚ β”œβ”€β”€ 2025-11-04-flake-migration.md
45β”‚ β”œβ”€β”€ 2025-11-04-nostr-sdk-upgrade.md
46β”‚ └── ...
47β”‚
48└── grasp-audit/ # Audit tool (separate crate)
49 β”œβ”€β”€ README.md # Audit tool docs
50 β”œβ”€β”€ QUICK_START.md # Getting started
51 β”œβ”€β”€ flake.nix # Nix dev environment
52 β”œβ”€β”€ Cargo.toml # Rust dependencies
53 └── src/
54 β”œβ”€β”€ specs/ # Test specifications
55 β”‚ └── nip01_smoke.rs # NIP-01 basic tests βœ…
56 β”œβ”€β”€ audit.rs # Audit config & event builder
57 β”œβ”€β”€ client.rs # Audit client wrapper
58 └── ...
59```
60
61---
62
63## What Works
64
65### grasp-audit Tool βœ…
66
67**Status:** Fully functional, all tests passing
68
69```bash
70cd grasp-audit
71nix develop
72cargo test --lib # 12/12 unit tests βœ…
73cargo test -- --ignored # 1/1 integration test βœ…
74cargo run -- audit --relay ws://localhost:7000 --spec nip01-smoke
75# Results: 6/6 passed (100.0%) βœ…
76```
77
78**Features:**
79- βœ… NIP-01 smoke tests (websocket, events, subscriptions)
80- βœ… CI and production modes
81- βœ… Test isolation via unique run IDs
82- βœ… Standard "t" tag usage
83- βœ… Audit event cleanup strategy
84- βœ… CLI interface
85
86**Test Coverage:**
87- websocket_connection
88- send_receive_event
89- create_subscription
90- close_subscription
91- reject_invalid_signature
92- reject_invalid_event_id
93
94---
95
96### Development Environment βœ…
97
98**Nix Flakes:**
99- βœ… `grasp-audit/flake.nix` - Reproducible builds
100- βœ… Rust toolchain via rust-overlay
101- βœ… All dependencies managed
102- βœ… Cross-platform support
103
104**Usage:**
105```bash
106cd grasp-audit
107nix develop # Enter dev shell
108nix develop -c cargo build # One-off command
109nix build # Build package
110```
111
112---
113
114### Documentation βœ…
115
116**Permanent Docs:**
117- βœ… `docs/ARCHITECTURE.md` - Detailed system design
118- βœ… `docs/TEST_STRATEGY.md` - Testing approach
119- βœ… `docs/GETTING_STARTED.md` - Setup guide
120- βœ… `docs/README.md` - Documentation index
121
122**Learnings:**
123- βœ… `docs/learnings/nix-flakes.md` - Nix patterns and gotchas
124- βœ… `docs/learnings/nostr-sdk.md` - nostr-sdk 0.43 migration
125- βœ… `docs/learnings/grasp-audit.md` - Audit tool patterns
126
127**Guidelines:**
128- βœ… `AGENTS.md` - AI agent documentation practices
129
130---
131
132## What's Next
133
134### Immediate: NIP-01 Relay Implementation
135
136**Goal:** Build basic Nostr relay that passes grasp-audit tests
137
138**Approach:**
1391. Create `src/` directory structure
1402. Implement basic NIP-01 relay using nostr-relay-builder
1413. Run grasp-audit tests against it
1424. Iterate until all tests pass
143
144**Files to Create:**
145```
146src/
147β”œβ”€β”€ main.rs # Entry point
148β”œβ”€β”€ config.rs # Configuration
149β”œβ”€β”€ nostr/
150β”‚ β”œβ”€β”€ mod.rs
151β”‚ β”œβ”€β”€ relay.rs # NIP-01 relay setup
152β”‚ └── events.rs # Event handling
153└── storage/
154 β”œβ”€β”€ mod.rs
155 └── repository.rs # Event storage
156```
157
158**Success Criteria:**
159```bash
160# Start ngit-grasp relay
161cargo run
162
163# In another terminal
164cd grasp-audit
165cargo run -- audit --relay ws://localhost:8080 --spec nip01-smoke
166# Results: 6/6 passed (100.0%) βœ…
167```
168
169---
170
171### Phase 2: GRASP-01 Compliance
172
173**After NIP-01 works:**
174
1751. **Extend grasp-audit**
176 - Create `src/specs/grasp_01_relay.rs`
177 - Test repository announcements (NIP-34)
178 - Test state events
179 - Test maintainer validation
180
1812. **Implement in ngit-grasp**
182 - NIP-34 event validation
183 - Repository state management
184 - Maintainer authorization
185
1863. **Iterate**
187 - Run GRASP-01 audit tests
188 - Fix failures
189 - Repeat until passing
190
191---
192
193### Phase 3: Git Integration
194
195**After GRASP-01 compliance:**
196
1971. **Git HTTP Backend**
198 - Implement git-smart-http handlers
199 - Integrate with authorization
200
2012. **Push Validation**
202 - Query Nostr state events
203 - Validate push permissions
204 - Inline authorization (no hooks)
205
2063. **Full GRASP-01**
207 - Complete service requirements
208 - End-to-end testing
209
210---
211
212## Development Workflow
213
214### Daily Development
215
216```bash
217# For ngit-grasp (when we create it)
218cd ngit-grasp
219nix develop
220cargo build
221cargo test
222cargo run
223
224# For grasp-audit
225cd grasp-audit
226nix develop
227cargo build
228cargo test --lib
229cargo test -- --ignored # Requires relay
230cargo run -- audit --relay ws://localhost:8080
231```
232
233---
234
235### Running Tests
236
237**Unit Tests (Fast):**
238```bash
239# grasp-audit
240cd grasp-audit
241cargo test --lib
242
243# ngit-grasp (when created)
244cargo test --lib
245```
246
247**Integration Tests (Requires Relay):**
248```bash
249# Start test relay
250docker run --rm -p 7000:7000 scsibug/nostr-rs-relay
251
252# Run integration tests
253cd grasp-audit
254cargo test -- --ignored
255```
256
257**Audit Tests:**
258```bash
259# Start your relay
260cd ngit-grasp
261cargo run
262
263# Run audit in another terminal
264cd grasp-audit
265cargo run -- audit --relay ws://localhost:8080
266```
267
268---
269
270## Key Technologies
271
272### Current Stack
273
274- **Rust**: Core language
275- **nostr-sdk 0.43**: Nostr event handling
276- **Nix Flakes**: Reproducible dev environment
277- **Cargo**: Build system
278- **Docker**: Test relay (nostr-rs-relay)
279
280### Planned Stack (ngit-grasp)
281
282- **actix-web**: HTTP server
283- **nostr-relay-builder**: Relay infrastructure
284- **git-http-backend**: Git protocol handling
285- **tokio**: Async runtime
286
287---
288
289## Important Gotchas
290
291### 1. Use Nix Flakes, Not nix-shell
292
293```bash
294# βœ… Correct
295nix develop
296
297# ❌ Wrong
298nix-shell
299```
300
301**Why:** We use `flake.nix`, not `shell.nix`
302
303---
304
305### 2. grasp-audit is Separate
306
307```bash
308# βœ… Correct
309cd grasp-audit
310nix develop
311cargo build
312
313# ❌ Wrong
314cd ngit-grasp
315cargo build # Won't find grasp-audit
316```
317
318**Why:** Separate crate with own flake and Cargo.toml
319
320---
321
322### 3. Integration Tests Need Relay
323
324```bash
325# βœ… Correct
326docker run --rm -p 7000:7000 scsibug/nostr-rs-relay
327cargo test -- --ignored
328
329# ❌ Wrong
330cargo test -- --ignored # Will fail without relay
331```
332
333---
334
335### 4. nostr-sdk 0.43 API Changes
336
337**Event Building:**
338```rust
339// βœ… Correct (0.43)
340EventBuilder::new(kind, content)
341 .tags(tags)
342 .sign_with_keys(&keys)?
343
344// ❌ Wrong (0.35)
345EventBuilder::new(kind, content, tags)
346 .to_event(&keys)?
347```
348
349**See:** `docs/learnings/nostr-sdk.md` for full migration guide
350
351---
352
353## Documentation Practices
354
355### When to Create Documents
356
357**Working Docs (Root):**
358- Session summaries
359- Status reports
360- Next steps
361- Temporary notes
362
363**Permanent Docs (docs/):**
364- Architecture
365- Design decisions
366- API documentation
367- User guides
368
369**Learnings (docs/learnings/):**
370- Gotchas and patterns
371- Migration notes
372- Best practices
373- Reusable knowledge
374
375**Archive (docs/archive/):**
376- Completed session docs
377- Historical records
378- Superseded documents
379
380**See:** `AGENTS.md` for full guidelines
381
382---
383
384## Recent Milestones
385
386- βœ… **Nov 4, 2025** - Tag migration to standard "t" tags
387- βœ… **Nov 4, 2025** - Flake migration (shell.nix β†’ flake.nix)
388- βœ… **Nov 4, 2025** - nostr-sdk upgrade (0.35 β†’ 0.43)
389- βœ… **Nov 4, 2025** - Documentation cleanup
390- βœ… **Nov 3, 2025** - Architecture investigation complete
391- βœ… **Nov 3, 2025** - grasp-audit tool implemented
392- βœ… **Nov 3, 2025** - NIP-01 smoke tests passing
393
394---
395
396## Success Metrics
397
398### Current Status
399
400| Metric | Status | Details |
401|--------|--------|---------|
402| grasp-audit builds | βœ… | Clean build, no warnings |
403| Unit tests | βœ… | 12/12 passing |
404| Integration tests | βœ… | 1/1 passing |
405| CLI works | βœ… | All commands functional |
406| Smoke tests | βœ… | 6/6 passing |
407| Documentation | βœ… | Complete and organized |
408| Nix flakes | βœ… | Reproducible builds |
409
410### Next Milestone: NIP-01 Relay
411
412| Metric | Status | Target |
413|--------|--------|--------|
414| ngit-grasp builds | πŸ”œ | Clean build |
415| NIP-01 relay running | πŸ”œ | Accepts connections |
416| Smoke tests pass | πŸ”œ | 6/6 against ngit-grasp |
417| Basic event storage | πŸ”œ | Events persist |
418| Subscriptions work | πŸ”œ | Real-time updates |
419
420---
421
422## Resources
423
424### Documentation
425- [Project README](README.md)
426- [Architecture](docs/ARCHITECTURE.md)
427- [Test Strategy](docs/TEST_STRATEGY.md)
428- [Getting Started](docs/GETTING_STARTED.md)
429- [Agent Guidelines](AGENTS.md)
430
431### Learnings
432- [Nix Flakes](docs/learnings/nix-flakes.md)
433- [nostr-sdk](docs/learnings/nostr-sdk.md)
434- [grasp-audit](docs/learnings/grasp-audit.md)
435
436### External
437- [GRASP Protocol](https://gitworkshop.dev/danconwaydev.com/grasp)
438- [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md)
439- [NIP-34](https://github.com/nostr-protocol/nips/blob/master/34.md)
440- [nostr-sdk docs](https://docs.rs/nostr-sdk/0.43.0)
441
442---
443
444## Contact & Contribution
445
446**Status:** Alpha - Active Development
447**License:** MIT
448**Repository:** ngit-grasp (local development)
449
450**Contributing:**
4511. Read `AGENTS.md` for documentation practices
4522. Review `docs/ARCHITECTURE.md` for design
4533. Check `CURRENT_STATUS.md` (this file) for current state
4544. Follow Rust conventions (`cargo fmt`, `cargo clippy`)
4555. Add tests for new functionality
456
457---
458
459**Last Updated:** November 4, 2025
460**Next Review:** When NIP-01 relay is implemented
461
462---
463
464*Status: 🟒 Ready to build NIP-01 relay implementation*