jargon

Design patterns·Wiring: injection, containers and lifetimes

a long-lived object held a per-request one, and every request after the first got the first request's data.

Captive dependency

Also calledcaptive dependency bug, lifetime mismatch

A component held by another whose lifetime is longer than its own, so it outlives the scope it was meant for. The classic instance is a per-request database context captured by a process-wide service, which then serves stale or cross-tenant data quietly rather than failing. Some containers detect the mismatch and refuse to build the graph; where yours does not, it is a review question every time a scoped thing is injected into a singleton.

Commonly confused with