┌───────────────────────────────┐
│ User / Coach │
│ (Prompt commands via ChatGPT) │
└───────────────┬───────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ ChatGPT App │
│ (LLM reasoning + tool orchestration) │
└───────────────┬─────────────────────────────┘
│ HTTPS tool call
▼
┌─────────────────────────────────────────────┐
│ Cloudflare Worker Proxy │
│ - Auth proxy between ChatGPT & APIs │
│ - Serially concatenates GitHub + ICU calls │
└───────────────┬─────────────────────────────┘
│
┌────────────┴────────────┐
▼ ▼
┌────────────────────┐ ┌──────────────────────────┐
│ GitHub Repo │ │ Intervals.icu API │
│ (Rules & schemas) │ │ (Athlete, wellness data) │
└────────────────────┘ └──────────────────────────┘
| Issue | Description | Impact |
| API Concatenation | Cloudflare combines multiple GET responses into one payload. | Causes oversized responses and JSON corruption. |
| Data Serialization Drift | Base64 + JSON double encoding across endpoints. | Loss of numeric precision and audit variance > 2%. |
| Stateless Execution | No caching or Tier-level memory between requests. | Duplicate ICU fetches and wasted API quota. |
| Proxy Overload | All routing, merging, and logic done in Cloudflare. | Brittle and unmaintainable; single point of failure. |
| Virtual LangChain | ChatGPT simulates code instead of executing real Python. | Inconsistent numeric results, non-deterministic audits. |
| Schema Coupling | No handshake between GPT schema and GitHub version. | Field renames silently break audits. |
| Lack of Observability | No logs or telemetry from Cloudflare or ChatGPT tools. | Impossible to debug intermittent failures. |
┌──────────────────────────┐
│ ChatGPT App │
│ (User interface + logic) │
└────────────┬─────────────┘
│ HTTPS (Tool call)
▼
┌──────────────────────────┐
│ Render Container │
│ (FastAPI + LangServe) │
│ ┌────────────────┐ │
│ │ LangChain │ │
│ │ + your repo │ │
│ └────────────────┘ │
│ Executes Python code │
└────────────┬─────────────┘
│
▼
┌──────────────────────────┐
│ Intervals.icu API │
│ (External Data Provider) │
└──────────────────────────┘