cadrumo.domain.calculations.registry.authority_store module¶
Read-only SQLite storage for generation-pinned authority components.
- exception AuthorityStoreError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorA published SQLite authority cannot be admitted or queried safely.
- Parameters:
- Return type:
None
- code¶
- exception AuthorityStoreCutoverError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
AuthorityStoreErrorA pin names another legitimate reader generation or incarnation.
- Parameters:
- Return type:
None
- code¶
- exception AuthorityStoreCorruptionError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
AuthorityStoreErrorContent-addressed bytes or their declared component closure changed.
- Parameters:
- Return type:
None
- code¶
- class AuthorityDescriptor(database, database_size, database_sha256, logical_generation, format='cadrumo-authority-descriptor-v1')[source]¶
Bases:
objectSmall control record selecting one exact content-addressed database.
- Parameters:
- require_authority_store_available(descriptor_path)[source]¶
Quickly validate the descriptor-selected database dependency.
This startup probe validates the canonical descriptor and requires the confined database to be a regular file of the published size. Full digest, SQLite manifest, and component checks remain owned by
SQLiteAuthorityReaderwhen an authority operation is admitted.
- class SQLiteAuthorityReader(descriptor_path, *, max_connections=4)[source]¶
Bases:
objectAdmitted reader with bounded connection checkout and generation-pinned loads.
- Parameters:
descriptor_path (Path)
max_connections (int)
- load(query, *, pin)[source]¶
Load and decode one component from exactly this admitted generation.
Identity is verified wherever this reader touches the database: when the lease takes its pin, and inside every uncached load. A cache hit reads no file and is served under the pin the lease already verified, so it does not re-stat the database. That is what keeps a command that loads thousands of components from paying a metadata query for each one.
- Return type:
- Parameters:
query (AuthorityComponentQuery)
pin (AuthorityGenerationPin)
- telemetry()[source]¶
Return retained component accounting, excluding connections and leases.
- Return type: