Skip to content

Commit 934e198

Browse files
committed
docs(protocol): Session 27 — FreeRTOS Architecture Investigation
SESSION 27 (Feb 14-15, 2026): Phase 1: Folder restructure ✅ Phase 2: FreeRTOS tasks ❌ (90KB RAM at boot broke TLS/WiFi) ROOT CAUSE: Tasks started at boot, starved TLS/WiFi SOLUTION: Start tasks AFTER connection, not at boot sdkconfig fixes found: - CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=16384 - CONFIG_LWIP_TCP_SND_BUF_DEFAULT=32768 DOCUMENTATION: - NEW: 26_PART24_SESSION_27.md - Updated: INDEX, STATUS, README, BUG_TRACKER, QUICK_REFERENCE - Updated: 03_PART1 (minor) - 17 new lessons (#121-137), 137 total GRAPHICS: - logo.png - sg_multi_agent_ft_header.ai Multi-Agent Team: Mausi, Hasi, Claude Code, Cannatoshi
1 parent 1bd8b38 commit 934e198

9 files changed

Lines changed: 34718 additions & 46 deletions

docs/protocol-analysis/01_SIMPLEX_PROTOCOL_INDEX.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,27 @@
44

55
**Project:** SimpleGo - Native ESP32 SMP Implementation
66
**Version:** v0.1.18-alpha
7-
**Last Updated:** 2026-02-14 (Session 26🗄️ Persistence!)
7+
**Last Updated:** 2026-02-15 (Session 27⚠️ FreeRTOS Architecture Investigation)
88

99
---
1010

11-
## 🗄️ LATEST: Ratchet State Persistence! (Session 26)
11+
## ️ LATEST: Architecture Investigation (Session 27)
1212

13-
On February 14, 2026, Session 26 achieved **Milestone 6**:
13+
On February 14-15, 2026, Session 27 investigated FreeRTOS multi-task architecture:
1414

15-
- **Milestone 6:** ESP32 survives reboot without losing crypto state!
16-
- **Write-Before-Send:** Evgeny's golden rule implemented (7.5ms)
17-
- **NVS Storage:** 128KB partition, 150+ contacts supported
15+
- **Phase 1:** Folder restructure ✅ Works
16+
- **Phase 2:** FreeRTOS Tasks ❌ Broke main (90KB RAM at boot)
17+
- **Root Cause:** Tasks started at boot, starved TLS/WiFi
18+
- **Solution:** Start tasks AFTER connection, not at boot
1819

19-
**Lessons Learned:** 120 total (8 new in S26)
20+
**sdkconfig fixes:** OUT_CONTENT_LEN=16384, TCP_SND_BUF=32768
21+
**Lessons Learned:** 137 total (17 new in S27)
2022

2123
---
2224

2325
## Documentation Structure
2426

25-
The complete protocol analysis (~21,000+ lines, 457+ sections) is split into 23 parts:
27+
The complete protocol analysis (~22,000+ lines, 473+ sections) is split into 24 parts:
2628

2729
| Part | File | Lines | Content |
2830
|------|------|-------|---------|
@@ -49,17 +51,18 @@ The complete protocol analysis (~21,000+ lines, 457+ sections) is split into 23
4951
| 21 | [23_PART21_SESSION_24.md](23_PART21_SESSION_24.md) | ~600 | 🏆 First Chat Message! Milestone #2! |
5052
| **22** | [**24_PART22_SESSION_25.md**](24_PART22_SESSION_25.md) | **~480** | **🎯 Bidirectional + Receipts! M3,4,5!** |
5153
| **23** | [**25_PART23_SESSION_26.md**](25_PART23_SESSION_26.md) | **~600** | **🗄️ Persistence! Milestone 6!** |
52-
| **Total** | | **~21,000+** | **457+ Sections** |
54+
| **24** | [**26_PART24_SESSION_27.md**](26_PART24_SESSION_27.md) | **~650** | **⚠️ FreeRTOS Architecture Investigation** |
55+
| **Total** | | **~22,000+** | **473+ Sections** |
5356

5457
---
5558

5659
## Quick Reference Documents
5760

5861
| Document | Lines | Description |
5962
|----------|-------|-------------|
60-
| [README.md](README.md) | ~560 | Project overview and navigation |
61-
| [BUG_TRACKER.md](BUG_TRACKER.md) | ~1,350 | All 39 bugs documented, 120 lessons |
62-
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | ~1,200 | Constants, wire formats, verified values |
63+
| [README.md](README.md) | ~620 | Project overview and navigation |
64+
| [BUG_TRACKER.md](BUG_TRACKER.md) | ~1,400 | All 39 bugs documented, 137 lessons |
65+
| [QUICK_REFERENCE.md](QUICK_REFERENCE.md) | ~1,280 | Constants, wire formats, verified values |
6366

6467
---
6568

@@ -90,6 +93,7 @@ The complete protocol analysis (~21,000+ lines, 457+ sections) is split into 23
9093
| **24** | **Feb 11-13, 2026** | **FIRST A_MSG** | **🏆 First Chat Message!** |
9194
| **25** | **Feb 13-14, 2026** | **BIDIRECTIONAL** | **🎯 Chat + Receipts! (8 bugs)** |
9295
| **26** | **Feb 14, 2026** | **PERSISTENCE** | **🗄️ Milestone 6! Ratchet State Persistence** |
96+
| **27** | **Feb 14-15, 2026** | **ARCHITECTURE** | **⚠️ FreeRTOS Investigation (17 lessons)** |
9397

9498
---
9599

docs/protocol-analysis/02_SIMPLEX_STATUS.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1-
# SimpleGo - Current Status (2026-02-14)
1+
![SimpleGo](../gfx/sg_multi_agent_ft_header.png)
2+
3+
# SimpleGo - Current Status (2026-02-15)
24

35
**Project:** Native SimpleX SMP Client for ESP32
46
**Version:** v0.1.18-alpha
5-
**Archive:** See `01_SIMPLEX_PROTOCOL_INDEX.md` for complete documentation (457+ sections, 23 parts)
7+
**Archive:** See `01_SIMPLEX_PROTOCOL_INDEX.md` for complete documentation (473+ sections, 24 parts)
8+
9+
---
10+
11+
## ⚠️ LATEST: Architecture Investigation (2026-02-15 Session 27)
12+
13+
```
14+
═══════════════════════════════════════════════════════════════════════════════
15+
16+
⚠️⚠️⚠️ FREERTOS ARCHITECTURE INVESTIGATION ⚠️⚠️⚠️
17+
18+
┌─────────────────────────────────────────────────────────────────────────┐
19+
│ │
20+
│ Phase 1: Folder restructure ✅ WORKS │
21+
│ Phase 2: FreeRTOS Tasks ❌ BROKE main (90KB RAM at boot) │
22+
│ Phase 3: Network Task Migration — branch polluted │
23+
│ │
24+
│ ROOT CAUSE: Tasks started at boot, starved TLS/WiFi │
25+
│ SOLUTION: Start tasks AFTER connection, not at boot │
26+
│ │
27+
│ Date: February 14-15, 2026 │
28+
│ Lessons Learned: 17 new (137 total) │
29+
│ │
30+
└─────────────────────────────────────────────────────────────────────────┘
31+
32+
═══════════════════════════════════════════════════════════════════════════════
33+
```
634

735
---
836

9-
## 🗄️ LATEST: MILESTONE 6! (2026-02-14 Session 26)
37+
## 🗄️ SESSION 26: Persistence! (2026-02-14)
1038

1139
```
1240
═══════════════════════════════════════════════════════════════════════════════
@@ -342,15 +370,15 @@ Bytes 80-95: HEADER_IV (iv2) ← FOR HEADER!
342370

343371
---
344372

345-
## 🎯 Next Steps (Session 27)
373+
## 🎯 Next Steps (Session 28)
346374

347-
1. **Fix "bad message ID"**Persist send counter in NVS
348-
2. **Multi-Task Architecture**SMP Receive, SMP Send, LVGL UI tasks
349-
3. **Complete Chat UI**Connect keyboard to chat screen
350-
4. **Message bridge**SMP ↔ LVGL task communication
351-
5. **Post-quantum upgrade**Full SNTRUP761 KEM implementation
375+
1. **Revert Phase 2 commit on main**Restore working state
376+
2. **Keep sdkconfig fixes**OUT_CONTENT_LEN=16384, TCP_SND_BUF=32768
377+
3. **Redesign task startup**Tasks AFTER connection, not at boot
378+
4. **Phase 3 restart**Fresh branch from working main
379+
5. **Multi-task architecture**Proper implementation this time
352380

353381
---
354382

355-
*Status updated: 2026-02-14 Session 26🗄️ RATCHET STATE PERSISTENCE!*
356-
*History: S8 Breakthrough → S23 CONNECTED → S24 First MSG → S25 Bidirectional → S26 Persistence!*
383+
*Status updated: 2026-02-15 Session 27⚠️ FreeRTOS Architecture Investigation*
384+
*History: S8 Breakthrough → S23 CONNECTED → S24 First MSG → S25 Bidirectional → S26 Persistence → S27 Architecture*

docs/protocol-analysis/03_PART1_INTRO_SESSIONS_1-2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
![SimpleGo](../gfx/sg_multi_agent_ft_header.png)
22

3+
34
# SimpleX Protocol Analysis - A_VERSION Error Debugging
45

56
## 🚀 WE ARE THE FIRST! 🚀

0 commit comments

Comments
 (0)