fix: search_by_label/search_notes tronquaient silencieusement a limit=50

limit passe a None par defaut (ETAPI renvoie tout ; un limit explicite plafonne
volontairement). Corrige un bug critique : tous les briefings (contexte, backlog,
decisions, historique, concepts) sous-estimaient le contenu des qu'une categorie
depassait 50 notes. 96 backlogItems reels contre 50 remontes. Cause-racine du
confident-but-stale. Revele en verifiant le backlog avant reprise.
This commit is contained in:
2026-07-02 15:43:05 +02:00
parent 6b29f782d3
commit cb365bf5a6
+7 -3
View File
@@ -79,11 +79,15 @@ def get_children(note_id: str) -> list:
# Recherche # Recherche
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def search_notes(query: str, limit: int = 50) -> list: def search_notes(query: str, limit: int = None) -> list:
result = _ea().search_note(search=query, limit=limit) # limit=None : pas de plafond (ETAPI renvoie tout). Un limit explicite plafonne volontairement.
if limit is None:
result = _ea().search_note(search=query)
else:
result = _ea().search_note(search=query, limit=limit)
return result.get("results", []) if isinstance(result, dict) else [] return result.get("results", []) if isinstance(result, dict) else []
def search_by_label(label: str, value: str = "", limit: int = 50) -> list: def search_by_label(label: str, value: str = "", limit: int = None) -> list:
query = f"#{label}" if not value else f"#{label}={value}" query = f"#{label}" if not value else f"#{label}={value}"
return search_notes(query, limit) return search_notes(query, limit)