diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/MULTI_MINT_DESIGN.md | 68 |
1 files changed, 55 insertions, 13 deletions
diff --git a/docs/MULTI_MINT_DESIGN.md b/docs/MULTI_MINT_DESIGN.md index 3a30112..649ca4f 100644 --- a/docs/MULTI_MINT_DESIGN.md +++ b/docs/MULTI_MINT_DESIGN.md | |||
| @@ -447,22 +447,64 @@ mint_health_task (FreeRTOS, 5min interval) | |||
| 447 | 447 | ||
| 448 | --- | 448 | --- |
| 449 | 449 | ||
| 450 | ## 10. Implementation Checklist | 450 | ## 10. Git Worktree Strategy |
| 451 | 451 | ||
| 452 | - [ ] Phase 1: Config layer (`config.h`, `config.c`) | 452 | Multiple LLM sessions work on this repo simultaneously. To avoid conflicts: |
| 453 | - [ ] Phase 2: Multi-mint acceptance (`cashu.c`) | 453 | |
| 454 | - [ ] Phase 3: Mint health tracker (`mint_health.h`, `mint_health.c`) | 454 | ### Setup |
| 455 | - [ ] Phase 4: Health-aware acceptance integration | 455 | |
| 456 | - [ ] Phase 5: Multi-mint discovery endpoint (`tollgate_api.c`) | 456 | ``` |
| 457 | - [ ] Phase 6: Multi-mint captive portal UI (`captive_portal.c`) | 457 | # Main worktree stays on master for other sessions |
| 458 | - [ ] Phase 7: Multi-mint wallet (`nucula_wallet.h`, `nucula_wallet.cpp`) | 458 | git -C /home/c03rad0r/esp32-tollgate checkout master |
| 459 | - [ ] Phase 8: Service startup integration (`tollgate_main.c`) | 459 | |
| 460 | - [ ] Unit tests: `test_mint_health.c` | 460 | # Dedicated worktree for this feature |
| 461 | - [ ] Unit tests: update `test_cashu.c` for multi-mint | 461 | git -C /home/c03rad0r/esp32-tollgate worktree add /home/c03rad0r/esp32-tollgate-multi-mint feature/multi-mint-support |
| 462 | ``` | ||
| 463 | |||
| 464 | ### Worktree Locations | ||
| 465 | |||
| 466 | | Path | Branch | Purpose | | ||
| 467 | |------|--------|---------| | ||
| 468 | | `/home/c03rad0r/esp32-tollgate` | `master` | Main worktree, shared with other sessions | | ||
| 469 | | `/home/c03rad0r/esp32-tollgate-multi-mint` | `feature/multi-mint-support` | This feature's isolated workspace | | ||
| 470 | |||
| 471 | ### Conflict Avoidance Rules | ||
| 472 | |||
| 473 | | Rule | Why | | ||
| 474 | |------|-----| | ||
| 475 | | All edits happen in `/home/c03rad0r/esp32-tollgate-multi-mint` | Other sessions keep their own checkout untouched | | ||
| 476 | | Push after every green test | Other sessions can `git pull` to see progress | | ||
| 477 | | Never modify `master` directly | Merge only when feature is complete and tested | | ||
| 478 | | `git pull --rebase` before push | Avoid merge commits if others pushed to same branch | | ||
| 479 | |||
| 480 | ### Cleanup (after merge) | ||
| 481 | |||
| 482 | ``` | ||
| 483 | git -C /home/c03rad0r/esp32-tollgate worktree remove /home/c03rad0r/esp32-tollgate-multi-mint | ||
| 484 | ``` | ||
| 485 | |||
| 486 | --- | ||
| 487 | |||
| 488 | ## 11. Implementation Checklist | ||
| 489 | |||
| 490 | - [x] Create feature branch `feature/multi-mint-support` | ||
| 491 | - [x] Write design document `docs/MULTI_MINT_DESIGN.md` | ||
| 492 | - [x] Set up git worktree at `/home/c03rad0r/esp32-tollgate-multi-mint` | ||
| 493 | - [ ] Phase 1: Config layer (`config.h`, `config.c`) — multi-mint array | ||
| 494 | - [ ] Phase 2: Multi-mint acceptance (`cashu.c`) — iterate accepted_mints | ||
| 495 | - [ ] Phase 3: Mint health tracker (`mint_health.h`, `mint_health.c`) — FreeRTOS probing task | ||
| 496 | - [ ] Phase 4: Health-aware acceptance integration — gate on reachability | ||
| 497 | - [ ] Phase 5: Multi-mint discovery endpoint (`tollgate_api.c`) — one tag per reachable mint | ||
| 498 | - [ ] Phase 6: Multi-mint captive portal UI (`captive_portal.c`) — mint list with indicators | ||
| 499 | - [ ] Phase 7: Multi-mint wallet (`nucula_wallet.h`, `nucula_wallet.cpp`) — multi-wallet approach | ||
| 500 | - [ ] Phase 8: Service startup integration (`tollgate_main.c`) — init health + multi-wallet | ||
| 501 | - [ ] Unit tests: `test_mint_health.c` — health state machine, recovery, callbacks | ||
| 502 | - [ ] Unit tests: update `test_cashu.c` for multi-mint acceptance | ||
| 462 | - [ ] Build verification (no compiler errors/warnings) | 503 | - [ ] Build verification (no compiler errors/warnings) |
| 463 | - [ ] Flash Board A and verify multi-mint discovery | 504 | - [ ] Flash Board A and verify multi-mint discovery |
| 464 | - [ ] Flash Board B and verify multi-mint discovery | 505 | - [ ] Flash Board B and verify multi-mint discovery |
| 465 | - [ ] Payment test with token from each supported mint | 506 | - [ ] Payment test with token from each supported mint |
| 466 | - [ ] Health probe test (verify reachable/unreachable transitions) | 507 | - [ ] Health probe test (verify reachable/unreachable transitions) |
| 467 | - [ ] Captive portal multi-mint display verification | 508 | - [ ] Captive portal multi-mint display verification |
| 468 | - [ ] Commit and merge to master | 509 | - [ ] Push after every passing test |
| 510 | - [ ] Merge to master | ||