Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Merge pull request #10919 from atomantic/claim/issue-10912

[._.]/6f77a1db7d72
diff --cc server/services/review.js
index e713ccd3c6,933ed0612b..513d9f6d8f
--- a/server/services/review.js
+++ b/server/services/review.js
@@@ -91,14 -69,14 +91,14 @@@ const ARCHIVE_ELIGIBLE_STATUSES = new S
// Module-level cache of the parsed items.json, keyed on file identity (mtime +
// size) rather than an in-process "loaded" flag: `dataManager.js` registers
- // `review` as archivable/deletable, so `data/review/` can be archived or
- // deleted out from under this process while it runs, and a flag-based cache
+ // `review` as archivable, so `data/review/` can still be replaced out from
+ // under this process while it runs (restore, or a manual delete), and a flag-based cache
// would keep serving a since-deleted file's contents forever. `saveItems`
// INVALIDATES the cache after every write rather than seeding it from what it
-// wrote: two saveItems calls can interleave (a route and a cosEvents handler
-// — the same window as the documented lost-update race), and a post-write
-// stat could then pin one writer's content under the other writer's identity
-// and serve it until the next write. Invalidation keeps the invariant simple —
+// wrote: writes are serialized by `runMutation`, but unqueued reads (`getItems`,
+// `getPendingCounts`) can still overlap a write, and a post-write stat could
+// pin one writer's content under another turn's identity and serve it until
+// the next write. Invalidation keeps the invariant simple —
// the cache only ever holds content read from the file under its own identity
// — at the cost of one re-parse per write.
//