Update graph_derive_edges.py and ingestion_chunk_payload.py for version 4.3.0: Introduce debug logging for data transfer audits and candidate pool handling to address potential data loss. Ensure candidate_pool is explicitly retained for accurate chunk attribution, enhancing traceability and reliability in edge processing.

This commit is contained in:
Lars committed 2026-01-11 14:51:38 +01:00
1 parent 727de50290
commit 3a17b646e1
2 files changed
+48 -3

No files matched your search

@@ -2,7 +2,8 @@
FILE: app/core/ingestion/ingestion_chunk_payload.py
DESCRIPTION: Baut das JSON-Objekt für 'mindnet_chunks'.
Fix v2.4.3: Integration der zentralen Registry (WP-14) für konsistente Defaults.
VERSION: 2.4.3
WP-24c v4.3.0: candidate_pool wird explizit übernommen für Chunk-Attribution.
VERSION: 2.4.4 (WP-24c v4.3.0)
STATUS: Active
"""
from __future__ import annotations
@@ -85,6 +86,8 @@ def make_chunk_payloads(note: Dict[str, Any], note_path: str, chunks_from_chunke
prev_id = getattr(ch, "neighbors_prev", None) if not is_dict else ch.get("neighbors_prev")
next_id = getattr(ch, "neighbors_next", None) if not is_dict else ch.get("neighbors_next")
section = getattr(ch, "section_title", "") if not is_dict else ch.get("section", "")
# WP-24c v4.3.0: candidate_pool muss erhalten bleiben für Chunk-Attribution
candidate_pool = getattr(ch, "candidate_pool", []) if not is_dict else ch.get("candidate_pool", [])
pl: Dict[str, Any] = {
"note_id": nid or fm.get("id"),
@@ -102,7 +105,8 @@ def make_chunk_payloads(note: Dict[str, Any], note_path: str, chunks_from_chunke
"path": note_path,
"source_path": kwargs.get("file_path") or note_path,
"retriever_weight": rw,
"chunk_profile": cp
"chunk_profile": cp,
"candidate_pool": candidate_pool # WP-24c v4.3.0: Kritisch für Chunk-Attribution
}
# Audit: Cleanup Pop (Vermeidung von redundanten Alias-Feldern)