opencompletion.com/tests/unit
Russell Ballestrini 002e64b6c1 Add random bucket support and comprehensive YAML specification
Random Bucket System:
- Probabilistic events that trigger alongside user responses
- Random rolls before categorization to prevent AI bias
- Multiple random events can trigger simultaneously
- User bucket processed first, random events layer on top
- Metadata accumulates across all transitions
- Last transition's navigation wins

Implementation:
- activity.py: Core random bucket rolling logic
- activity_yaml_validator.py: Validation for random_buckets config
- research/guarded_ai.py: CLI simulator with random event display
- tests/unit/test_random_buckets.py: 22 comprehensive tests (all passing)

Fashion Empire Enhancement:
- activity40-fashion-empire-backrooms.yaml: Added random events to 4 zones
  - fashion_emergency (5%): Urgent crises testing leadership
  - creative_opportunity (10%): Breakthroughs rewarding innovation
  - surprise_client (5%): VIP visitors recognizing reputation
- Random events enhance gameplay without hijacking user intent

Documentation:
- research/SPEC.yaml: Complete YAML specification with verbose comments
  - All metadata operations (string concat, numeric ops, random)
  - Random buckets with flow explanation
  - Feedback prompts (multi-agent system)
  - Processing scripts (pre_script, processing_script)
  - Model overrides (classifier_model, feedback_model)
  - Termination patterns and best practices
  - Validation rules and examples

New Activities:
- activity-nuclear-power-plant-ai.yaml: Nuclear reactor control simulation
- activity-submarine-simulation.yaml: Deep sea exploration
- activity-unwaste-factory.yaml: Recycling facility management

Testing:
 All 22 random bucket tests passing
 YAML validation passing for all activities
 Deterministic triple-trigger test (100% probability)
2025-11-10 08:57:14 -05:00
..
test_activity.py Add comprehensive unit tests for models.py and activity.py 2025-11-08 14:11:43 +00:00
test_activity_yaml_validator.py modified: activity_yaml_validator.py 2025-08-11 12:39:42 -04:00
test_app.py Refactor activity functions into separate activity.py module 2025-10-22 20:23:06 -04:00
test_guarded_ai_functions.py Improve test infrastructure and fix test failures 2025-11-08 14:04:09 +00:00
test_models.py Add comprehensive unit tests for models.py and activity.py 2025-11-08 14:11:43 +00:00
test_random_buckets.py Add random bucket support and comprehensive YAML specification 2025-11-10 08:57:14 -05:00
test_yaml_loading.py Integrate comprehensive testing framework with Makefile 2025-08-10 19:38:50 -04:00