Swift Concurrency in AI code: why is @unchecked Sendable not a fix?
Essence
In Swift 6 language mode data races are compile errors. Given an error like "Sending 'x' risks causing data races" or "Main actor-isolated property can not be referenced from a nonisolated context", the model looks for the shortest path to a green build. The shortest paths are @unchecked Sendable, nonisolated(unsafe), @preconcurrency import, MainActor.assumeIsolated or going back to Swift 5 mode. They switch the check off instead of removing the race: the compiler goes quiet and the crash moves to production.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep