OTP Supervision Audit Findings
This document provides an exhaustive list of all instances of spawn
, spawn_link
, spawn_monitor
, and Task.start
found across the entire codebase. These represent potential areas where processes might not be properly supervised, leading to fault tolerance issues.
Audit Findings
The following files contain calls to process creation functions that may not be linked to a supervisor. Each entry lists the file path and the line number where the call was found.
lib/mabeam/load_balancer.ex
: 293lib/mabeam/coordination.ex
: 912lib/mabeam/comms.ex
: 311lib/mabeam/agent.ex
: 643, 773lib/foundation/process_registry.ex
: 757lib/foundation/application.ex.backup
: 504, 509, 890, 895lib/foundation/application.ex
: 505, 510, 891, 896lib/foundation/coordination/primitives.ex
: 650, 678, 687, 737, 743, 788, 794lib/foundation/beam/processes.ex
: 229test/support/test_workers.exs
: 192, 299, 304, 314, 434test/support/test_supervisor.ex
: 159, 284test/support/test_process_manager.ex
: 40, 325test/support/test_agent.ex
: 164, 172test/support/telemetry_helpers.exs
: 357, 680test/support/foundation_test_helper.exs
: 179, 184, 390, 424test/support/concurrent_test_case.ex
: 137test/security/privilege_escalation_test.exs
: 49, 70, 170, 450test/mabeam/telemetry_test.exs
: 327test/mabeam/process_registry_test.exs
: 115, 140, 176test/mabeam/performance_monitor_test.exs
: 100test/mabeam/core_test.exs
: 352, 477test/mabeam/coordination_test.exs
: 303, 313, 334, 549, 600test/mabeam/comms_test.exs
: 203, 240, 280test/mabeam/agent_test.exs
: 398test/mabeam/agent_supervisor_test.exs
: 65test/mabeam/agent_registry_test.exs
: 87, 388, 419test/integration/graceful_degradation_integration_test.exs
: 105, 355test/integration/data_consistency_integration_test.exs
: 26, 157, 183, 551test/integration/cross_service_integration_test.exs
: 31, 65, 69, 108, 116, 166, 203, 227, 254, 276, 329test/foundation/process_registry_performance_test.exs
: 38, 74, 135, 208, 244, 304test/foundation/process_registry_optimizations_test.exs
: 39, 73, 91, 104, 115, 130, 139, 157, 196, 201, 202, 204, 231, 259, 260, 300test/property/foundation/event_correlation_properties_test.exs
: 235, 344, 481test/property/foundation/config_validation_properties_test.exs
: 297test/support/mabeam/test_helpers.exs
: 99, 211, 218, 408test/mabeam/integration/stress_test.exs
: 34, 377, 419, 438, 443test/mabeam/integration/simple_stress_test.exs
: 14test/integration/foundation/service_lifecycle_test.exs
: 32, 71, 119, 149, 179, 198, 211, 317, 377, 417, 436, 445, 505, 558, 564, 615, 1028, 1048test/integration/foundation/config_events_telemetry_test.exs
: 63, 112, 157, 184, 192, 197, 243test/foundation/services/service_behaviour_test.exs
: 100, 112, 123, 132, 164, 174, 180, 240test/foundation/process_registry/properties.ex
: 93, 100, 131, 164, 199, 229, 275, 307, 355, 362, 376, 390test/unit/foundation/service_registry_test.exs
: 353, 421, 516, 655test/unit/foundation/process_registry_test.exs
: 127, 441test/unit/foundation/process_registry_metadata_test.exs
: 156, 184, 189test/unit/foundation/graceful_degradation_test.exs
: 105, 166test/unit/foundation/error_context_test.exs
: 413, 425test/property/foundation/beam/processes_properties_test.exs
: 152, 320, 366test/property/foundation/infrastructure/rate_limiter_properties_test.exs
: 299test/property/foundation/infrastructure/circuit_breaker_properties_test.exs
: 426test/foundation/process_registry/backend/enhanced_ets_test.exs
: 40, 78, 116, 173, 220, 284, 339test/unit/foundation/services/config_server_test.exs
: 141test/unit/foundation/services/config_server_resilient_test.exs
: 136, 165, 191, 213, 235, 410, 444test/unit/foundation/process_registry/unified_test_helpers_test.exs
: 21, 22, 377, 378, 405test/unit/foundation/process_registry/backend_test.exs
: 122, 126, 175, 182, 328, 332test/unit/foundation/infrastructure/rate_limiter_test.exs
: 237, 391, 414test/unit/foundation/infrastructure/connection_manager_test.exs
: 382, 387, 646, 704test/unit/foundation/infrastructure/circuit_breaker_test.exs
: 230, 242, 273, 427test/unit/foundation/infrastructure/pool_workers/http_worker_test.exs
: 457