cadrumo.core._config_runtime module¶
Private runtime observations supporting the public configuration owner.
- active_profile_pointer_observation(*, normalizer, storage_root)[source]¶
Identify the current active-profile pointer through its native coordinate.
Settings construction is not a pure function of the environment: when
cadrumo_database_urlis unset, the post-validator reads theactive-profilepointer file and derives the bucket’s database route from it. That makes the pointer a construction INPUT, and it moves wheneverconfig login/logoutwrites it — inside a live process, for a long-running interactive or external session.Holding one settings instance across such a switch would keep serving the previous profile’s database route, so the canonical durable transition coordinate is folded into the cache key. A fresh root observes the initial absent coordinate zero; a later clear is a distinct persisted tombstone.
The root is read straight from the environment: that read is deliberately independent of the settings model it guards, because it has to answer “which pointer would the next construction see” BEFORE any settings exist to ask.
- Return type:
tuple[Path,BucketPointer]- Parameters:
normalizer (Callable[[Path | None], Path | None])
storage_root (Callable[[], Path])