My agentic slop goes here. Not intended for anyone else!
1# JMAP Testing Status 2 3## Current Status 4 5### ✅ Completed 6- Session parsing (jmap-core/jmap_session.ml) 7- Request parsing and serialization (jmap-core/jmap_request.ml) 8- Invocation parsing and serialization (jmap-core/jmap_invocation.ml) 9- JMAP client with Eio integration (jmap-client/) 10- API key configuration and loading 11 12### ⚠️ Known Issue: TLS Connection Reuse 13 14**Problem**: The Requests library has a bug where making multiple HTTPS requests with the same Requests instance causes a TLS error on the second request: 15``` 16Fatal error: exception TLS failure: unexpected: application data 17``` 18 19**Reproduction**: 20```ocaml 21let requests = Requests.create ~sw env in 22let resp1 = Requests.get requests "https://api.fastmail.com/jmap/session" in 23(* Drain body *) 24let resp2 = Requests.get requests "https://api.fastmail.com/jmap/session" in 25(* ^ Fails with TLS error *) 26``` 27 28**Impact**: The first HTTP request (session fetch) works fine, but any subsequent requests fail. 29 30**Root Cause**: Issue in Requests library's connection pooling or TLS state management when reusing connections. 31 32**Workaround Options**: 331. Create a new Requests instance for each request (inefficient) 342. Fix the Requests library's TLS connection handling 353. Disable connection pooling if that option exists 36 37**Test Case**: `jmap/test/test_simple_https.ml` demonstrates the issue 38 39## Test Results 40 41### test_fastmail.exe 42- ✅ Session parsing works 43- ✅ First HTTPS request succeeds 44- ❌ Second HTTPS request fails with TLS error 45- Status: **Blocked on Requests library bug** 46 47### What Works 48- Eio integration ✅ 49- Session fetching and parsing ✅ 50- Request building ✅ 51- JSON serialization/deserialization ✅ 52- API key loading ✅ 53- Authentication headers ✅ 54 55### What's Blocked 56- Making JMAP API calls (requires multiple HTTPS requests) 57- Email querying 58- Full end-to-end testing 59 60## Next Steps 61 621. Fix TLS connection reuse in Requests library 632. Implement Response.Parser.of_json once requests work 643. Complete end-to-end test with email querying