feat: port pre-start general deletion lifecycle

This commit is contained in:
Hide_D committed 2026-07-31 05:44:36 +00:00
1 parent f1929be3fe
commit 71ec02d091
24 files changed
+1257 -160

No files matched your search

@@ -209,6 +209,14 @@ integration('scenario 903 select pool through the durable turn daemon', () => {
const initial = await db.general.findFirstOrThrow({ where: { userId } });
const initialRuntime = runtime!.world.getGeneralById(initial.id);
const initialAccess = await db.generalAccessLog.findUniqueOrThrow({ where: { generalId: initial.id } });
if (!initialAccess.lastRefresh) {
throw new Error('selected general must have an initial access timestamp');
}
expect(
new Date((initial.meta as Record<string, unknown>).prestart_delete_after as string).getTime() -
initialAccess.lastRefresh.getTime()
).toBe(2 * 5 * 60 * 1_000);
expect(initialRuntime).toMatchObject({
id: initial.id,
userId,