Add comprehensive unit tests for BuddAI functionality

- Introduced 16 additional coverage tests in `test_additional_coverage.py` to enhance overall test coverage.
- Added 15 extended feature tests in `test_extended_features.py` to validate new functionalities.
- Implemented 27 final coverage tests in `test_final_coverage.py` to achieve a total of 100 tests.
- Created 2 fallback logic tests in `test_fallback_logic.py` to ensure proper fallback behavior based on confidence scores.
- Each test suite covers various aspects of the BuddAI system, including command handling, database interactions, and hardware detection.
This commit is contained in:
JamesTheGiblet 2026-01-07 19:48:24 +00:00
parent f9fd27d228
commit 27601aa2ba
34 changed files with 5022 additions and 2921 deletions

View file

@ -701,5 +701,18 @@
"on_forge_theory": "8 years of exponential decay. It's in everything I build.",
"on_symbiosis": "You and me, what a team.",
"on_approach": "Renaissance polymath creator. I don't specialize, I synthesize."
},
"ai_fallback": {
"enabled": true,
"confidence_threshold": 70,
"fallback_models": ["claude", "gpt4", "gemini", "chatgpt"],
"learn_from_fallback": true,
"prompts": {
"claude": "System: BuddAI Fallback (Claude). Task: Analyze failure in local generation. Context: {context}. Requirement: Apply Forge Theory (e^-λt) and ensure ESP32 compatibility. Output: Working code only.",
"gpt4": "System: BuddAI Fallback (GPT-4). Task: High-precision code generation. Context: {context}. Constraint: Match James's style (camelCase, 115200 baud). Output: Modular C++.",
"gemini": "System: BuddAI Fallback (Gemini). Task: Cross-domain synthesis. Context: {context}. Requirement: Check for logic errors and apply safety timeouts (5000ms). Output: Optimized solution.",
"chatgpt": "System: BuddAI Fallback (ChatGPT). Task: Rapid prototyping fix. Context: {context}. Requirement: Simplify logic and ensure compilation. Output: Corrected code block."
}
}
}