diff options
| author | Your Name <you@example.com> | 2026-05-19 04:10:12 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 04:10:12 +0530 |
| commit | 2d78aadfd603fab9a9342b1281ad1d46ad82cf1d (patch) | |
| tree | 3e8875b7e0301ac6634548e186542e2d67a68f34 /PLAN-SQUASH-MERGE.md | |
| parent | abee221b0f0e5a4513ab126afbdfddc2728df6be (diff) | |
feat: relay hardening — restore build, add tests, negentropy adapter
Restores build broken by eeb9d2d (cvm-relay-stability removed deps):
- CMakeLists.txt: restore display.c, font.c, local_relay.c, relay_selector.c, sync_manager.c, axs15231b, qrcode, wisp_relay
- tollgate_main.c: restore display.h, local_relay.h, relay_selector.h, sync_manager.h includes and display calls
- cvm_server.c: kept master's keepalive/timeout/ping-pong fixes
New test infrastructure:
- test-local-relay, test-relay-nip11, test-cvm-roundtrip, test-cvm-mcp, test-cross-board make targets
- test-cvm-roundtrip.mjs: MCP get_config + get_balance via public relay
- test-cross-board.mjs: cross-board payment test
- test-cvm-mcp-relay.mjs: kept from master
New unit tests (35 tests):
- test_display.c: 22 tests for escape_wifi_field
- test_negentropy_adapter.c: 13 tests for negentropy adapter
New modules:
- negentropy_adapter.c/h: NIP-77 adapter skeleton
Docs:
- AGENTS.md: display module docs, new test commands
- RELAY_HARDENING_PLAN.md: hardening checklist
- RELAY_HARDENING_MERGE.md: merge plan and checklist
Cleanup:
- Removed CHECKLIST-CVM-RELAY.md, PLAN-SQUASH-MERGE.md (stale planning docs)
- Removed components/esp-miner submodule
Host unit tests: 63/63 pass
Diffstat (limited to 'PLAN-SQUASH-MERGE.md')
| -rw-r--r-- | PLAN-SQUASH-MERGE.md | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/PLAN-SQUASH-MERGE.md b/PLAN-SQUASH-MERGE.md deleted file mode 100644 index 59eb13e..0000000 --- a/PLAN-SQUASH-MERGE.md +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | # Squash + Merge Plan: feature/cvm-relay-stability → master | ||
| 2 | |||
| 3 | ## Goal | ||
| 4 | Squash the 4 commits on `feature/cvm-relay-stability` into a single commit and | ||
| 5 | fast-forward merge into master. All tasks are complete and tested (17/17 | ||
| 6 | integration tests, 61/61 unit tests, 120s stable relay connection on Board B). | ||
| 7 | |||
| 8 | ## Checklist | ||
| 9 | - [x] Write this plan to markdown | ||
| 10 | - [x] Rebase `feature/cvm-relay-stability` onto master | ||
| 11 | - [x] Squash 4 commits into 1 | ||
| 12 | - [x] Fast-forward merge into master | ||
| 13 | - [x] Run `make test-unit` — 61/61 pass | ||
| 14 | - [x] Push master to remote | ||
| 15 | - [x] Remove worktree `/home/c03rad0r/esp32-tollgate-cvm-relay` | ||
| 16 | - [x] Delete local branch `feature/cvm-relay-stability` | ||
| 17 | - [x] Delete stale backup branches (`backup/master-2cd372c`, `backup/pre-squash-cvm-20260519-010933`, `feature/local-relay-backup`) | ||
| 18 | |||
| 19 | ## Squash commit message | ||
| 20 | ``` | ||
| 21 | feat: CVM relay stability fix + MCP relay integration tests | ||
| 22 | |||
| 23 | Relay disconnect fix: | ||
| 24 | - TLS read timeout reduced from 15s to 1s (short poll loop) | ||
| 25 | - Ping timer fires every 30s independently of read activity | ||
| 26 | - Consecutive timeout counter (65s) detects real disconnects | ||
| 27 | - Handle relay close frames (opcode 0x08) explicitly | ||
| 28 | - Result: 120s+ stable connection (previously ~37s disconnect cycle) | ||
| 29 | |||
| 30 | MCP relay integration tests (17/17 pass via `make test-cvm-mcp`): | ||
| 31 | - MCP initialize roundtrip via relay.primal.net | ||
| 32 | - get_sessions returns session array (0 active) | ||
| 33 | - get_usage returns metric/price/step fields | ||
| 34 | - Non-owner auth rejection (board silently drops) | ||
| 35 | - Owner control request passes after rejection test | ||
| 36 | |||
| 37 | Build fixes: | ||
| 38 | - Remove display/font/axs15231b deps (from display branch, not in this tree) | ||
| 39 | - Add esp_timer to CMakeLists REQUIRES | ||
| 40 | |||
| 41 | Host unit tests: 61/61 pass | ||
| 42 | ``` | ||
| 43 | |||
| 44 | ## Branch commits being squashed | ||
| 45 | 1. `81885d2` fix: non-blocking WS reads + decoupled ping timer for relay stability | ||
| 46 | 2. `61fe3ac` fix: remove display deps, add esp_timer to CMakeLists for clean build | ||
| 47 | 3. `9d701c6` test: MCP relay integration tests — get_sessions, get_usage, non-owner auth | ||
| 48 | 4. `6c1ccf1` docs: update checklist — all tasks complete | ||