[PictureLoader] Improve image negotiation, cache recovery and redirects (#7703)

* Fix picture-loader cache formats, redirects and offline queue handling

* Format picture-loader changes using project style

* Address review: name decoded image fields, test cancelled requests

Use designated initializers for DecodedImage so a field reorder cannot
silently swap the image and its error string.

Extract the cancelled-request sweep shared by the dispatcher and the
single-request path into takeCancelledRequests(), and cover it: one status
retirement per vanished work item, in queue order, with live entries kept.

---------

Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
This commit is contained in:
Bryce! 2026-11-08 13:02:07 -05:00 • committed by GitHub
parent 078d0858a3
commit 1ed7e45357
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 509 additions and 122 deletions

View file

@ -171,6 +171,8 @@ endfunction()
# --- Unit tests ------------------------------------------------------------------
cockatrice_add_test(NAME image_request_queue_test SOURCES image_request_queue_test.cpp)
cockatrice_add_test(NAME image_redirect_chain_test SOURCES image_redirect_chain_test.cpp)
cockatrice_add_test(NAME expression_test SOURCES expression_test.cpp LIBS libcockatrice_utility)
cockatrice_add_test(NAME clamped_arithmetic_test SOURCES clamped_arithmetic_test.cpp LIBS libcockatrice_utility)
cockatrice_add_test(NAME test_age_formatting SOURCES test_age_formatting.cpp LIBS libcockatrice_utility)