SurfSense/surfsense_backend
CREDO23 b9937cf4b1 refactor(chat): cut live chat streaming over to flows orchestrators (cutover)
Flip the live callers (new_chat_routes + gateway/agent_invoke) from the
legacy monolithic app.tasks.chat.stream_new_chat to the side-by-side
app.tasks.chat.streaming.flows orchestrators.

Adds a byte-for-byte differential parity test driving BOTH implementations
on identical, fully-deterministic glue inputs (frozen time/uuid, stubbed
LLM/persistence/agent seams). All glue paths are byte-identical:
  * new: auto-pin failure, LLM-load failure, persist-user fail,
    persist-assistant fail (full initial-frame ordering + handshake),
    pre-stream exception (top-level except path)
  * resume: persist-assistant fail

The differential test also surfaced one INTENTIONAL divergence: on a resume
turn whose auto-pin / LLM-load fails, the monolith crashes with
UnboundLocalError (_resume_premium_request_id read in finally before its
post-early-return definition); the flows version emits a clean terminal
error. The flows path is therefore byte-identical or strictly more correct.

The agent-content stream itself is shared, unforkable code
(stream_output -> EventRelay) so it cannot diverge.

Monolith + old parity test deletion follows in a separate commit.
2026-06-04 14:24:18 +02:00
..
alembic fix(db): restore automation_runs to zero_publication 2026-06-02 16:56:01 +02:00
app refactor(chat): cut live chat streaming over to flows orchestrators (cutover) 2026-06-04 14:24:18 +02:00
scripts Merge remote-tracking branch 'upstream/dev' into feat/whatsapp-gateway-integration 2026-06-02 00:29:32 +05:30
tests refactor(chat): cut live chat streaming over to flows orchestrators (cutover) 2026-06-04 14:24:18 +02:00
.dockerignore chore(backend): exclude tests/ from production Docker image 2026-05-06 17:16:22 +05:30
.env.example refactor(config): remove dead MULTI_AGENT_CHAT_ENABLED flag (bucket B5) 2026-06-04 13:44:02 +02:00
.gitignore chore(backend): ignore local object store 2026-06-02 16:56:01 +02:00
.python-version feat: SurfSense v0.0.6 init 2025-03-14 18:53:14 -07:00
alembic.ini add github connector, add alembic for db migrations, fix bug updating connectors 2025-04-13 13:56:22 -07:00
celery_worker.py fix: celery_app path and gmail indexing 2025-10-21 21:11:41 -07:00
Dockerfile fix: docker one click setup 2026-05-20 01:25:07 -07:00
main.py feat(observability): add OpenTelemetry process bootstrap 2026-05-21 23:01:54 +05:30
pyproject.toml test: switch pytest to importlib import mode 2026-06-03 21:52:54 +02:00
uv.lock chore(backend): add azure-storage-blob dependency 2026-06-02 16:10:43 +02:00