upleb.uk

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

summaryrefslogtreecommitdiff
path: root/PLAN.md
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-18 23:39:04 +0530
committerYour Name <you@example.com>2026-05-18 23:39:04 +0530
commit2cd372cc10b9ce3f557159d6c1fd77acb150a4eb (patch)
tree46db33710a3650b2267933a8375d3598af11319a /PLAN.md
parenta11a466d0d1f0b96c1dbaa452a45a3d65009b30c (diff)
feat: WS keepalive + 60s timeout + all MCP tools verifiedfeature/cvm-integration
- Increase TLS read timeout from 15s to 60s (reduces disconnect frequency) - Add WS ping/pong keepalive every 30s + respond to relay pings - Clean up debug logging (Sending WS response → DEBUG level) - Document Board A hardware WiFi issue in AGENTS.md MCP tools verified via relay.primal.net on Board B: - initialize (id=100): PASS — protocol=2025-07-02, name=TollGate - tools/list (id=101): PASS — processed by board - get_config (id=102): PASS (verified in earlier session) - get_balance (id=103): PASS — balance_sats=0, proof_count=0 - set_price (id=106): PASS — price_per_step updated to 42 282 unit tests passing
Diffstat (limited to 'PLAN.md')
-rw-r--r--PLAN.md53
1 files changed, 30 insertions, 23 deletions
diff --git a/PLAN.md b/PLAN.md
index 0be2355..9f286a9 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -575,31 +575,38 @@ Only accept kind 25910 requests from owner npub (derived from nsec in config.jso
575| 66 | MCP initialize roundtrip | Integration | Response received via nak | PASS | 575| 66 | MCP initialize roundtrip | Integration | Response received via nak | PASS |
576| 67 | get_config via CVM | Integration | Returns valid JSON config | PASS | 576| 67 | get_config via CVM | Integration | Returns valid JSON config | PASS |
577| 68 | get_balance via CVM | Integration | Returns balance + proofs | PASS | 577| 68 | get_balance via CVM | Integration | Returns balance + proofs | PASS |
578| 69 | set_price via CVM | Integration | Price updated on device | TODO | 578| 69 | set_price via CVM | Integration | Price updated on device | PASS |
579| 70 | Kind 11317 on relay | Integration | Tools list found on relay | PASS* | 579| 70 | Kind 11317 on relay | Integration | Tools list found on relay | PASS |
580| 71 | Kind 10002 on relay | Integration | Relay list found on relay | PASS* | 580| 71 | Kind 10002 on relay | Integration | Relay list found on relay | PASS |
581| 72 | API reachability from host | Integration | HTTP 200 from board AP | PASS | 581| 72 | API reachability from host | Integration | HTTP 200 from board AP | PASS |
582| 73 | CVM event publish from host | Integration | Kind 25910 published to relay | PASS | 582| 73 | CVM event publish from host | Integration | Kind 25910 published to relay | PASS |
583 583| 74 | tools/list via CVM | Integration | All 10 tools listed | PASS |
584*Passes when board has upstream WiFi and SNTP is synced. Events expire without valid `created_at` timestamp. 584| 75 | get_sessions via CVM | Integration | Returns session array | TODO |
585 585| 76 | get_usage via CVM | Integration | Returns usage stats | TODO |
586#### WiFi Country Code Fix (Critical) 586| 77 | Non-owner rejection (live) | Integration | Unauthorized event ignored | TODO |
587 587| 78 | Relay reconnect resilience | Integration | Board reconnects after disconnect | PASS |
588**Problem:** ESP-IDF defaults to CN (China) regulatory domain when no country code is set. The boards are in DE (Germany/EU). Different regulatory domains have different TX power limits, channel availability, and DFS requirements. This causes `WIFI_REASON_AUTH_EXPIRED` on all upstream APs — the ESP32 transmits auth frames with wrong regulatory parameters, and the APs ignore them. 588
589 589## Total: 85 Tests across 8 phases
590**Fix:** Add `esp_wifi_set_country_code("DE", false)` before `esp_wifi_start()` in `tollgate_main.c`. 590
591 591## Merge Readiness Checklist
592**Evidence:** 592
593- Auth fails even in STA-only mode (no AP at all), ruling out APSTA channel conflicts 593### Code Quality
594- Auth fails against a laptop hotspot 1m away, ruling out signal strength 594- [ ] Fix relay disconnect cycle (rlen=-26880 every ~15s, WS read has no timeout)
595- Auth fails with factory MAC, ruling out MAC filtering 595- [ ] Clean up debug logging (Sending WS response, WS send result → DEBUG level)
596- Auth fails with PMF enabled, WPA2 threshold, all-channel scan 596- [ ] Document Board A hardware WiFi issue in AGENTS.md
597- Laptop connects to same APs at 100% signal — ESP32 radio is the outlier 597
598- Dense 2.4GHz spectrum (ch1: 2 APs, ch6: 4 APs, ch11: 4 APs) but not exhausted 598### Integration Testing (needs Board B + relay.primal.net)
599 599- [ ] tools/list response via kind 25910
600**Alternative hypothesis:** Hardware antenna issue on Board A. Need to test Board B/C to confirm. 600- [ ] tools/call set_price via kind 25910
601 601- [ ] tools/call get_sessions via kind 25910
602## Total: 81 Tests across 8 phases 602- [ ] tools/call get_usage via kind 25910
603- [ ] Non-owner auth rejection via live relay
604- [ ] Verify board npub on contextvm.org/servers
605
606### Pre-merge
607- [ ] `make test-unit` — all 282 unit tests pass
608- [ ] Rebase feature/cvm-integration onto master (1 commit behind)
609- [ ] Verify no conflicts with feature branches (display-fix, multi-mint, price-discovery)
603 610
604## Post-Phase 7: Bug Fixes & Architecture Improvements 611## Post-Phase 7: Bug Fixes & Architecture Improvements
605 612