╭ changed ─────────╮ │src/event/Repo.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────╮ │36 } │ │37 } │ │38 │ │39 -// `created_ts` comes from the commit timestamp, not the event │ │40 -// payload, so it must not appear in the JSON we output │ │39 +// the commit-derived fields must not appear in the JSON we output│ │40 pub fn jsonStringify(self: @This(), jw: anytype) !void { │ │41 try jw.beginObject(); │ │42 inline for (std.meta.fields(@This())) |field| { │ ╰──────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │44 - if (comptime std.mem.eql(u8, field.name, "created_ts")) continue;│ │43 + if (comptime evt.derivedField(field.name)) continue; │ │44 try jw.objectField(field.name); │ │45 try jw.write(@field(self, field.name)); │ │46 } │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │54 event_id: *const [evt.event_id_size]u8, │ │55 event_maybe: ?@This(), │ │56 arena: *std.heap.ArenaAllocator, │ │58 - created_ts: u64, │ │57 // the commit this event came from, recorded against every field it │ │58 // changes. null from `merge`, which sets oids and conflicts itself.│ │59 event_oid: ?[]const u8, │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │108 const order_key = evt.orderKeyDesc(existing_event.created_ts, event_id); │ │109 _ = try old_user_repos.remove(&order_key); │ │110 } │ │113 - } else { │ │114 - // first time we've seen this repo: stamp it with the commit timestamp │ │115 - event_to_write.created_ts = created_ts; │ │111 } │ │112 │ │113 try evt.writeOid(@This(), DB, hash_kind, repo_id_to_field_to_oid, repo_key, existing_event_maybe, event, event_oid);│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯