Commit 90f2494
feat: paginate result endpoint, remove Redis result cache (#4957)
## Summary
- **Phase A**: `GET /api/v0/tasks/{id}/result` gains optional
`offset`/`limit` query params. Reads paginated rows from ClickHouse with
citation resolution and internal column stripping. Sets
`X-Total-Row-Count` header. Without params, behavior unchanged (backward
compatible).
- **Phase B**: MCP server no longer caches results in Redis.
`futuresearch_results` fetches paginated rows directly from the Engine.
Download endpoint calls the Engine's internal API (no auth). Deletes
~400 lines of Redis caching logic.
- Makes `MCP_SERVER_URL`, `MCP_SANDBOX_URL`, `TRUST_PROXY_HEADERS`
configurable in everyrow-cc compose (needed for CF tunnel testing).
## What gets deleted (net simplification)
| Component | Lines |
|-----------|-------|
| `try_cached_result()` | ~65 |
| `try_store_result()` | ~70 |
| Redis result cache functions | ~50 |
| Test classes for cache logic | ~200+ |
| **Net** | **-528 lines** |
## Test plan
- [x] Engine unit tests (40 passed)
- [x] MCP unit tests (392 passed)
- [x] Local E2E: submit rank task → paginated result → download CSV
- [x] Claude.ai E2E via CF tunnel: submit task, progress polling,
results
- [ ] Deploy Engine to staging, verify backward compat
- [ ] Deploy MCP to staging, verify no `mcp:result:*` Redis keys
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sourced from commit 58ea2dd6c73bdfa517e974fad3573712508203d41 parent a3942ae commit 90f2494
14 files changed
Lines changed: 451 additions & 1601 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | 25 | | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | 175 | | |
238 | 176 | | |
239 | 177 | | |
| |||
293 | 231 | | |
294 | 232 | | |
295 | 233 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
0 commit comments