Skip to content

Test gate 3/6 · End-to-end pipeline and graceful degradation tests #156

Description

@lucaosti

Sub-issue of #146layer 3 of 6.

Goal

Prove the ingestion-to-answer pipeline works end to end on real documents, and degrades honestly when it cannot.

Why this layer matters most

Unit tests cover the pieces; this is the only layer that proves they compose. The pipeline spans a Python service, a Node service, a queue, a vector store and a database — every integration point between them is untested by unit tests, and the pipeline is the product.

Happy path

  • Upload → parse → normalize → chunk → index → retrieve → answer, for a real PDF, a real PPTX and a real DOCX
  • Assert at each stage, not only at the end: parsed output faithful to source, chunks carry correct metadata, index queryable, retrieved chunks relevant, citations resolve to the correct page/slide
  • Content actually retrievable after ingestion — the single most important assertion in the suite

Fixtures

  • Commit small but genuine documents: a slide deck with real structure, a PDF with headings/tables/formulas, a DOCX
  • Keep them small enough for CI, real enough to be meaningful — a one-page "hello world" PDF proves nothing about parsing lecture material
  • Include one document with known-difficult content (formula-heavy, or a table spanning pages)

Failure paths

  • Corrupt PDF
  • Password-protected PDF
  • Empty document, or one that parses to no text
  • Unsupported file type
  • File exceeding the size limit
  • A document that parses but yields zero chunks

Each must produce an actionable error and leave the document in a coherent state — never stuck in processing forever.

Degradation

  • QVAC service unavailable → study actions fail clearly, not with an opaque 500
  • QVAC_LLM_ENABLED=false → retrieval-only mode returns passages for every action
  • Redis unavailable → cache misses, system still functions
  • ARQ worker not running → documents queue rather than silently vanishing
  • Database unavailable → health endpoint reports it accurately

Acceptance criteria

  • Full pipeline verified on all three formats with stage-by-stage assertions
  • Every failure path leaves a coherent, inspectable state
  • No degradation scenario produces an opaque error or an infinite processing state
  • Fixtures committed and documented

Note

The "stuck in processing forever" case is already known — the README troubleshooting table lists it. It should be a test, not a documented workaround.

Metadata

Metadata

Assignees

Labels

integrationBranch integration and release workmvpRequired for the MVP

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions