aeat.core.telemetry._workspace module¶
Stable pseudonymous workspace identifier for telemetry payloads.
The ADR requires every TelemetryEventPayload to
carry a workspace_hash rather than the operator’s profile id or NIF. This
module derives that hash deterministically from the local storage root path
– a value that already exists per-deployment, is never the taxpayer’s
identity, and is stable across repeated runs of the same installation without
needing any new persisted state.
See also
workspace_hash()Public facade export of this pseudonymous deployment-id helper.
TelemetryEventPayloadPayload shape that carries the derived workspace hash.
SettingsSource of the local storage root used as the stable hash input.
- workspace_hash(storage_root)[source]¶
Derive a stable, non-identifying pseudonym for this local deployment.
- Parameters:
storage_root (
Path) – The deployment’s local storage root (settings.aeat_local_storage_root). Only its resolved path string is hashed; no file contents, profile data, or identity fields are read.- Return type:
- Returns:
A 64-character lowercase hex SHA-256 digest of the resolved storage root path. Two processes pointed at the same storage root produce the same hash; the hash cannot be reversed to recover the path or any taxpayer identity.