← Back to Docs20250627

055 OTP SUPERVISION AUDIT findings

Documentation for 055_OTP_SUPERVISION_AUDIT_findings from the Foundation repository.

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: 293
  • lib/mabeam/coordination.ex: 912
  • lib/mabeam/comms.ex: 311
  • lib/mabeam/agent.ex: 643, 773
  • lib/foundation/process_registry.ex: 757
  • lib/foundation/application.ex.backup: 504, 509, 890, 895
  • lib/foundation/application.ex: 505, 510, 891, 896
  • lib/foundation/coordination/primitives.ex: 650, 678, 687, 737, 743, 788, 794
  • lib/foundation/beam/processes.ex: 229
  • test/support/test_workers.exs: 192, 299, 304, 314, 434
  • test/support/test_supervisor.ex: 159, 284
  • test/support/test_process_manager.ex: 40, 325
  • test/support/test_agent.ex: 164, 172
  • test/support/telemetry_helpers.exs: 357, 680
  • test/support/foundation_test_helper.exs: 179, 184, 390, 424
  • test/support/concurrent_test_case.ex: 137
  • test/security/privilege_escalation_test.exs: 49, 70, 170, 450
  • test/mabeam/telemetry_test.exs: 327
  • test/mabeam/process_registry_test.exs: 115, 140, 176
  • test/mabeam/performance_monitor_test.exs: 100
  • test/mabeam/core_test.exs: 352, 477
  • test/mabeam/coordination_test.exs: 303, 313, 334, 549, 600
  • test/mabeam/comms_test.exs: 203, 240, 280
  • test/mabeam/agent_test.exs: 398
  • test/mabeam/agent_supervisor_test.exs: 65
  • test/mabeam/agent_registry_test.exs: 87, 388, 419
  • test/integration/graceful_degradation_integration_test.exs: 105, 355
  • test/integration/data_consistency_integration_test.exs: 26, 157, 183, 551
  • test/integration/cross_service_integration_test.exs: 31, 65, 69, 108, 116, 166, 203, 227, 254, 276, 329
  • test/foundation/process_registry_performance_test.exs: 38, 74, 135, 208, 244, 304
  • test/foundation/process_registry_optimizations_test.exs: 39, 73, 91, 104, 115, 130, 139, 157, 196, 201, 202, 204, 231, 259, 260, 300
  • test/property/foundation/event_correlation_properties_test.exs: 235, 344, 481
  • test/property/foundation/config_validation_properties_test.exs: 297
  • test/support/mabeam/test_helpers.exs: 99, 211, 218, 408
  • test/mabeam/integration/stress_test.exs: 34, 377, 419, 438, 443
  • test/mabeam/integration/simple_stress_test.exs: 14
  • test/integration/foundation/service_lifecycle_test.exs: 32, 71, 119, 149, 179, 198, 211, 317, 377, 417, 436, 445, 505, 558, 564, 615, 1028, 1048
  • test/integration/foundation/config_events_telemetry_test.exs: 63, 112, 157, 184, 192, 197, 243
  • test/foundation/services/service_behaviour_test.exs: 100, 112, 123, 132, 164, 174, 180, 240
  • test/foundation/process_registry/properties.ex: 93, 100, 131, 164, 199, 229, 275, 307, 355, 362, 376, 390
  • test/unit/foundation/service_registry_test.exs: 353, 421, 516, 655
  • test/unit/foundation/process_registry_test.exs: 127, 441
  • test/unit/foundation/process_registry_metadata_test.exs: 156, 184, 189
  • test/unit/foundation/graceful_degradation_test.exs: 105, 166
  • test/unit/foundation/error_context_test.exs: 413, 425
  • test/property/foundation/beam/processes_properties_test.exs: 152, 320, 366
  • test/property/foundation/infrastructure/rate_limiter_properties_test.exs: 299
  • test/property/foundation/infrastructure/circuit_breaker_properties_test.exs: 426
  • test/foundation/process_registry/backend/enhanced_ets_test.exs: 40, 78, 116, 173, 220, 284, 339
  • test/unit/foundation/services/config_server_test.exs: 141
  • test/unit/foundation/services/config_server_resilient_test.exs: 136, 165, 191, 213, 235, 410, 444
  • test/unit/foundation/process_registry/unified_test_helpers_test.exs: 21, 22, 377, 378, 405
  • test/unit/foundation/process_registry/backend_test.exs: 122, 126, 175, 182, 328, 332
  • test/unit/foundation/infrastructure/rate_limiter_test.exs: 237, 391, 414
  • test/unit/foundation/infrastructure/connection_manager_test.exs: 382, 387, 646, 704
  • test/unit/foundation/infrastructure/circuit_breaker_test.exs: 230, 242, 273, 427
  • test/unit/foundation/infrastructure/pool_workers/http_worker_test.exs: 457