diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-04 10:25:53 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-04 10:25:53 +0000 |
| commit | 52bad9954cdddf55ab749fd0c6387edbc766632f (patch) | |
| tree | d9dd2078b70a627a71d1adb9555cee83faec5cd0 /CURRENT_STATUS.md | |
| parent | db460efdd4cf34d3b6ac8c19b1b8f89f22bc279f (diff) | |
docs: use DiΓ‘taxis structure
Diffstat (limited to 'CURRENT_STATUS.md')
| -rw-r--r-- | CURRENT_STATUS.md | 464 |
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 | ``` | ||
| 24 | ngit-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 | ||
| 70 | cd grasp-audit | ||
| 71 | nix develop | ||
| 72 | cargo test --lib # 12/12 unit tests β | ||
| 73 | cargo test -- --ignored # 1/1 integration test β | ||
| 74 | cargo 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 | ||
| 106 | cd grasp-audit | ||
| 107 | nix develop # Enter dev shell | ||
| 108 | nix develop -c cargo build # One-off command | ||
| 109 | nix 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:** | ||
| 139 | 1. Create `src/` directory structure | ||
| 140 | 2. Implement basic NIP-01 relay using nostr-relay-builder | ||
| 141 | 3. Run grasp-audit tests against it | ||
| 142 | 4. Iterate until all tests pass | ||
| 143 | |||
| 144 | **Files to Create:** | ||
| 145 | ``` | ||
| 146 | src/ | ||
| 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 | ||
| 161 | cargo run | ||
| 162 | |||
| 163 | # In another terminal | ||
| 164 | cd grasp-audit | ||
| 165 | cargo 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 | |||
| 175 | 1. **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 | |||
| 181 | 2. **Implement in ngit-grasp** | ||
| 182 | - NIP-34 event validation | ||
| 183 | - Repository state management | ||
| 184 | - Maintainer authorization | ||
| 185 | |||
| 186 | 3. **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 | |||
| 197 | 1. **Git HTTP Backend** | ||
| 198 | - Implement git-smart-http handlers | ||
| 199 | - Integrate with authorization | ||
| 200 | |||
| 201 | 2. **Push Validation** | ||
| 202 | - Query Nostr state events | ||
| 203 | - Validate push permissions | ||
| 204 | - Inline authorization (no hooks) | ||
| 205 | |||
| 206 | 3. **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) | ||
| 218 | cd ngit-grasp | ||
| 219 | nix develop | ||
| 220 | cargo build | ||
| 221 | cargo test | ||
| 222 | cargo run | ||
| 223 | |||
| 224 | # For grasp-audit | ||
| 225 | cd grasp-audit | ||
| 226 | nix develop | ||
| 227 | cargo build | ||
| 228 | cargo test --lib | ||
| 229 | cargo test -- --ignored # Requires relay | ||
| 230 | cargo run -- audit --relay ws://localhost:8080 | ||
| 231 | ``` | ||
| 232 | |||
| 233 | --- | ||
| 234 | |||
| 235 | ### Running Tests | ||
| 236 | |||
| 237 | **Unit Tests (Fast):** | ||
| 238 | ```bash | ||
| 239 | # grasp-audit | ||
| 240 | cd grasp-audit | ||
| 241 | cargo test --lib | ||
| 242 | |||
| 243 | # ngit-grasp (when created) | ||
| 244 | cargo test --lib | ||
| 245 | ``` | ||
| 246 | |||
| 247 | **Integration Tests (Requires Relay):** | ||
| 248 | ```bash | ||
| 249 | # Start test relay | ||
| 250 | docker run --rm -p 7000:7000 scsibug/nostr-rs-relay | ||
| 251 | |||
| 252 | # Run integration tests | ||
| 253 | cd grasp-audit | ||
| 254 | cargo test -- --ignored | ||
| 255 | ``` | ||
| 256 | |||
| 257 | **Audit Tests:** | ||
| 258 | ```bash | ||
| 259 | # Start your relay | ||
| 260 | cd ngit-grasp | ||
| 261 | cargo run | ||
| 262 | |||
| 263 | # Run audit in another terminal | ||
| 264 | cd grasp-audit | ||
| 265 | cargo 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 | ||
| 295 | nix develop | ||
| 296 | |||
| 297 | # β Wrong | ||
| 298 | nix-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 | ||
| 309 | cd grasp-audit | ||
| 310 | nix develop | ||
| 311 | cargo build | ||
| 312 | |||
| 313 | # β Wrong | ||
| 314 | cd ngit-grasp | ||
| 315 | cargo 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 | ||
| 326 | docker run --rm -p 7000:7000 scsibug/nostr-rs-relay | ||
| 327 | cargo test -- --ignored | ||
| 328 | |||
| 329 | # β Wrong | ||
| 330 | cargo 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) | ||
| 340 | EventBuilder::new(kind, content) | ||
| 341 | .tags(tags) | ||
| 342 | .sign_with_keys(&keys)? | ||
| 343 | |||
| 344 | // β Wrong (0.35) | ||
| 345 | EventBuilder::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:** | ||
| 451 | 1. Read `AGENTS.md` for documentation practices | ||
| 452 | 2. Review `docs/ARCHITECTURE.md` for design | ||
| 453 | 3. Check `CURRENT_STATUS.md` (this file) for current state | ||
| 454 | 4. Follow Rust conventions (`cargo fmt`, `cargo clippy`) | ||
| 455 | 5. 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* | ||