feat: 직접 writer를 내구성 변화 저널에 연결

86개 API mutation을 분류하고 메시지 mailbox, 베팅, 국가 설정, 예약 명령의 revision/outbox 표식을 소유 transaction에 연결한다. 공개 SSE는 식별자 없는 invalidation만 노출한다.
This commit is contained in:
2026-08-16 18:38:08 +00:00
parent e4ac2a60b1
commit dd4645e4d0
22 changed files with 485 additions and 55 deletions
@@ -35,5 +35,6 @@ export const setNotice = authedProcedure
},
nationMeta
);
ctx.changeJournal?.mark('front.nation', me.nationId);
return { ok: true, msg };
});
+3 -1
View File
@@ -429,7 +429,7 @@ export const assertNationEditable = (
};
export const updateNationMeta = async (
ctx: Pick<GameApiContext, 'turnDaemon'>,
ctx: Pick<GameApiContext, 'turnDaemon' | 'changeJournal'>,
nationId: number,
updates: Record<string, unknown>,
currentMeta: Record<string, unknown>
@@ -453,6 +453,8 @@ export const updateNationMeta = async (
}
throw new TRPCError({ code: 'BAD_REQUEST', message: result.reason });
}
ctx.changeJournal?.mark('nation.content', nationId);
ctx.changeJournal?.mark('dashboard.global');
return {
...currentMeta,
...updates,