Timestamps [mm:ss.mmm]: elapsed time since the first logged event in this run. Event markers: scheduled 🟣 · running 🔵 · wait ▫️ · done 🟢 · cancellation 🟠 · failure 🔴 WAIT marks code about to await; it is not a measurement of runtime suspension. === 1. GCD: success === [00:00.000] 🔵 RUNNING [GCD:profile] coordinating requests [00:00.000] 🟣 SCHEDULED [GCD:user] scheduled [00:00.000] 🟣 SCHEDULED [GCD:posts] scheduled [00:00.000] ⚪ NOTE [GCD] loadProfile returned; requests may still be pending [00:00.103] 🟢 DONE [GCD:user] decoded response [00:01.048] 🟢 DONE [GCD:posts] decoded response [00:01.048] 🟢 DONE [GCD:profile] both callbacks finished [00:01.048] 🟢 DONE User: John Doe [00:01.048] 🟢 DONE Posts: 2 === 2. Structured concurrency: success === [00:01.048] 🔵 RUNNING [profile] creating child tasks [00:01.048] ▫️ WAIT [profile] waiting for user [00:01.048] 🔵 RUNNING [async:posts] started [00:01.048] ▫️ WAIT [async:posts] waiting for response [00:01.048] 🔵 RUNNING [async:user] started [00:01.048] ▫️ WAIT [async:user] waiting for response [00:01.152] 🔵 RUNNING [async:user] resumed; decoding [00:01.152] 🟢 DONE [async:user] completed [00:01.152] ▫️ WAIT [profile] received user; waiting for posts [00:02.082] 🔵 RUNNING [async:posts] resumed; decoding [00:02.082] 🟢 DONE [async:posts] completed [00:02.082] 🟢 DONE [profile] both children finished; returning profile [00:02.082] 🟢 DONE User: John Doe [00:02.082] 🟢 DONE Posts: 2 === 3. GCD: decoding failure === [00:02.082] 🔵 RUNNING [GCD:profile] coordinating requests [00:02.082] 🟣 SCHEDULED [GCD:invalid-user] scheduled [00:02.082] 🟣 SCHEDULED [GCD:posts] scheduled [00:02.186] 🔴 FAILED [GCD:invalid-user] decoding failed: DecodingError.typeMismatch: expected value of type Int. Path: id. Debug description: Expected to decode Int but found a string instead. [00:03.131] 🟢 DONE [GCD:posts] decoded response [00:03.131] 🟢 DONE [GCD:profile] both callbacks finished [00:03.131] 🔴 FAILED Failed: DecodingError.typeMismatch: expected value of type Int. Path: id. Debug description: Expected to decode Int but found a string instead. === 4. Structured concurrency: decoding failure === [00:03.131] 🔵 RUNNING [profile] creating child tasks [00:03.131] ▫️ WAIT [profile] waiting for user [00:03.131] 🔵 RUNNING [async:invalid-user] started [00:03.131] ▫️ WAIT [async:invalid-user] waiting for response [00:03.131] 🔵 RUNNING [async:posts] started [00:03.131] ▫️ WAIT [async:posts] waiting for response [00:03.235] 🔵 RUNNING [async:invalid-user] resumed; decoding [00:03.235] 🔴 FAILED [async:invalid-user] failed: DecodingError.typeMismatch: expected value of type Int. Path: id. Debug description: Expected to decode Int but found a string instead. [00:03.235] 🟠 CANCELLED [async:posts] cancelled [00:03.235] 🔴 FAILED Failed: DecodingError.typeMismatch: expected value of type Int. Path: id. Debug description: Expected to decode Int but found a string instead. === 5. Structured children: parent cancellation === [00:03.235] 🔵 RUNNING [profile] creating child tasks [00:03.236] ▫️ WAIT [profile] waiting for user [00:03.236] 🔵 RUNNING [async:user] started [00:03.236] ▫️ WAIT [async:user] waiting for response [00:03.236] 🔵 RUNNING [async:posts] started [00:03.236] ▫️ WAIT [async:posts] waiting for response [00:03.342] 🔵 RUNNING [async:user] resumed; decoding [00:03.342] 🟢 DONE [async:user] completed [00:03.342] ▫️ WAIT [profile] received user; waiting for posts [00:03.447] 🟠 CANCEL REQUEST [caller] requesting parent cancellation [00:03.448] 🟠 CANCELLED [async:posts] cancelled [00:03.448] 🟠 CANCELLED [caller] cancellation received after child cleanup === 6. Scope exit: unused async let === [00:03.448] 🔵 RUNNING [async:user] started [00:03.448] ▫️ WAIT [async:user] waiting for response [00:03.448] 🔵 RUNNING [async:posts] started [00:03.448] ▫️ WAIT [async:posts] waiting for response [00:03.548] 🔵 RUNNING [async:user] resumed; decoding [00:03.549] 🟢 DONE [async:user] completed [00:03.549] ⚪ NOTE [scope] leaving inner block without reading posts [00:03.549] 🟠 CANCELLED [async:posts] cancelled [00:03.549] 🟢 DONE [scope] inner block finished; function continues [00:03.549] 🟢 DONE [caller] received user: John Doe === 7. Error happens before it is observed === [00:03.549] 🔵 RUNNING [profile] creating child tasks [00:03.549] ▫️ WAIT [profile] waiting for user [00:03.549] 🔵 RUNNING [async:slow-user] started [00:03.549] ▫️ WAIT [async:slow-user] waiting for response [00:03.549] 🔵 RUNNING [async:invalid-posts] started [00:03.549] ▫️ WAIT [async:invalid-posts] waiting for response [00:03.656] 🔵 RUNNING [async:invalid-posts] resumed; decoding [00:03.656] 🔴 FAILED [async:invalid-posts] failed: DecodingError.typeMismatch: expected value of type Array. Debug description: Expected to decode Array but found a dictionary instead. [00:04.607] 🔵 RUNNING [async:slow-user] resumed; decoding [00:04.607] 🟢 DONE [async:slow-user] completed [00:04.607] ▫️ WAIT [profile] received user; waiting for posts [00:04.607] 🔴 FAILED [caller] observed error: DecodingError.typeMismatch: expected value of type Array. Debug description: Expected to decode Array but found a dictionary instead. === 8. An unstructured task outlives its creating function === [00:04.607] ⚪ NOTE [unstructured] returning the task handle [00:04.607] ⚪ NOTE [caller] startPostsTask returned [00:04.607] 🔵 RUNNING [async:posts] started [00:04.607] ▫️ WAIT [async:posts] waiting for response [00:05.673] 🔵 RUNNING [async:posts] resumed; decoding [00:05.673] 🟢 DONE [async:posts] completed [00:05.673] 🟢 DONE [caller] explicitly awaited 2 posts === 9. Task group: dynamic child tasks === [00:05.673] 🔵 RUNNING [async:fast-posts] started [00:05.673] ▫️ WAIT [async:fast-posts] waiting for response [00:05.673] 🔵 RUNNING [async:slow-posts] started [00:05.673] ▫️ WAIT [async:slow-posts] waiting for response [00:05.727] 🔵 RUNNING [async:fast-posts] resumed; decoding [00:05.727] 🟢 DONE [async:fast-posts] completed [00:05.727] 🟢 DONE [group] received a batch with 2 posts [00:05.885] 🔵 RUNNING [async:slow-posts] resumed; decoding [00:05.885] 🟢 DONE [async:slow-posts] completed [00:05.885] 🟢 DONE [group] received a batch with 2 posts [00:05.885] 🟢 DONE [group] scope finished [00:05.885] 🟢 DONE [caller] batches: 2 === 10. Task group: first result and early exit === [00:05.885] 🔵 RUNNING [async:posts] started [00:05.885] ▫️ WAIT [async:posts] waiting for response [00:05.886] 🔵 RUNNING [async:fast-posts] started [00:05.886] ▫️ WAIT [async:fast-posts] waiting for response [00:05.940] 🔵 RUNNING [async:fast-posts] resumed; decoding [00:05.940] 🟢 DONE [async:fast-posts] completed [00:05.940] 🟢 DONE [race] received the first batch [00:05.940] 🟠 CANCEL REQUEST [race] requesting cancellation of remaining work [00:05.940] ⚪ NOTE [race] returning from the group body [00:05.940] 🟠 CANCELLED [async:posts] cancelled [00:05.940] 🟢 DONE [race] group scope finished [00:05.940] 🟢 DONE [caller] first batch: 2 posts