2 months ago
a09c88bThree fixes for CI review issues: 1. Refresh waiters timeout immediately (Greptile CI): `wait_for_refresh` in `remote_source.rs` used a 200-iteration yield loop that exhausted before the OAuth round-trip finished, causing waiters to surface a spurious 401 and fail active playback. Replaced with a `Condvar` that blocks until the refresh leader clears the slot and notifies. 2. Active-variant replacement can start duplicate downloads: Added a process-wide `DOWNLOADS_IN_PROGRESS` set in `download_model` that prevents concurrent download tasks for the same variant. The second call returns the current downloading status instead of spawning a duplicate. Added a matching frontend guard in `applyModelVariant` that checks `downloadingModel` state before issuing the IPC call. 3. Contract alignment: Added `get_model_status`, `download_model`, `delete_model`, and `ModelStatusSnapshot` to the model-bootstrap contract. Documented the single-flight download semantics and the stale-manifest detection via metadata mismatch.
Parent58939f2