aeat.core._config_storage_route module¶
Storage route derivation helpers for core settings.
This module implements the public classify_storage_route()
and settings_for_active_profile_bucket() facades. It
classifies Settings into a
StorageRouteClassification whose
StorageRouteKind distinguishes explicit database
URLs, root-fallback SQLite databases, and active-profile bucket databases.
Application write guards such as
inspect_storage_write_policy()
consume that route classification rather than re-parsing database URLs.
- classify_storage_route_for_settings(settings)[source]¶
Classify the effective primary SQL route.
- Parameters:
settings (
Settings) – TheSettingsinstance whoseaeat_database_urlandaeat_local_storage_rootdefine the route.- Return type:
- Returns:
A
StorageRouteClassificationcarrying the effectiveStorageRouteKind, database URL, filesystem path when SQLite-backed, and active bucket id when present.
- settings_for_bucket_route(bucket_id, source)[source]¶
Return settings routed to
bucket_id’s active-profile database.- Parameters:
- Return type:
- Returns:
A
Settingsinstance equivalent tosourcebut derivingaeat_database_urlfrombucket_id.- Raises:
CoreValidationError – When
bucket_idis blank orsourcealready carries an explicit database URL.