Keep tool output out of span errors and fix trace status and listing

Tool results, denial comments and tool exception text now reach a span only
as a capture-gated preview; span.error is a fixed message, since it is
stored and exported regardless of content settings. A turn whose stream
yields an error event is recorded as failed. Search traces are listed by a
query copied into the small summary column, so the Logs timeline never
reads the spans JSONB. Adds GraphRAG span tests.
This commit is contained in:
arc53-machine committed 2026-09-23 18:11:19 +01:00
1 parent 285fdc914c
commit efec1a2f83
9 files changed
+134 -13

No files matched your search

+4 -3
View File
@@ -99,9 +99,10 @@ def _trace_branch(name: str, sources_sql: str, scope: str) -> dict:
return {
"name": name,
"level": "CASE WHEN t.status = 'error' THEN 'error' ELSE 'info' END",
# A search's query sits in its retrieval span's preview; graph builds
# are named after their source.
"summary": "COALESCE(t.spans->0->'preview'->>'query', t.name, t.source)",
# A search is listed by its query (copied into the small ``summary``
# at flush so this never detoasts ``spans``); graph builds are named
# after their source.
"summary": "COALESCE(t.summary->>'query', t.name, t.source)",
"where": [f"t.source IN {sources_sql}", scope],
"sql": f"""
SELECT '{name}' AS event_type,