FWIW, for Navigation Compose, we made a conscious decision
not to implement an ambient as it ends up making it a lot harder to reason about changes in the state and it makes it harder to build decoupled, reusable composables that aren't completely dependent on your navigation system. We talk about this specifically in terms of testability in the docs:
https://developer.android.com/jetpack/compose/navigation#testing