Enhance logging and debugging in chunking_processor.py, graph_derive_edges.py, and ingestion_chunk_payload.py for version 4.4.0: Introduce detailed debug statements to trace chunk extraction, global scan comparisons, and payload transfers. Improve visibility into candidate pool handling and decision-making processes for callout edges, ensuring better traceability and debugging capabilities.

This commit is contained in:
Lars committed 2026-01-11 15:21:46 +01:00
1 parent ee91583614
commit c91910ee9f
3 files changed
+62 -2

No files matched your search

+6 -1
View File
@@ -76,7 +76,8 @@ async def assemble_chunks(note_id: str, md_text: str, note_type: str, config: Op
# 5. WP-15b: Candidate Pool Aufbau (Metadaten für IngestionService)
# WP-24c v4.2.7: Markiere Callout-Kanten explizit für Chunk-Attribution
# Zuerst die explizit im Text vorhandenen Kanten sammeln.
for ch in chunks:
# WP-24c v4.4.0-DEBUG: Schnittstelle 1 - Extraktion
for idx, ch in enumerate(chunks):
# Wir extrahieren aus dem bereits (durch Propagation) angereicherten Text.
# ch.candidate_pool wird im Modell-Konstruktor als leere Liste initialisiert.
for edge_info in parse_edges_robust(ch.text):
@@ -88,6 +89,10 @@ async def assemble_chunks(note_id: str, md_text: str, note_type: str, config: Op
# WP-24c v4.2.7: Callout-Kanten erhalten explicit:callout Provenance
provenance = "explicit:callout" if is_callout else "explicit"
ch.candidate_pool.append({"kind": k, "to": t, "provenance": provenance})
# WP-24c v4.4.0-DEBUG: Schnittstelle 1 - Logging
if is_callout:
logger.debug(f"DEBUG-TRACER [Extraction]: Chunk Index: {idx}, Chunk ID: {ch.id}, Kind: {k}, Target: {t}, Provenance: {provenance}, Is_Callout: {is_callout}, Raw_Edge_Str: {edge_str}")
# 6. Global Pool (Unzugeordnete Kanten - kann mitten im Dokument oder am Ende stehen)
# WP-24c v4.2.0: Konfigurierbare Header-Namen und -Ebene via .env