fix(sync): replace cached thumbnails once the server offers their proxies
With Keep proxies offline, the agent refreshed a proxy cache only when the server's sequence had ProxiesBuilt. That flag waits for every frame, and a missing or damaged frame never gets a proxy, so a HEIF sequence with one such frame kept the 320-px thumbnails cached in place of proxies forever, although the server offered the other frames' proxies sent by clients. For such a cache the agent now reads the manifest once per change of the server's update time and queues the background download when a frame is offered as a proxy that the cache holds only a stand-in for (or nothing). The test server's fake serves proxies sent to it, as the real one does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
4 files changed
+74
-3
No files matched your search
@@ -174,6 +174,8 @@ internal sealed class FakeSyncRemote : ISyncRemote
|
||||
"original" when CorruptOnce == frameId => [.. frame.Bytes.Select(b => (byte)~b)],
|
||||
"original" => frame.Bytes,
|
||||
"proxy" or "thumb" when FailAssets => throw new TitanoApiException(HttpStatusCode.InternalServerError, new ApiError("internal", "failed")),
|
||||
// A proxy a client or render node sent is served as soon as it is filed, like the manifest says.
|
||||
"proxy" when SentProxies.TryGetValue(frameId, out var sent) => sent,
|
||||
"proxy" when (sequence.Status & SequenceStatus.ProxiesBuilt) != 0 => frame.Proxy,
|
||||
"thumb" when (sequence.Status & SequenceStatus.ThumbsBuilt) != 0 => frame.Proxy[..Math.Min(frame.Proxy.Length, 64)],
|
||||
_ => throw NotFound(),
|
||||
|
||||
Reference in new issue
Block a user