Round 35 P1: _raise_if_helper_advisor_busy published a new public pending marker without first checking public_load_pending(). Two public workloads (e.g. training + diffusion) could both pass their idle helper-busy snapshot concurrently, then both run through destructive owner teardown before either flipped its own visibility flag (is_training_active, current_checkpoint, loading_model_identifier, diffusion is_loading). Add the missing self-check under _HELPER_ADVISOR_START_LOCK so the second public workload sees the first's pending marker and gets a 503 retry instead of racing for VRAM. Helper / advisor already checked public_load_pending() on its side via _gpu_workload_busy_for_helper; this closes the symmetric public -> public window. 86 backend tests pass + smoke test confirms second public load is refused with 503 while first is pending, and the next public load is permitted once the first clears. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||