Skip to main content

validate_run_id

Function validate_run_id 

Source
pub fn validate_run_id(run_id: &str) -> Result<()>
Expand description

Validate that run_id is a lowercase, ULID-shaped Crockford base32 string.

Thin wrapper over RunId::parse_str kept for the validate_run_id call sites that only need a yes/no answer in crate::Error terms. The constraint mirrors what crate::new_run_id emits: 26 lowercase Crockford base32 characters whose first character keeps the encoded timestamp within ULID’s 48-bit range. Storing only validated ids lets the event envelope carry run_id directly instead of re-deriving it from a (possibly symlinked or non-canonical) directory name.