trustgraph/tests/unit
cybermaggedon a630e143ef
Incremental / large document loading (#659)
Tech spec

BlobStore (trustgraph-flow/trustgraph/librarian/blob_store.py):
- get_stream() - yields document content in chunks for streaming retrieval
- create_multipart_upload() - initializes S3 multipart upload, returns
  upload_id
- upload_part() - uploads a single part, returns etag
- complete_multipart_upload() - finalizes upload with part etags
- abort_multipart_upload() - cancels and cleans up

Cassandra schema (trustgraph-flow/trustgraph/tables/library.py):
- New upload_session table with 24-hour TTL
- Index on user for listing sessions
- Prepared statements for all operations
- Methods: create_upload_session(), get_upload_session(),
  update_upload_session_chunk(), delete_upload_session(),
  list_upload_sessions()

- Schema extended with UploadSession, UploadProgress, and new
  request/response fields
- Librarian methods: begin_upload, upload_chunk, complete_upload,
  abort_upload, get_upload_status, list_uploads
- Service routing for all new operations
- Python SDK with transparent chunked upload:
  - add_document() auto-switches to chunked for files > 10MB
  - Progress callback support (on_progress)
  - get_pending_uploads(), get_upload_status(), abort_upload(),
    resume_upload()

- Document table: Added parent_id and document_type columns with index
- Document schema (knowledge/document.py): Added document_id field for
  streaming retrieval
- Librarian operations:
  - add-child-document for extracted PDF pages
  - list-children to get child documents
  - stream-document for chunked content retrieval
  - Cascade delete removes children when parent is deleted
  - list-documents filters children by default
- PDF decoder (decoding/pdf/pdf_decoder.py): Updated to stream large
  documents from librarian API to temp file
- Librarian service (librarian/service.py): Sends document_id instead of
  content for large PDFs (>2MB)
- Deprecated tools (load_pdf.py, load_text.py): Added deprecation
  warnings directing users to tg-add-library-document +
  tg-start-library-processing

Remove load_pdf and load_text utils

Move chunker/librarian comms to base class

Updating tests
2026-03-04 16:57:58 +00:00
..
test_agent Tool services - dynamically pluggable tool implementations for agent frameworks (#658) 2026-03-04 14:51:32 +00:00
test_base Fix subscriber unexpected message causing queue clogging (#642) 2026-02-23 14:34:05 +00:00
test_chunking Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
test_cli Fix/tests (#647) 2026-02-23 22:01:47 +00:00
test_clients trustgraph-base .chunks / .documents confusion in the API (#481) 2025-09-02 17:58:53 +01:00
test_config Structure data mvp (#452) 2025-08-07 20:47:20 +01:00
test_cores Changed schema for Value -> Term, majorly breaking change (#622) 2026-01-27 13:48:08 +00:00
test_decoding Incremental / large document loading (#659) 2026-03-04 16:57:58 +00:00
test_direct Entity-centric graph (#633) 2026-02-16 13:26:43 +00:00
test_embeddings Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_extract Changed schema for Value -> Term, majorly breaking change (#622) 2026-01-27 13:48:08 +00:00
test_gateway Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_knowledge_graph Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_query Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_retrieval Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_rev_gateway Fix tests (#593) 2025-12-19 08:53:21 +00:00
test_storage Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
test_text_completion Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
__init__.py Test suite executed from CI pipeline (#433) 2025-07-14 14:57:44 +01:00
test_prompt_manager.py Feature/prompts jsonl (#619) 2026-01-26 17:38:00 +00:00
test_prompt_manager_edge_cases.py Update to enable knowledge extraction using the agent framework (#439) 2025-07-21 14:31:57 +01:00
test_python_api_client.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00