Written to: 1 requirement: 0 proved, 0 partly, 0 failing, 1 with no test recorded. 0002-planning-core FR-010
The ids of a record read from another scheme (0037-planningFR-044). An external id that is a valid ULID gives its item or event id by a pure function: the 48 bits of time of the ULID are the unix_ts_ms of a UUID version 7 and the first 74 of its 80 random bits are rand_a and rand_b (RFC 9562 section 5.7; ULID, 48 bits of time and 80 of chance), so that two stores that read one file make the same ids. An id that is not a ULID gives its id by the same function from the time of its event and the SHA-256 of the external id (the source's name, a zero byte and the value). The external id is carried beside the id, as the source named it, and no id's wording says where it came from.
The 48 bits of time and the 80 bits of chance of a ULID, or why a text is not one: 26 characters of Crockford's base 32, in either case, no larger than 7ZZZZZZZZZZZZZZZZZZZZZZZZZ.
The text of the UUID version 7 made of a time in milliseconds and 74 bits: the 12 leftmost are rand_a and the 62 others rand_b, with the version and the variant set.
The UUID version 7 of an id that is not a ULID, as text: the time of its event and the first 74 bits of the SHA-256 of the source's name, a zero byte and the value.
The ULID text that reads back as this id: its time as the 48 bits and its 74 random bits as the first 74 of the 80, so that uuid7OfUlid of it is the id again (the last six bits are zero).
The 48 bits of time and the 80 bits of chance of a ULID, or why a text is not one: 26 characters of Crockford's base 32, in either case, no larger than 7ZZZZZZZZZZZZZZZZZZZZZZZZZ.
The text of the UUID version 7 made of a time in milliseconds and 74 bits: the 12 leftmost are rand_a and the 62 others rand_b, with the version and the variant set.
The UUID version 7 of an id that is not a ULID, as text: the time of its event and the first 74 bits of the SHA-256 of the source's name, a zero byte and the value.
The ULID text that reads back as this id: its time as the 48 bits and its 74 random bits as the first 74 of the 80, so that uuid7OfUlid of it is the id again (the last six bits are zero).