pir_pipeline.utils.utils.new_uqid

pir_pipeline.utils.utils.new_uqid() → str

Mint a fresh, opaque unique question id (uqid).

The uqid is a surrogate key used to group a question across years. It is intentionally not derived from question_id (a content hash of question number + name): deriving it meant two distinct questions that hashed to the same question_id could never be given distinct uqids, making them impossible to unlink. Minting an opaque value guarantees uniqueness regardless of content collisions.

Returns:

str: A fresh uqid (32-char hex), small enough for the existing uqid column and never equal to any pre-existing uqid.