Law of leaky abstractions
Abstractions promise that you can work at one level and ignore the layers underneath. The promise is never fully kept.
All non-trivial abstractions, to some degree, are leaky.
Joel Spolsky named the pattern in The Law of Leaky Abstractions (2002). A leak is any moment where the hidden layer shows through and you have to reason about it to fix the bug or ship the feature.
TCP is the classic teaching example. The abstraction is a reliable byte stream. Under load or on bad Wi-Fi you still see timeouts, half-open connections, and retries. You are not wrong to think in streams. You are wrong to think you will never open Wireshark or read ECONNRESET.
Databases and ORMs leak the same way. SQL is supposed to hide storage layout until you need an index, a lock, or a query plan that does not match your mental model. ORMs add another blanket on top. Most weeks you stay in objects and migrations. The week production slows down, you are back in EXPLAIN, isolation levels, and N+1 queries you did not know you had.
Frameworks and hosted platforms compress more surface area (routing, auth, deployment, observability). That compression buys speed until the failure mode lives in configuration, cold starts, IAM, or a dependency version the template never mentioned. The stack trace points through generated code you did not write.
The uncomfortable implication is pedagogical. You cannot learn only the top layer and stay competent when the leak appears. Spolsky’s ASP.NET example was blunt on purpose: if the web request fails, you still need HTTP, HTML, and the network path the page took. The abstraction did not remove that work. It deferred it.
Treat leaks as normal maintenance, not betrayal. Clarke’s third law is what stakeholders feel when the leak has not happened yet. The stack reads as magic until it does not. When you adopt a tool, ask what layer will surface first when things go wrong (I/O, concurrency, persistence, auth, money). Keep a shallow working model of that layer before you need it at 2 a.m. The abstraction still earns its keep on the happy path. It just does not let you skip the floor below forever.