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

docs([cos-on-demand-mark-app-review-started-dedupe]): remove from PLAN.md and log to changelog

[._.]/ Adam Eivye5a1a6fa0185
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 1bf2ea0727..5321a503c4 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -33,6 +33,7 @@
- **[mediacollections-deterministic-loadone-fastpath]** Universe/series media-collection lookups now resolve their linked bucket in one direct read instead of scanning every collection, trimming the work done on each cross-machine sync push (no user-facing change).
- **[data-versioning-centralize-cosagents-settings] Saving settings is now crash-safe and serialized.** `settings.json` is written through the shared atomic temp-file/rename writer and overlapping saves run one at a time, so a mid-write crash can no longer truncate the file and two near-simultaneous settings changes can no longer clobber each other (no user-facing change).
- **[setup-data-import-drift-tables-from-migrations]** The setup script's "a prompt migration is pending" warning now derives its hash tables directly from the migration files instead of a hand-maintained copy, so the warning can't silently fall out of sync when a new prompt migration ships (no user-facing change).
+- **[cos-on-demand-mark-app-review-started-dedupe]** When several on-demand improvement requests for the same app are processed in one CoS evaluation cycle, the app's activity record is now marked review-started once instead of once per request (no user-facing change).
## Fixed
diff --git a/PLAN.md b/PLAN.md
index 8e71d29c52..eac7546682 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -8,7 +8,6 @@ Claimable, well-specified, no decision needed — `/claim`-able. Unordered.
- [ ] [cos-runner-client-non-json-response-handling] **`cosRunnerClient.js` fetch wrappers — handle non-JSON runner responses.** `spawnAgentViaRunner` and siblings (~`server/services/cosRunnerClient.js:139`) `await response.json()` unconditionally; if the runner returns a 500 HTML error page (e.g. PM2 crash mid-restart) the client crashes with `Unexpected token <` instead of surfacing the runner's actual error. Wrap each parse in `try { JSON.parse(text) } catch { { error: text } }` and propagate the synthesized error so the caller sees a useful message.
- [ ] [cos-agent-output-write-amplification] **`appendAgentOutput` write-amplification — already batched via `appendAgentOutputLines`, audit non-runner producers.** CLAUDE.md documents the streaming-producers convention (batched variant + ~250ms debounce + drain on completion); the runner path uses it. Verify every producer that calls `appendAgentOutput` directly (`server/services/cosAgents.js:216`) is human-pace, not a hot loop. If any hot producer is still calling the per-line variant, migrate it. Likely a no-op audit; capture it so the convention doesn't silently drift.
-- [ ] [cos-on-demand-mark-app-review-started-dedupe] **`evaluateTasks` on-demand loop — dedupe `markAppReviewStarted` calls per app.** When multiple on-demand requests for the same app are queued in a single evaluation cycle (`server/services/cos.js:730`), `markAppReviewStarted` is called once per request — wasted state writes. Collect unique `appId`s before the loop and call once. Nit-level priority.
- [ ] [subagent-spawner-top-level-side-effects] **`subAgentSpawner.js` top-level side effects — move init into an explicit `initSpawner()`.** Module-load (`server/services/subAgentSpawner.js:153`) wires event listeners + timers, which interferes with test isolation (each test import re-arms them). Wrap the init block in `export function initSpawner()` and call it from `server/index.js` after dependencies are ready. Treat as a refactor — needs care that no consumer relies on the import-time wiring.
- [ ] [conflict-journal-media-collections] **Conflict journal does not cover media-collection scalar overwrites.** `mergeMediaCollectionsFromSync` (`server/services/mediaCollections.js`) LWW-overwrites scalars (name/description/coverKey/universeId/seriesId) when `remoteWins`; items are union-merged (never lost). v1 hooks only universe + series merges because the whole-record content hash used by `conflictJournal.detectConflict` would false-positive on collections whenever items differ. Doing it right needs scalar-subset hashing that stays consistent with the sender-side base hash. Low value (scalar loss is minor), deferred.
- [ ] [conflict-journal-issues] **Issue-level conflict journaling.** The share-bucket importer hook (`server/services/sharing/importer.js` `applyAutoMerge`→`mergeOne`) is gated to `universe`/`series`; child issues ride LWW silently. Extend the journal to issues (needs the issue merge path to thread a `source` + call `maybeJournalBeforeOverwrite`).