fix: 保留 Todo 写后健康计数

This commit is contained in:
Codex
2026-07-10 07:33:16 +02:00
parent d6350d0234
commit d35c14fe4a
@@ -129,15 +129,20 @@ async function enqueueMutation<T>(operation: () => Promise<T>): Promise<T> {
function recordSuccessfulWrite(snapshot: TodoSnapshot, persisted: Record<string, unknown>): void {
const hash = snapshotHash(snapshot);
const config = gitStorage.summary();
storageState = {
ok: true,
initialized: true,
checkedAt: new Date().toISOString(),
config: gitStorage.summary(),
config,
verification: {
ok: true,
primary: gitStorage.enabled() ? "github-repo" : "postgres",
instances: snapshot.instances.length,
reminderNotifications: snapshot.reminderNotifications.length,
databaseHash: hash,
gitHash: gitStorage.enabled() ? hash : null,
head: config.head,
},
lastWrite: persisted,
};