trustgraph/trustgraph-base/trustgraph/base
cybermaggedon 6af12f416f
SPARQL engine: streaming evaluation, bind joins, and expression fixes (#947)
Convert the SPARQL algebra evaluator from eager list-based evaluation to
lazy async generators so results stream incrementally. This lets Slice
terminate early (via generator cleanup) and avoids materialising full
result sets for streamable operators like Project, Filter, Union, and
Extend. Blocking operators (Join, LeftJoin, OrderBy, Group) materialise
at their boundary then yield.

Add bind join optimization for Join nodes where one side is small
(VALUES/ToMultiSet): instead of materialising both sides independently
and hash-joining, iterate the small side's bindings and evaluate the
large side with those bindings pre-seeded. This turns wildcard BGP
queries into selective ones — e.g. VALUES ?x { <uri> } joined with a
BGP now queries the triple store with ?x bound rather than fetching
all triples.

Add TriplesClient.query_gen() async generator that wraps the existing
streaming callback API via an asyncio.Queue bridge, yielding individual
Triple objects as batches arrive.

Add streaming request path in the SPARQL query service that batches
solutions from the live async generator and sends them as they fill.

Fix FILTER IN/NOT IN: rdflib represents these as RelationalExpression
nodes with op="IN", not as Builtin_IN — handle both representations.

Fix Builtin_IN/Builtin_NOTIN dispatch ordering so the specific handlers
are checked before the generic Builtin_ prefix match.

Fix VALUES handling for rdflib's two representations: positional
(var/value) and dict-based (res).
2026-05-21 15:49:14 +01:00
..
__init__.py Per-flow librarian clients and per-workspace response queues (#865) 2026-05-06 12:01:01 +01:00
agent_client.py Add agent explainability instrumentation and unify envelope field naming (#795) 2026-04-13 16:16:42 +01:00
agent_service.py Fix docstring breakage in type hint change (#817) 2026-04-16 10:10:58 +01:00
async_processor.py Per-workspace queue routing for workspace-scoped services (#862) 2026-05-04 10:30:03 +01:00
backend.py refactor: use one fanout exchange per topic instead of shared topic exchange (#827) 2026-04-17 18:01:35 +01:00
cassandra_config.py Recent fixes -> release/v2.4 (#891) 2026-05-08 19:48:12 +01:00
chunking_service.py Per-flow librarian clients and per-workspace response queues (#865) 2026-05-06 12:01:01 +01:00
collection_config_handler.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
config_client.py feat: pluggable bootstrap framework with ordered initialisers (#847) 2026-04-22 18:03:46 +01:00
consumer.py fix: stop dropping messages on Pulsar flow restarts (#938) 2026-05-19 13:26:39 +01:00
consumer_spec.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
document_embeddings_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
document_embeddings_query_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
document_embeddings_store_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
dynamic_tool_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
embeddings_client.py Batch embeddings (#668) 2026-03-08 18:36:54 +00:00
embeddings_service.py Fix docstring breakage in type hint change (#817) 2026-04-16 10:10:58 +01:00
flow.py Close producers on flow stop to prevent stale non-persistent topics (#930) 2026-05-16 16:07:16 +01:00
flow_processor.py Per-workspace queue routing for workspace-scoped services (#862) 2026-05-04 10:30:03 +01:00
graph_embeddings_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
graph_embeddings_query_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
graph_embeddings_store_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
graph_rag_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
iam_client.py feat: add no-auth IAM regime as a drop-in replacement for iam-svc (#933) 2026-05-18 14:10:05 +01:00
kafka_backend.py fix: resolve multiple Kafka backend issues blocking message delivery (#833) 2026-04-18 22:42:24 +01:00
librarian_client.py Per-flow librarian clients and per-workspace response queues (#865) 2026-05-06 12:01:01 +01:00
librarian_spec.py Per-flow librarian clients and per-workspace response queues (#865) 2026-05-06 12:01:01 +01:00
llm_service.py Fix docstring breakage in type hint change (#817) 2026-04-16 10:10:58 +01:00
logging.py feat: add type hints to all public functions in trustgraph/base (#803) 2026-04-16 10:08:19 +01:00
metrics.py feat: add type hints to all public functions in trustgraph/base (#803) 2026-04-16 10:08:19 +01:00
parameter_spec.py Flow service lifecycle management (#822) 2026-04-16 17:19:39 +01:00
processor_group.py Better proc group logging and concurrency (#810) 2026-04-15 14:52:01 +01:00
producer.py Close producers on flow stop to prevent stale non-persistent topics (#930) 2026-05-16 16:07:16 +01:00
producer_spec.py Flow service lifecycle management (#822) 2026-04-16 17:19:39 +01:00
prompt_client.py fix: replace deprecated asyncio.iscoroutinefunction with inspect.iscoroutinefunction (#819) 2026-04-16 10:57:39 +01:00
publisher.py Messaging fabric plugins (#592) 2025-12-17 21:40:43 +00:00
pubsub.py fix: stop dropping messages on Pulsar flow restarts (#938) 2026-05-19 13:26:39 +01:00
pulsar_backend.py fix: stop dropping messages on Pulsar flow restarts (#938) 2026-05-19 13:26:39 +01:00
rabbitmq_backend.py Fix library queue lifecycle (#838) 2026-04-21 21:30:19 +01:00
request_response_spec.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
row_embeddings_query_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
serialization.py RabbitMQ pub/sub backend with topic exchange architecture (#752) 2026-04-02 12:47:16 +01:00
spec.py Feature/configure flows (#345) 2025-04-22 20:21:38 +01:00
structured_query_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
subscriber.py Fix RabbitMQ request/response race and chunker Flow API drift (#779) 2026-04-11 01:29:38 +01:00
subscriber_spec.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
text_completion_client.py Expose LLM token usage across all service layers (#782) 2026-04-13 14:38:34 +01:00
tool_client.py Add docstrings to public classes (#812) 2026-04-16 09:07:08 +01:00
tool_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
tool_service_client.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
triples_client.py SPARQL engine: streaming evaluation, bind joins, and expression fixes (#947) 2026-05-21 15:49:14 +01:00
triples_query_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
triples_store_service.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
workspace_processor.py Per-workspace queue routing for workspace-scoped services (#862) 2026-05-04 10:30:03 +01:00