Skip to content

CI run for release/13.2 (do not merge) - #1111

Closed
kean wants to merge 43 commits into
ci-13.2-basefrom
release/13.2
Closed

kean wants to merge 43 commits into
ci-13.2-basefrom
release/13.2

Conversation

@kean

@kean kean commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Temporary, to run CI on release/13.2. PRs into release/13.2 don't trigger CI because branches: '*' doesn't match a /, so this uses a base without one, set to the 13.2.0 tag. Close without merging and delete ci-13.2-base once CI finishes.

kean and others added 30 commits November 1, 2026 21:14
ImageContainer.swift imported AVKit and used no symbol from it. Swift emits
an autolink directive for every import, so the dead line put AVKit,
AVFoundation, AVFAudio, AudioToolbox, CoreAudio, CoreAudioTypes, CoreMedia,
CoreMIDI, MediaToolbox, and MediaAccessibility in the link line of every app
that uses Nuke — the exact dependency NukeVideo exists to keep optional.

(cherry picked from commit e0ceaf2)
On a "206 Partial Content" response, `expectedContentLength` covers only
the remaining bytes, while the accumulated data already contains the
resumed prefix. The guard that decides whether to give the decoder a
chance to produce a preview compared the two directly, so it was never
satisfied and the resumed download produced no previews at all.

(cherry picked from commit 4120ea5)
Each priority update schedules its own hop to the pipeline actor, and two
hops carry no ordering guarantee between them, so a stale value could land
last and leave the task subscription out of sync with `status.priority`.
Read the priority inside the hop instead of capturing it, which makes the
hops idempotent and convergent.

(cherry picked from commit ee70ccc)
Foundation reports a Content-Length it can't represent as Int64.max, and adding the resumed bytes to it trapped. Saturate the sum, and check the size limit before reserving capacity for a resumed response.

(cherry picked from commit e6cd095)
A response without a size limit that advertised a Content-Length near Int64.max tried to reserve that much and crashed.

(cherry picked from commit 568bfe1)
…ataLoader delegate method

(cherry picked from commit dfaacd9)
…st, as URLSession does

(cherry picked from commit a42ca81)
…ageCache

`Cache.set` refused an entry over the entry cost limit before looking at the entry the key already had, so the replaced image stayed cached and charged.

(cherry picked from commit 181253a)
LazyImageContext.== ignored ImageRequest.thumbnail and scale, so a
request that changed only those compared equal and never reloaded.

(cherry picked from commit 4c565f4)
Reverts 62fbb22 and 9c56158 (#996). A delegate that implements both
challenge methods would stop getting session-wide challenges in the
task-level method, which can turn off a check implemented there. That's
not a change for a patch release.
The flag was an unsynchronized `nonisolated(unsafe)` global that the pipeline reads on every `signpost(...)` call from its own threads, so enabling or disabling it while a pipeline was running was a data race. It is now backed by a `Mutex`.

(cherry picked from commit d3176eb)
Uses Mutex: OSAllocatedUnfairLock needs iOS 16, and 13.x supports iOS 15.

(cherry picked from commit b6bc5b3)
The launch-scheduled sweep stamped `lastSweepDate` in the metadata file, but the public `sweep()` didn't, so a launch shortly after a manual sweep swept again inside `sweepInterval`. Both paths now go through the same helper.

Adapted to the synchronous sweep() on 13.x.

(cherry picked from commit ac6b493)
The property was declared nonisolated(unsafe): it is written from
wherever the prefetcher is configured, typically the main actor, and
read on the pipeline actor every time the prefetcher runs out of work.

Back it with the same OSAllocatedUnfairLock pattern that priority
already uses, which keeps the API source-compatible and leaves every
member of the class either lock-backed or actor-isolated.

Uses Mutex: OSAllocatedUnfairLock needs iOS 16, and 13.x supports iOS 15. The old closure is released after unlocking, so that a deinit that reads the property can't abort on a recursive lock, which worked before this was a lock.

(cherry picked from commit ec342c2)
…uests

Adapted to pipeline.cache.cachedData(for:): lookUpCachedData is main-only.

(cherry picked from commit 31ad2c3)
The fetch waited for the loader's completion to return its slot, but
DataLoading doesn't require calling it after cancel().

The test moved to ImagePipelineLoadDataTests: 13.x has no ImagePipelineDataTaskTests.

(cherry picked from commit 7894542)
kean added 13 commits November 2, 2026 18:59
Uses Mutex: OSAllocatedUnfairLock needs iOS 16, and 13.x supports iOS 15. The old delegate is released after unlocking, so that a deinit that reads the property can't abort on a recursive lock, which worked before this was a lock.

(cherry picked from commit 22989ac)
…inal and intermediate images

fetchImage() failed on the option before looking up the image with one processor fewer, so only the final processed image was ever checked.

The tests moved to ImagePipelineDataCacheTests: 13.x has no ImagePipelineCacheOptionsLoadingTests.

(cherry picked from commit 10e45a3)
The box kernel grows with the radius, and once kernel² × 255 no longer
fits in an Int32, vImageBoxConvolve_ARGB8888 overflows its sums and
returns a near-black image as a success while asking for gigabytes of
scratch memory. Cap the kernel at 2901, the largest odd size that stays
in range, and fail the processing if vImage reports an error.

Only this part of #1021: keeping wide-gamut color and the Resize cap change the output, so they stay in Nuke 14.

(cherry picked from commit ed442fd)
ImagePrefetcher treated any memory cache entry as an image that was already prefetched, including the previews a progressive load leaves behind, so the final image was never fetched.

(cherry picked from commit 928be01)
Each update hopped to the pipeline actor with the value it captured, and the hops carry no ordering guarantee between them, so a stale value could land last. The hop now reads the current priority, the same fix ImageTask.priority got in #918.

(cherry picked from commit d5bc75a)
Operations were enqueued at .normal and lowered afterwards, which prepended them to the lower bucket, so the prefetcher's queue and the pipeline's queues ran .low and .veryLow work LIFO: past the slots that were free, a batch of prefetches started with its last image. Pass the priority to add(priority:) instead.

Only the ordering part of #981, with the test from 0a3b9ce: the reserved slots change how prefetching runs, so they stay in Nuke 14.

(cherry picked from commit fb49078)
…weeps off

A date recorded while the clock was set ahead made the elapsed interval
negative, so every scheduled sweep was skipped until the clock caught up.

Adapted to the sweep that is scheduled once, at init, on 13.x.

(cherry picked from commit 376e32e)
AVDataAsset indexed the data with AVFoundation's offsets, which count from the start of the resource, so a Data slice crashed the process. Those indices now start at startIndex, and the range is clamped, because the first request asks for two bytes whatever the content length.

Only the AVDataAsset part of #1082. Following the preview policy would take the previews away from every app that doesn't return one from its delegate, and upright posters would rotate twice in an app that corrects them, so both stay in Nuke 14. No tests: 13.x has no NukeVideoTests target.

(cherry picked from commit 83422a2)
@kean kean closed this Nov 6, 2026
@kean
kean deleted the release/13.2 branch November 6, 2026 00:30
@kean
kean restored the release/13.2 branch November 8, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant