Fix ring health persistence and page acknowledgements

This commit is contained in:
James Babcock committed 2026-09-17 20:23:15 -07:00
1 parent 22c851a6b9
commit c595cb4b6e
10 files changed
+472 -92

No files matched your search

+3 -1
View File
@@ -467,7 +467,9 @@ export function syncLiveRecords(): LiveSyncResult {
const store = healthStore();
const samplesWritten = store.ingestSamples(samples);
const sleepWritten = store.ingestSleep(sleep);
if (samplesWritten > 0 || sleepWritten > 0) markLiveData();
// Also mark on a retry whose samples were already appended before a later
// write failed. Otherwise opening Health could seed fixtures over real data.
markLiveData();
// ONLY here. Both store writes have returned, so the records are durable.
// If either threw, or the process died above this line, nothing is cleared