All 20/20 stress tests pass with the simplified approach using existing Raysurfer infrastructure.

To answer your question — the execute endpoint uses the **same underlying functions** that power `.search()` and `.upload()`. Specifically:

- **`_search_pipeline()`** from `app/api/retrieve.py` — this is the exact function that handles `POST /api/retrieve/search` (which is what `rs.search()` calls). It does semantic + verbatim search across Pinecone.
- **`_store_code_block_from_file()`** from `app/api/store.py` — this is the exact function that handles `POST /api/store/code-block` (which is what `rs.upload_new_code_snip()` calls). It embeds and stores to Pinecone.

So the execute endpoint reuses your existing search/store pipeline internally on the server side, rather than making HTTP calls to itself. It's the same code path — just called directly as Python functions instead of going through the HTTP layer.

The flow:
1. User calls `rs.execute("add 5 and 3")` 
2. Backend searches for similar prior code via `_search_pipeline()` (same as `rs.search()`)
3. If found, passes it as **reference** to Claude — Claude adapts values for the current task
4. Runs generated code in sandbox
5. On success, stores via `_store_code_block_from_file()` (same as `rs.upload_new_code_snip()`)