╭ changed ───────────────╮ │src/event/Assignment.zig│ ╰────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │34 // the id of the one assignment an email can hold on a thread │ │35 pub fn idOf(thread_id: *const [evt.event_id_size]u8, email: []const u8) [evt.event_id_size]u8 {│ │36 var hasher = std.crypto.hash.sha2.Sha256.init(.{}); │ │37 + // the kind name keeps derived ids of different kinds apart │ │38 + hasher.update(@tagName(evt.EventKind.assign)); │ │39 hasher.update(thread_id); │ │40 hasher.update(email); │ │41 var digest: [std.crypto.hash.sha2.Sha256.digest_length]u8 = undefined; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────╮ │src/event/Grant.zig│ ╰───────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │28 // the id of the one grant a user can hold on a target │ │29 pub fn idOf(target_id: *const [evt.event_id_size]u8, user_id: *const [evt.event_id_size]u8) [evt.event_id_size]u8 {│ │30 var hasher = std.crypto.hash.sha2.Sha256.init(.{}); │ │31 + // the kind name keeps derived ids of different kinds apart │ │32 + hasher.update(@tagName(evt.EventKind.grant)); │ │33 hasher.update(target_id); │ │34 hasher.update(user_id); │ │35 var digest: [std.crypto.hash.sha2.Sha256.digest_length]u8 = undefined; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────╮ │src/event/Notify.zig│ ╰────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │35 // the id of the one record a user can hold on a thread │ │36 pub fn idOf(repo_id: *const [evt.event_id_size]u8, thread_id: *const [evt.event_id_size]u8) [evt.event_id_size]u8 {│ │37 var hasher = std.crypto.hash.sha2.Sha256.init(.{}); │ │38 - // the kind name keeps the id apart from the notif id the same pair hashes to │ │38 + // the kind name keeps derived ids of different kinds apart │ │39 hasher.update(@tagName(evt.EventKind.notify)); │ │40 hasher.update(repo_id); │ │41 hasher.update(thread_id); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯