From d7e27c66ef9c263ca6d3cf5d2eebe5e6443d6972 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2026 14:25:31 +0530 Subject: docs: add worktree strategy and updated checklist to design doc --- docs/MULTI_MINT_DESIGN.md | 68 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 13 deletions(-) (limited to 'docs') 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) --- -## 10. Implementation Checklist - -- [ ] Phase 1: Config layer (`config.h`, `config.c`) -- [ ] Phase 2: Multi-mint acceptance (`cashu.c`) -- [ ] Phase 3: Mint health tracker (`mint_health.h`, `mint_health.c`) -- [ ] Phase 4: Health-aware acceptance integration -- [ ] Phase 5: Multi-mint discovery endpoint (`tollgate_api.c`) -- [ ] Phase 6: Multi-mint captive portal UI (`captive_portal.c`) -- [ ] Phase 7: Multi-mint wallet (`nucula_wallet.h`, `nucula_wallet.cpp`) -- [ ] Phase 8: Service startup integration (`tollgate_main.c`) -- [ ] Unit tests: `test_mint_health.c` -- [ ] Unit tests: update `test_cashu.c` for multi-mint +## 10. Git Worktree Strategy + +Multiple LLM sessions work on this repo simultaneously. To avoid conflicts: + +### Setup + +``` +# Main worktree stays on master for other sessions +git -C /home/c03rad0r/esp32-tollgate checkout master + +# Dedicated worktree for this feature +git -C /home/c03rad0r/esp32-tollgate worktree add /home/c03rad0r/esp32-tollgate-multi-mint feature/multi-mint-support +``` + +### Worktree Locations + +| Path | Branch | Purpose | +|------|--------|---------| +| `/home/c03rad0r/esp32-tollgate` | `master` | Main worktree, shared with other sessions | +| `/home/c03rad0r/esp32-tollgate-multi-mint` | `feature/multi-mint-support` | This feature's isolated workspace | + +### Conflict Avoidance Rules + +| Rule | Why | +|------|-----| +| All edits happen in `/home/c03rad0r/esp32-tollgate-multi-mint` | Other sessions keep their own checkout untouched | +| Push after every green test | Other sessions can `git pull` to see progress | +| Never modify `master` directly | Merge only when feature is complete and tested | +| `git pull --rebase` before push | Avoid merge commits if others pushed to same branch | + +### Cleanup (after merge) + +``` +git -C /home/c03rad0r/esp32-tollgate worktree remove /home/c03rad0r/esp32-tollgate-multi-mint +``` + +--- + +## 11. Implementation Checklist + +- [x] Create feature branch `feature/multi-mint-support` +- [x] Write design document `docs/MULTI_MINT_DESIGN.md` +- [x] Set up git worktree at `/home/c03rad0r/esp32-tollgate-multi-mint` +- [ ] Phase 1: Config layer (`config.h`, `config.c`) — multi-mint array +- [ ] Phase 2: Multi-mint acceptance (`cashu.c`) — iterate accepted_mints +- [ ] Phase 3: Mint health tracker (`mint_health.h`, `mint_health.c`) — FreeRTOS probing task +- [ ] Phase 4: Health-aware acceptance integration — gate on reachability +- [ ] Phase 5: Multi-mint discovery endpoint (`tollgate_api.c`) — one tag per reachable mint +- [ ] Phase 6: Multi-mint captive portal UI (`captive_portal.c`) — mint list with indicators +- [ ] Phase 7: Multi-mint wallet (`nucula_wallet.h`, `nucula_wallet.cpp`) — multi-wallet approach +- [ ] Phase 8: Service startup integration (`tollgate_main.c`) — init health + multi-wallet +- [ ] Unit tests: `test_mint_health.c` — health state machine, recovery, callbacks +- [ ] Unit tests: update `test_cashu.c` for multi-mint acceptance - [ ] Build verification (no compiler errors/warnings) - [ ] Flash Board A and verify multi-mint discovery - [ ] Flash Board B and verify multi-mint discovery - [ ] Payment test with token from each supported mint - [ ] Health probe test (verify reachable/unreachable transitions) - [ ] Captive portal multi-mint display verification -- [ ] Commit and merge to master +- [ ] Push after every passing test +- [ ] Merge to master -- cgit v1.2.3