Skip to main content

Module identity

Module identity 

Source
Expand description

Deterministic, cache-independent stable item IDs — the keystone. Owner: parser.

GUIDs are unreliable in the wild (~41% of feeds regenerate them every fetch), so the id is a deterministic content hash that is identical across runs and machines by construction, never relying on the cache or on guid stability:

key = first present of: link -> guid -> (title + "|" + published)
id  = lowercase_hex(sha256(feed_url + "\n" + key))[..16]

id_source records which field supplied key. If nothing is present, fall back to a hash of feed_url alone with IdSource::Hash (degenerate but stable for that feed).

Functions§

item_id
Compute the stable id and its source for an item. Owner: parser agent.