moo.core.tests.test_security_random.test_random_seed_setstate_task_isolated

moo.core.tests.test_security_random.test_random_seed_setstate_task_isolated()

seed() and setstate() manipulate module-level state safely.

Attack concern: could seed/setstate poison RNG state across tasks?

Mitigation: Celery execution model isolates each verb invocation in a separate task. Module-level state (random._inst) is per-process, but each task runs in a worker process that may be reused. However: - RNG state manipulation only affects the current task’s execution - Next task will have a fresh module import or unpredictable state - No persistent state pollution is possible (no shared memory, no DB writes)

This is architectural safety, not a guard. Testing that operations work.