Commit Graph

7 Commits

Author SHA1 Message Date
93800ca6bb feat: Add IT_009 end-to-end conversation loop test
Ajout du test d'intégration le plus complet qui valide toute
la boucle conversationnelle AISSIA en conditions réelles.

Test IT_009_FullConversationLoop:
- Scénario en 3 étapes validant le flux complet
- Step 1: Voice "Prends note que j'aime le C++"
  → AI → LLM (appelle storage_save_note) → Storage sauvegarde
- Step 2: Voice "Qu'est-ce que j'aime ?"
  → AI → LLM (appelle storage_query_notes) → Storage récupère
- Step 3: Validation cohérence conversationnelle

Validations:
 Communication Voice → AI → LLM
 Exécution tools MCP (storage_save_note, storage_query_notes)
 Persistence et retrieval de données
 Cohérence conversation multi-tour
 Cleanup automatique des fichiers de test

Résultat final: 9/9 tests d'intégration opérationnels
- 4 tests MCP (tools)
- 4 tests flux (communications inter-modules)
- 1 test end-to-end (boucle complète)

Total: ~35s pour valider AISSIA en conditions réelles

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:43:37 +08:00
d5cbf3b994 feat: Add modular integration test system with 8 tests
Implémentation complète d'un système de tests d'intégration modulaire
pour valider AISSIA en conditions réelles.

Architecture "Un module = Un test":
- Chaque test est un module GroveEngine (.so) chargé dynamiquement
- TestRunnerModule orchestre l'exécution de tous les tests
- Rapports console + JSON avec détails complets
- Exit codes appropriés pour CI/CD (0=success, 1=failure)

Infrastructure:
- ITestModule: Interface de base pour tous les tests
- TestRunnerModule: Orchestrateur qui découvre/charge/exécute les tests
- Configuration globale: config/test_runner.json
- Flag --run-tests pour lancer les tests

Tests implémentés (8/8 passing):

Phase 1 - Tests MCP:
 IT_001_GetCurrentTime: Test tool get_current_time via AI
 IT_002_FileSystemWrite: Test tool filesystem_write
 IT_003_FileSystemRead: Test tool filesystem_read
 IT_004_MCPToolsList: Vérification inventaire tools (≥5)

Phase 2 - Tests Flux:
 IT_005_VoiceToAI: Communication Voice → AI
 IT_006_AIToLLM: Requête AI → Claude API (réelle)
 IT_007_StorageWrite: AI → Storage (sauvegarde note)
 IT_008_StorageRead: AI → Storage (lecture note)

Avantages:
🔥 Hot-reload ready: Tests modifiables sans recompiler
🌐 Conditions réelles: Vraies requêtes Claude API, vrais fichiers
🎯 Isolation: Chaque test indépendant, cleanup automatique
📊 Rapports complets: Console + JSON avec détails par test
 CI/CD ready: Exit codes, JSON output, automation-friendly

Usage:
  cmake --build build --target integration_tests
  cd build && ./aissia --run-tests

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:37:59 +08:00
18f4f16213 feat: Add WebModule for HTTP requests via IIO
Implements WebModule that allows other modules to make HTTP requests
through IIO pub/sub messaging system.

Features:
- HTTP GET/POST support via existing HttpClient
- Request/response via IIO topics (web:request/web:response)
- Security: blocks localhost and private IPs
- Statistics tracking (total, success, failed)
- Hot-reload state preservation
- Custom headers and timeout configuration

Module architecture:
- WebModule.h/cpp: 296 lines total (within 300 line limit)
- config/web.json: Configuration file
- 10 integration tests (TI_WEB_001 to TI_WEB_010)

Tests: 120/120 passing (110 existing + 10 new)

Protocol:
- Subscribe: web:request
- Publish: web:response
- Request fields: requestId, url, method, headers, body, timeoutMs
- Response fields: requestId, success, statusCode, body, error, durationMs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:15:46 +08:00
d56993a48e fix: Fix 8 failing module tests (now 110/110 passing)
Module fixes:
- MonitoringModule: Publish app_changed for first app (empty oldApp)
- MonitoringModule: Add appName and classification fields to events
- AIModule: Publish ai:suggestion in handleLLMResponse
- VoiceModule: Support flat config format (ttsEnabled/sttEnabled)
- StorageModule: Support both durationMinutes and duration fields

Test fixes:
- AIModuleTests: Simulate LLM responses for hyperfocus/break tests

All 110 tests now pass (252 assertions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:44:41 +08:00
58d7ca4355 fix: Enable HTTPS for Claude API and fix interactive mode IIO routing
- HttpClient: Use full URL with scheme (https://) for proper SSL support
- main.cpp: Create separate InteractiveClient IO to avoid self-delivery skip
- main.cpp: Process llm:response messages in main loop for terminal display
- ClaudeProvider: Add debug logging for request details

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 07:27:56 +08:00
64d485729b fix: Fix test fixtures JsonDataNode constructor calls
- Add 'servers' key to mock_mcp.json (MCPClient expects this structure)
- Add 'servers' wrapper to MCPClientTests.cpp test configs
- Fix JsonDataNode constructor calls in test fixtures:
  - JsonDataNode(json) -> JsonDataNode("name", json)
  - Affected: AIModuleTests, MonitoringModuleTests, StorageModuleTests,
    VoiceModuleTests, TimeSimulator

Test results:
- Module tests: 52/60 passing (87%)
- MCP Types tests: 15/15 passing (100%)
- MCP Transport/Client: Require Python server integration fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:49:50 +08:00
83d901aaab test: Implement 20 integration tests for Scheduler and Notification modules
- Add Catch2 test framework with MockIO and TimeSimulator utilities
- Implement 10 TI for SchedulerModule (task lifecycle, hyperfocus, breaks)
- Implement 10 TI for NotificationModule (queue, priority, silent mode)
- Fix SchedulerModule: update m_lastActivityTime in process()
- Add AISSIA_TEST_BUILD guards to avoid symbol conflicts
- All 20 tests passing (69 assertions total)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 09:49:08 +08:00