Summary
Make the reporting pipeline hold up when a report carries a large dataset. Today the payload is a single JSON blob capped at 256 KB (413 over cap) stored in one TEXT column — fine for KPIs, but it fails for a report of thousands of rows.
Context
Part of the Agent Reports epic. As agents report real tabular results (lead lists, scan results, transaction histories), the 256 KB cap and single-blob storage/transfer become the ceiling. This issue covers scaling the create, store, list, and render paths — without breaking the small-report common case.
Acceptance Criteria
Technical Notes
db/reports.py storage model (consider off-row / paginated storage for tabular payloads), services/report_service.py, routers/reports.py (REPORT_PAYLOAD_MAX_BYTES). Dual-track migration if the schema changes (SQLite db/migrations.py + Alembic). Coordinate with the export issue (streaming). OSS-core.
Summary
Make the reporting pipeline hold up when a report carries a large dataset. Today the payload is a single JSON blob capped at 256 KB (413 over cap) stored in one TEXT column — fine for KPIs, but it fails for a report of thousands of rows.
Context
Part of the Agent Reports epic. As agents report real tabular results (lead lists, scan results, transaction histories), the 256 KB cap and single-blob storage/transfer become the ceiling. This issue covers scaling the create, store, list, and render paths — without breaking the small-report common case.
Acceptance Criteria
ReportSummaryvs full-payload split)Technical Notes
db/reports.pystorage model (consider off-row / paginated storage for tabular payloads),services/report_service.py,routers/reports.py(REPORT_PAYLOAD_MAX_BYTES). Dual-track migration if the schema changes (SQLitedb/migrations.py+ Alembic). Coordinate with the export issue (streaming). OSS-core.