diff options
Diffstat (limited to 'CHECKLIST.md')
| -rw-r--r-- | CHECKLIST.md | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/CHECKLIST.md b/CHECKLIST.md index 02c8a4c..9842390 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md | |||
| @@ -154,17 +154,54 @@ | |||
| 154 | - [ ] Write tests/phase3.mjs (wallet endpoint tests + cross-board) | 154 | - [ ] Write tests/phase3.mjs (wallet endpoint tests + cross-board) |
| 155 | - [ ] All Phase 3 tests passing | 155 | - [ ] All Phase 3 tests passing |
| 156 | 156 | ||
| 157 | ## Test Coverage — IN PROGRESS | ||
| 158 | |||
| 159 | ### Host Unit Tests (tests/unit/) | ||
| 160 | - [ ] Create `tests/unit/stubs/` — clean ESP-IDF type stubs for host compilation | ||
| 161 | - [ ] Create `tests/unit/Makefile` — compiles all unit tests with host gcc | ||
| 162 | - [ ] Install system deps: `libmbedtls-dev`, `libcjson-dev` | ||
| 163 | - [ ] `test_geohash.c` — geohash_encode against reference vectors (Munich, NYC, origin) | ||
| 164 | - [ ] `test_identity.c` — HMAC-SHA512 derivation, MAC bits, SSID/IP determinism | ||
| 165 | - [ ] `test_nostr_event.c` — NIP-01 event ID, Schnorr sign+verify, JSON serialization | ||
| 166 | - [ ] `test_cashu.c` — token decode, allotment calc, mint validation | ||
| 167 | - [ ] `test_session.c` — session lifecycle, expiry, spent-secret dedup | ||
| 168 | - [ ] `make test-unit` passes all unit tests | ||
| 169 | |||
| 170 | ### Test Reorganization | ||
| 171 | - [ ] Move `tests/api.mjs` → `tests/integration/phase1_api.mjs` | ||
| 172 | - [ ] Move `tests/network.mjs` → `tests/integration/phase1_network.mjs` | ||
| 173 | - [ ] Move `tests/smoke.mjs` → `tests/integration/smoke.mjs` | ||
| 174 | - [ ] Move `tests/phase2.mjs` → `tests/integration/phase2.mjs` | ||
| 175 | - [ ] Move `tests/captive-portal.spec.mjs` → `tests/e2e/captive-portal.spec.mjs` | ||
| 176 | - [ ] Move `tests/playwright.config.mjs` → `tests/e2e/playwright.config.mjs` | ||
| 177 | - [ ] Fix all hardcoded IPs (`192.168.4.1`) → `process.env.TOLLGATE_IP` | ||
| 178 | |||
| 179 | ### New Integration Tests | ||
| 180 | - [ ] `tests/integration/phase3.mjs` — wallet GET/swap/send, identity SSID/IP, wifistr on relay | ||
| 181 | - [ ] All Phase 3 integration tests passing | ||
| 182 | |||
| 183 | ### New E2E Tests | ||
| 184 | - [ ] `tests/e2e/payment.spec.mjs` — paste token → pay → success, error handling, full flow | ||
| 185 | - [ ] All E2E tests passing | ||
| 186 | |||
| 187 | ### Build System Updates | ||
| 188 | - [ ] Update `Makefile` with `test-unit`, `test-integration`, `test-e2e`, `test-all` targets | ||
| 189 | - [ ] Update `package.json` npm scripts for new paths | ||
| 190 | - [ ] All `make test-*` targets work | ||
| 191 | |||
| 157 | ## Phase 4: ESP32-to-OpenWRT TollGate Interop — NOT STARTED | 192 | ## Phase 4: ESP32-to-OpenWRT TollGate Interop — NOT STARTED |
| 158 | - [ ] ESP32 pays OpenWRT TollGate using Cashu tokens | 193 | - [ ] ESP32 pays OpenWRT TollGate using Cashu tokens |
| 159 | - [ ] Interoperability testing with existing OpenWRT TollGate on enx00e04c683d2d | 194 | - [ ] Interoperability testing with existing OpenWRT TollGate on enx00e04c683d2d |
| 160 | 195 | ||
| 161 | ## Reminders | 196 | ## Reminders |
| 162 | - Do NOT ask for instructions — proceed independently, skip blocked items, work on unblocked ones | 197 | - Do NOT ask for instructions — proceed independently, skip blocked items, work on unblocked ones |
| 198 | - **Commit + push every time a test passes that previously didn't pass** | ||
| 163 | - Board A: `/dev/ttyACM0`, factory MAC `94:a9:90:2e:37:7c` | 199 | - Board A: `/dev/ttyACM0`, factory MAC `94:a9:90:2e:37:7c` |
| 164 | - Board B: `/dev/ttyACM1`, factory MAC `fc:01:2c:c5:50:50` | 200 | - Board B: `/dev/ttyACM1`, factory MAC `fc:01:2c:c5:50:50` |
| 165 | - Identity is now derived from nsec in config.json (SSID, IP, MAC all deterministic) | 201 | - Identity is now derived from nsec in config.json (SSID, IP, MAC all deterministic) |
| 166 | - testnut.cashu.space auto-pays invoices: `cashu -h https://testnut.cashu.space invoice <amount>` | 202 | - testnut.cashu.space auto-pays invoices: `cashu -h https://testnut.cashu.space invoice <amount>` |
| 167 | - Token generation: `cashu -h https://testnut.cashu.space send --legacy <amount> 2>&1 | grep '^cashuA' | head -1` | 203 | - Token generation: `cashu -h https://testnut.cashu.space send --legacy <amount> 2>&1 | grep '^cashuA' | head -1` |
| 168 | - sudo password: `c03rad0r123` | 204 | - sudo password: `c03rad0r123` |
| 169 | - Commit + push whenever tests pass | 205 | - Run `make test-unit` after any code change — must pass before commit |
| 206 | - See `AGENTS.md` for full testing rules and project context | ||
| 170 | - Proceed to Phase 4 after completing Phase 3 | 207 | - Proceed to Phase 4 after completing Phase 3 |