cortex: stop double-encoding the request body

↗ view on GitHub · emileriksenkeev · 2026-08-05 · 86bb7c61

The FormData refactor left the fetch still calling JSON.stringify on an
already-stringified payload, so every JSON call went out as the literal
"{\"limit\":10}" - a JSON string, which Express parses to a string and from
which no handler can read an argument. Cortex answered every request with its
defaults: unfiltered, limit 100, no fields, no files.

Caught by the phase-2 smoke asking for ten contracts with file links and
getting a hundred without.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Repository emileriksenkeev/sydOS
Author emileriksenkeev <emil@keev.co>
Authored
Parents 653ea76e
Stats 1 file changed , +5 , -1
Part of Cortex - company-wide document corpus integration

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-86bb7c61.md from inside the repo you want the change in.

⬇ Download capture-commit-86bb7c61.md