API: the analyst gets its maps in the prompt and reads the rest on demand (D-136)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-05 13:08:07 +01:00
1 parent 312b017ab5
commit 6e9f69a006
6 files changed
+76 -6

No files matched your search

+20 -1
View File
@@ -238,12 +238,31 @@ def check_stabilite():
assert ligne.split()[1] == "3", ligne # 4 jours, dont le 17 écarté
def check_lire_document():
b = boite(seance_temporaire())
t = b.executer_analyste("lire_document", {"nom": "carte-des-etiquettes.md",
"section": "La station s'éteint faute d'énergie"})
assert t.startswith("#### La station s'éteint faute d'énergie") and "#### Coupure du secteur" not in t, t[:200]
assert "Les frontières" in b.executer_analyste("lire_document", {"nom": "familles.md", "section": ""})
assert "sections" in leve(b.executer_analyste, "lire_document", {"nom": "familles.md", "section": "n'existe pas"})
leve(b.executer_analyste, "lire_document", {"nom": "../../.env", "section": ""})
def check_cartes():
from seance import systeme
a = systeme("analyste")
assert len(a) < 60_000, len(a) # les cartes, pas tout le savoir (214 000 caractères avant)
assert "## Sommaire" in a and "#### Un trou commun" not in a and "## Les frontières" in a
assert "lire-les-donnees.md" in a # dans l'index
assert "#### Un trou commun" not in a and "## Les outils" not in a
def check_stations_dans_la_seance():
from outils import AVEC_SORTIE
assert "stations" in AVEC_SORTIE
CHECKS = [check_stabilite, check_image_proche, check_max_tokens, check_sans_repli, check_capture_reduite, check_stations_dans_la_seance, check_boucle, check_erreur, check_cout, check_source, check_outil_qui_leve, check_lecture_refusee,
CHECKS = [check_lire_document, check_cartes, check_stabilite, check_image_proche, check_max_tokens, check_sans_repli, check_capture_reduite, check_stations_dans_la_seance, check_boucle, check_erreur, check_cout, check_source, check_outil_qui_leve, check_lecture_refusee,
check_chemin, check_station_absente, check_detecteurs, check_plafond, check_image, check_compiler]
if __name__ == "__main__":