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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
docs([makesplitmigration-shared-factory]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivyd3a4bd0b9581
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 759f60f3f4..d938b5fa6d 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -52,6 +52,7 @@- **[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).- **[migration-043-line-ending-precedent]** Documented in the story-builder prompt seed migration that a future migration amending those prompts must switch to the hash-driven update pattern (no user-facing change).+- **[makesplitmigration-shared-factory]** Collapsed the four monolithic→per-record data-split migrations onto one shared factory, preserving each one's exact behavior — less duplicated migration scaffolding to keep in sync (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 dispatch cycle, the app's activity record is now marked review-started once instead of once per request (no user-facing change).- **[shared-tolerant-fetch-json-helper]** Hardened the HTTP clients that talk to local model backends, the managed browser, and the background agent runner: a non-JSON/HTML error response now surfaces the real error instead of crashing with "Unexpected token <", via one shared tolerant JSON-body reader (no user-facing change).- **[tolerant-fetch-json-additional-clients]** Extended that same tolerant JSON-body reader to the remaining fetch clients (calendar/message sync, the memory and insights LLM calls, the local-LLM playground, Civitai, Telegram, and the code-review runner), so a non-JSON/HTML error body surfaces the real error instead of crashing — and the code-review runner now reports the server's actual error text instead of a misleading "no content" (no user-facing change).diff --git a/PLAN.md b/PLAN.mdindex 5190e877c9..58c61dc3a0 100644--- a/PLAN.md+++ b/PLAN.md@@ -6,7 +6,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changelClaimable, well-specified, no decision needed — `/claim`-able. Unordered.-- [ ] [makesplitmigration-shared-factory] **Extract a shared `makeSplitMigration` factory into `scripts/migrations/_lib.js`.** The monolithic→per-record split scaffolding (`fileExists` / `readJsonStrict` / `readJsonTolerant` / `writeJson` + the `withFileTypes` already-split scan + the gate1/gate2/recovery/split/stamp/backup body) is now copied verbatim across **four** migrations: `034-split-universe-builder`, `035-split-pipeline-issues`, `036-split-pipeline-series`, `059-split-media-collections`. They differ only in `{ typeDirName, legacyFilename, backupSuffix, typeSchemaVersion, typeLabel, recordsKey, idPattern, buildConfig }` (e.g. `config: { runs }` for universes vs `config: {}` for collections). `_lib.js` already houses cross-migration families (`makePromptReplaceMigration`, layout helpers) — add a split family there and collapse the four to ~15-line config blocks. Pre-existing duplication; 059 was the 4th copy. Own change + test surface, so deferred out of the migration PR.- [ ] [mediacollections-parallel-merge-prune] **Parallelize the multi-record loops in `mergeMediaCollectionsFromSync` and `pruneTombstonedCollections`.** Both iterate distinct record ids in a sequential `for await` over `queueRecordWrite` — different ids use different per-record queues, so a bounded `Promise.all` (use the shared bounded-concurrency mapper) would fan out the snapshot-apply batch (`dataSync.js` passes a full collections list) and the GC sweep. Most peer pushes carry a single record so the realized win is the snapshot/GC paths only; low priority.- [ ] [commands-centralized-parser] **`commands.js` re-implements command parsing with a naive `split(/\s+/)` instead of the centralized quote-aware parser.** `server/services/commands.js:28` splits on whitespace (breaks quoted args) and only imports `ALLOWED_COMMANDS`/`DANGEROUS_SHELL_CHARS` from `commandSecurity.js` — not its `parseCommandArgs`/`validateCommand`. Route through `validateCommand` so allow-listing, dangerous-char checks, and quote-aware arg parsing are one verified step. Verified (gemini IMPROVEMENT).- [ ] [settings-getsave-callers-stale-base] **Migrate `getSettings()→saveSettings({...spread})` callers off the external-read pattern.** `settings.js` now serializes `saveSettings`/`updateSettings` on a per-file write queue, but four callers (`server/routes/imageGen.js:724,736`, `server/routes/loras.js:62,76`) still read via `getSettings()` *outside* the queue, mutate, then `saveSettings(...)` — so a concurrent `updateSettings` landing between their read and queued write is clobbered by their stale base. The clean fix is a deep-merge-aware queued updater they can call (a plain `updateSettings` swap would change semantics: loras uses `deepMerge`, but `updateSettings` shallow-merges, which would drop sibling `civitai.*` keys; imageGen:736 deletes a sub-key by spreading rest). Low value in a single-user install (concurrent settings writes are rare) — surfaced by codex review during the settings atomicWrite migration; deferred for scope + merge-semantics risk.