Memory 019eaeca
Memory ID (Session ID): 019eaeca-ac0e-7000-b13d-fb6760a3714c
Last Updated: 2026-06-10 02:35:32
Fact Summary
StoryMatrix Project Constraints & Resolutions
- Pipeline Execution: Pipeline stages are callable using
await stage()rather thanawait stage.execute(). Avoid resolving un-awaited coroutine objects in assertions; useAsyncMockoverMagicMockto preventTypeError: object of type 'coroutine' has no len(). - MockService Handling (
mock_service.py):MockService.__getattr__dynamically intercepts service methods (e.g.,map_characters,create_story,synthesize_speech). These must be properly typed asasync defcoroutines. The class requires a customget()method carefully implemented to avoid infinite recursion/shadowing against__getattr__. - Pause Calculations: Standard pause durations enforce
exclamation_pause > period_pause > question_pause(e.g., sentence end bonus = 1.3, question bonus = 1.2). - Container Configuration: Service Container’s
_get_music_providers()must appendmockas a fallback strategy whendev_local_onlyorlow_resourcemodes are enabled. - Voice Data (
VoiceDataLoader):piper_dataobjects are formatted as a flatlist[dict], not a deeply nested dictionary array. - Security Execution (
test_security.py): Thepythoncommand is explicitly permit-listed inallowed_commands. Command sanitization checks should evaluate inputs strictly againstshlex.quote()parameters rather than string regex. - CLI / Typer Testing (
test_cli.py):GenerateStoryUseCase.executereturns a PydanticGenerateStoryResponse. Tests mocking thefast-dev-runCLI target must inject this Pydantic object rather than internalhttpx.AsyncClientpayload structures.
Reference Session
- Associated Chat Session: 019eaeca-ac0e-7000-b13d-fb6760a3714c