- Add comprehensive testing framework with 67 test cases covering unit, integration, and functional testing
- Create universal YAML validator supporting all activity types with validation for metadata operations, terminal steps, and Python syntax
- Implement proper Makefile with venv management and test runners following unDRY principles for copy-paste engineering
- Add requirements-test.txt for test dependencies separation
- Configure pytest with conftest.py for proper environment variable management
- Update CLAUDE.md with Makefile best practices
- All 67 tests passing with proper mocking of external dependencies
Testing coverage includes:
• Unit tests (37): Core app functions, utilities, navigation, response handling
• Integration tests (20): Complete activity workflows and error handling
• Functional tests (9): Full battleship game scenarios and edge cases
• YAML validator (17): Universal validation for all activity configurations
- Create universal activity_yaml_validator.py for validating activity configurations
- Add validation for metadata operations (metadata_add, metadata_remove, metadata_feedback_filter, etc.)
- Validate terminal steps cannot have questions or buckets
- Check Python syntax in processing_script and pre_script blocks
- Validate YAML structure, transitions, and logic flow
- Add 17 comprehensive unit tests with 100% pass rate
- Include test fixtures for validation testing
- Support both CLI and programmatic usage
- Add matplotlib.use("Agg") backend configuration to prevent runtime errors in headless environments
- Add error handling guards for script results that might return None
- Fix AI targeting logic to exclude already-fired cells in super hunter and hunter modes
- Update CLAUDE.md with matplotlib best practices
- Add pass statements to empty else blocks that only contained commented prints
- Ensures Python syntax remains valid after commenting out debug statements
- Add user_response to pre-script metadata for better game state management
- Implement metadata_feedback_filter to control feedback data exposure
- Improve ship destruction announcements and game over messaging
- Add debug logging for ship sinking events
- Include test ship configuration file
- Add new Hermes Reasoner AI mode that combines probability analysis with LLM reasoning
- Implement pre-script and post-script architecture in app.py for flexible YAML processing
- Fix game ending detection by adding transition override mechanism
- Add probability matrix visualization and strategic move analysis
- Support both legacy processing_script and new pre_script/post_script naming
- Restore full ship complement for complete battleship gameplay
- Prevent SQL injection in search functionality with input sanitization
- Add path traversal protection for local file operations
- Replace hardcoded secret key with environment variable
- Escape HTML output to prevent XSS attacks in image generation
- Restrict file access to research/ directory with .yaml extension only
- Add comprehensive input validation and error handling
Security improvements maintain full application functionality while
protecting against common web application vulnerabilities.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace unsafe eval() with sympy for secure expression parsing
- Add YAML anchors to eliminate code duplication in processing scripts
- Implement multiple function plotting with comma-separated syntax
- Add dynamic plot ranges based on function characteristics
- Include automatic function type detection and analysis
- Streamline activity flow: intro → demo plot → open sandbox
- Add comprehensive error handling with visual error messages
- Support enhanced mathematical notation (arcsin, ln, implied multiplication)
modified: research/activity24-math-plot.yaml