core.stream_age module
Fail-closed proof-horizon checks for Redis Stream recovery entries.
- core.stream_age.stream_proof_deadline_ms(raw, *, stream_id=None)
Read/derive a publisher-bound proof deadline from stream metadata.
- async core.stream_age.redis_now_ms(redis)
Return authoritative Redis-server time in milliseconds.
- core.stream_age.stream_entry_age_seconds(stream_id, *, now_ms)
Return the age encoded in a Redis Stream ID, or
Noneif invalid.
- core.stream_age.proof_horizon_elapsed(stream_id, horizon_seconds, *, now_ms)
Whether an entry is old enough that a finite receipt may have expired.
Invalid IDs fail closed. Consumers must never execute an effect when they cannot establish that its transport entry is younger than the proof kept by the corresponding durable ledger.