test: añadir tests para handleEvent, runLLM y tool-use loop

Tests de command routing: builtin help/ping, comando desconocido,
RegisterCommand, alias, ACL deniega comando.

Tests de reglas + LLM: DM sin reglas cae a LLM, DM sin LLM ignora,
regla matchea ejecuta accion, ActionKindReply estatico, ActionKindLLM
invoca CompleteFunc, mencion sin reglas cae a LLM, mensaje sin match
ni mencion se ignora, LLM action sin LLM configurado.

Tests de tool-use loop: tool call ejecuta y retorna, tool call falla
pasa error al LLM, max iterations se respeta, RBAC deniega tool call,
error de LLM se propaga.

Infraestructura: mockCompleteFunc con respuestas configurables,
spyMatrixSender que graba mensajes, newTestAgent minimal.

Cobertura: handleEvent 86%, executeActions 79%, runLLM 85%

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 20:13:36 +00:00
parent 859699da33
commit 75b84fdc8d
File diff suppressed because it is too large Load Diff