trustgraph/tests/unit
cybermaggedon cd5580be59
Extract-time provenance (#661)
1. Shared Provenance Module - URI generators, namespace constants,
   triple builders, vocabulary bootstrap
2. Librarian - Emits document metadata to graph on processing
   initiation (vocabulary bootstrap + PROV-O triples)
3. PDF Extractor - Saves pages as child documents, emits parent-child
   provenance edges, forwards page IDs
4. Chunker - Saves chunks as child documents, emits provenance edges,
   forwards chunk ID + content
5. Knowledge Extractors (both definitions and relationships):
   - Link entities to chunks via SUBJECT_OF (not top-level document)
   - Removed duplicate metadata emission (now handled by librarian)
   - Get chunk_doc_id and chunk_uri from incoming Chunk message
6. Embedding Provenance:
   - EntityContext schema has chunk_id field
   - EntityEmbeddings schema has chunk_id field
   - Definitions extractor sets chunk_id when creating EntityContext
   - Graph embeddings processor passes chunk_id through to
     EntityEmbeddings

Provenance Flow:
Document → Page (PDF) → Chunk → Extracted Facts/Embeddings
    ↓           ↓          ↓              ↓
  librarian  librarian  librarian    (chunk_id reference)
  + graph    + graph    + graph

Each artifact is stored in librarian with parent-child linking, and PROV-O
edges are emitted to the knowledge graph for full traceability from any
extracted fact back to its source document.

Also, updating tests
2026-03-05 18:36:10 +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 Extract-time provenance (#661) 2026-03-05 18:36:10 +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 Extract-time provenance (#661) 2026-03-05 18:36:10 +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