╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1029 // the push consumed the issue into the server repo's db │ │1030 { │ │1031 const haxy_moment = try evt.currentMoment(repo_opts, &server_repo); │ │ 995 - │ │ 996 - // get the map of issues │ │ 997 - const event_id_to_issue_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->issue")) orelse return error.NotFound; │ │ 998 - const event_id_to_issue = try ServerRepo.DB.HashMap(.read_only).init(event_id_to_issue_cursor); │ │1032 + const records_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.record_map_key)) orelse return error.NotFound; │ │1033 + const records = try ServerRepo.DB.HashMap(.read_only).init(records_cursor); │ │1034 + const issue_cursor = try records.getCursor(hash.hashInt(repo_opts.hash, &issue_event_id)) orelse return error.NotFound; │ │1035 + const issue = try evt.read(evt.Issue.Record, ServerRepo.DB, repo_opts.hash, &arena, try ServerRepo.DB.HashMap(.read_only).init(issue_cursor));│ │1036 │ │1000 - // get the issue out of the map │ │1001 - const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &issue_event_id)) orelse return error.NotFound; │ │1002 - const issue_map = try ServerRepo.DB.HashMap(.read_only).init(issue_cursor); │ │1003 - const issue = try evt.read(evt.Issue, ServerRepo.DB, repo_opts.hash, &arena, issue_map); │ │1004 - │ │1005 - try std.testing.expectEqualStrings(events_to_push[0].event.issue.?.description, issue.description); │ │1006 - try std.testing.expectEqualStrings(events_to_push[0].event.issue.?.tags, issue.tags); │ │1037 + try std.testing.expectEqualStrings(events_to_push[0].event.issue.?.description, issue.event.description); │ │1038 + try std.testing.expectEqualStrings(events_to_push[0].event.issue.?.tags, issue.event.tags); │ │1039 } │ │1040 │ │1041 // │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1073 // the push consumed the edit into the server repo's db │ │1074 { │ │1075 const haxy_moment = try evt.currentMoment(repo_opts, &server_repo); │ │1044 - │ │1045 - // get the map of issues │ │1046 - const event_id_to_issue_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->issue")) orelse return error.NotFound; │ │1047 - const event_id_to_issue = try ServerRepo.DB.HashMap(.read_only).init(event_id_to_issue_cursor); │ │1048 - │ │1049 - // get the issue out of the map that was edited │ │1050 - const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(repo_opts.hash, &issue_event_id)) orelse return error.NotFound; │ │1051 - const issue_map = try ServerRepo.DB.HashMap(.read_only).init(issue_cursor); │ │1052 - const issue = try evt.read(evt.Issue, ServerRepo.DB, repo_opts.hash, &arena, issue_map); │ │1076 + const records_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, evt.Issue.record_map_key)) orelse return error.NotFound; │ │1077 + const records = try ServerRepo.DB.HashMap(.read_only).init(records_cursor); │ │1078 + const issue_cursor = try records.getCursor(hash.hashInt(repo_opts.hash, &issue_event_id)) orelse return error.NotFound; │ │1079 + const issue = try evt.read(evt.Issue.Record, ServerRepo.DB, repo_opts.hash, &arena, try ServerRepo.DB.HashMap(.read_only).init(issue_cursor));│ │1080 │ │1081 // the description and tags were correctly edited │ │1055 - try std.testing.expectEqualStrings(events_to_push2[0].event.issue.?.description, issue.description); │ │1056 - try std.testing.expectEqualStrings(events_to_push2[0].event.issue.?.tags, issue.tags); │ │1082 + try std.testing.expectEqualStrings(events_to_push2[0].event.issue.?.description, issue.event.description); │ │1083 + try std.testing.expectEqualStrings(events_to_push2[0].event.issue.?.tags, issue.event.tags); │ │1084 } │ │1085 } │ │1086 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1767 const admin_repo_path = try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "admin" }); │ │1768 defer allocator.free(admin_repo_path); │ │1769 │ │1743 - const event_id_hex = (try evt.resolveOrCreateRepo(io, allocator, admin_repo_path, "admin", repo_name, .{│ │1744 - .create = if (create) .{ .read_access = .public } else null, │ │1745 - })) orelse return null; │ │1770 + const event_id_hex = (try evt.resolveOrCreateRepo( │ │1771 + io, │ │1772 + allocator, │ │1773 + admin_repo_path, │ │1774 + "admin", │ │1775 + repo_name, │ │1776 + if (create) .{ .read_access = .public } else null, │ │1777 + )) orelse return null; │ │1778 return try std.fs.path.join(allocator, &.{ cwd_path, data_dir_name, "repos", &event_id_hex }); │ │1779 } │ │1780 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ added ──────╮ │src/patch.zig│ ╰─────────────╯