Problem
The generated merchant-docs search index is useful to agents, but production serves the multi-megabyte JSON payload without an explicit JSON content type or compressed transfer guarantee. Query relevance is also unguarded.
Acceptance criteria
- Serve /api/search as JSON with browser MIME-sniffing disabled.
- Keep the raw index within a documented ceiling and add a realistic Brotli transfer-size budget.
- Add CI checks for representative subscription, payment-gateway, and webhook queries.
- Keep the checks tied to the exported Orama index rather than a separate fixture.
Verification
- Production build succeeds.
- Search size and query-quality checks pass in CI.
- After deployment, response headers confirm JSON content type and compressed delivery.
Problem
The generated merchant-docs search index is useful to agents, but production serves the multi-megabyte JSON payload without an explicit JSON content type or compressed transfer guarantee. Query relevance is also unguarded.
Acceptance criteria
Verification