Add unit tests for analytics, fallback client, and refactored validators

- Implemented comprehensive unit tests for the BuddAI Analytics module, covering fallback statistics calculations.
- Created tests for the FallbackClient to ensure proper escalation to various AI models and handling of missing API keys.
- Developed unit tests for the refactored validator system, validating various hardware and coding standards.
- Established a base validator interface and implemented specific validators for ESP32, Arduino, motor control, memory safety, and more.
- Enhanced the validator registry to auto-discover and manage validators effectively.
- Included detailed validation logic for common issues in embedded systems programming, such as unused variables, safety timeouts, and coding style violations.
This commit is contained in:
JamesTheGiblet 2026-01-08 17:43:11 +00:00
parent 99ef8f5592
commit d4e09f6d13
43 changed files with 5036 additions and 622 deletions

View file

@ -0,0 +1,6 @@
from . import BaseValidator
class ForgeTheoryValidator(BaseValidator):
def validate(self, code: str, hardware: str, user_message: str) -> list[dict]:
# Placeholder for exponential decay validation
return []