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: clear 23 batch-shipped Next Up items, add changelog + 3 review-surfaced follow-ups
Adam Eivya2e681e3fa7e
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdnew file mode 100644index 0000000000..006da8e1c8--- /dev/null+++ b/.changelog/NEXT.md@@ -0,0 +1,28 @@+# Unreleased++## Added++- Voice assistant gained new tools: ask for today's calendar, your next event, the current weather, set a timer, and log a workout by voice — plus "what's on this chart?" which screenshots the active tab and describes it with a vision model.+- Voice assistant now pulls in relevant long-term memories when you ask recall-style questions ("what did I decide about…", "do I prefer…"), so answers draw on what it already knows about you.+- Video metadata (the `video-history.json` rows) now syncs between federated machines alongside the video files, so a shared collection's video items render on the receiving machine instead of showing up as missing. Thumbnails are regenerated on arrival.+- The Universes sidebar entry now expands into per-universe sub-links, matching the Series Pipeline section.++## Changed++- The image lightbox now shows the "Syncing…" placeholder and swaps in the real image the moment it arrives from a peer, instead of showing a broken image during the sync window.+- The ⌘K command palette no longer shows two ambiguous "Health" rows — the MeatSpace one is now "Body Health".+- Reverse subscriptions created during peer sync now update the Instances page live, without a manual refresh.++## Fixed++- Peer sync no longer suppresses an entire category's snapshot for a machine that only subscribes to some records — edits to your other universes/series now reach that peer, and a previously-shared record that's marked ephemeral and then deleted now propagates its deletion.+- A delete that failed to reach a peer can no longer have its tombstone garbage-collected early, which previously let the deleted record resurrect on the next sync.+- Re-importing a share bucket that resurrects a locally-deleted record now notifies peers, and the importer no longer treats a locally-deleted universe as permanently "missing".+- Remixing a video clip whose original model has since been uninstalled now tells you it fell back to the default model, instead of silently switching.+- MeatSpace iCloud writes retry on a couple more transient filesystem errors (EBUSY/EIO) that busy iCloud paths can throw.++## Internal++- The voice UI index now ships the page's visible-text only when the assistant actually needs it (on demand), trimming per-turn payload size.+- Extracted a shared `.env` parse/upsert helper for the setup scripts; migrated a duplicated byte-formatter to the shared one.+- Added a global test setup that prevents test-created records from fanning out to live sync peers, plus assorted hardening to the video render helper and TUI session handler.diff --git a/PLAN.md b/PLAN.mdindex 79604fd74b..fe2bc4f9fe 100644--- a/PLAN.md+++ b/PLAN.md@@ -4,31 +4,13 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel## Next Up-- [ ] [extract-shared-env-file-helper] **Extract a shared `.env` parse/set-key helper.** `parseEnvFile()` + single-key upsert logic is now duplicated three ways: `scripts/setup-db.js` (`setPgMode`), `scripts/setup-llm.js` (`parseEnvFile`/`setBackend`), and `server/services/localLlm.js` (`readEnv`/`writeBackend`). Deferred from the `[local-llm-backend-management]` simplify pass because the two setup scripts are intentionally dependency-light/standalone (run before/around `npm install`) and shouldn't import from `server/lib`. Cleanest fix: a tiny `scripts/lib/envFile.js` shared only between the setup scripts (parse + `upsertEnvKey(path, key, value)`); leave `localLlm.js`'s copy or have it import the same helper if the script→server boundary is acceptable. ~15 lines each.-- [ ] [migrate-taskitem-formatattachmentsize-to-formatbytes] **Migrate `TaskItem.jsx`'s local `formatAttachmentSize` to shared `formatBytes`.** `client/src/components/cos/tabs/TaskItem.jsx` still defines a local `formatAttachmentSize(bytes)` (B/KB/MB with `.toFixed(1)`) that duplicates `formatBytes` in `client/src/utils/formatters.js`. Surfaced by gemini review during the `[migrate-two-remaining-local-formatters]` claim 2026-05-24; deferred as out-of-scope for that item (which named only `formatDateTime` + `formatDurationMin`). Note the edge-case semantics differ: the local helper returns `''` for falsy/0 size (used inside an attachment `title` like `(1.5 KB)`), while `formatBytes(0)` returns `'0 B'` — preserve the empty-on-missing behavior with a guard (`att.size ? formatBytes(att.size) : ''`) so the title doesn't render `(0 B)` for sizeless attachments.-- [ ] [optimize-voice-ui-index-text-payload-lazy-only-run] **Optimize `voice:ui:index` text payload.** Lazy: only run `extractVisibleText` when server requests via `voice:ui:read-request`. Keep current behavior as fallback.-- [ ] [voice-agent-explicit-long-term-memory-routing-on] **Voice agent — explicit long-term memory routing.** On retrieval-shaped voice turns, inject top-N relevant memories into the system prompt via `brain_search`.-- [ ] [flux2-multi-reference-python-runner] **FLUX.2 multi-reference Python runner.** The UI + server contract for multi-reference editing shipped 2026-05-17 (slug `multi-reference-image-editing-for-flux-2-ui`); the Python runner (`scripts/flux2_macos.py`) currently ignores the `--reference-images`/`--reference-strengths` args that `local.js` now passes. Wire diffusers' multi-reference API in the runner and swap `server/lib/mediaModels.js#flux2-klein-9b` `tokenizerRepo` to `FLUX.2-klein-9B-kv` (gated repo — requires the user to accept the license on HF). Validate end-to-end with 2–4 uploaded refs.-- [ ] [voice-cos-tool-expansion-calendar-today-calendar] **Voice CoS tool expansion** — `calendar_today` / `calendar_next` (existing Google Calendar MCP), `meatspace_log_workout` (wraps `meatspaceHealth.js`), `weather_now` (pick API: OpenWeather / WeatherKit / NWS), `timer_set` (reuses `agentActionExecutor.js`).-- [ ] [voice-agent-vision-fallback-ui-describe-visually] **Voice agent vision fallback** — `ui_describe_visually`: screenshot tab and send to a vision-capable model so "what's on this chart?" works on CyberCity / graph views.-- [ ] [apple-health-integration-live-sync] **Apple Health integration for MeatSpace.** iOS live sync (HealthKit Shortcut → `POST /api/meatspace/apple-health` endpoint) plus a bulk historical import path for an exported `export.xml`. Wire into existing MeatSpace tabs so steps / sleep / heart rate / VO2 max / resting HR show alongside the alcohol / blood / body / epigenetic tracks already shipped. GOALS.md flags this as a documented Secondary Goal ("Apple Health integration planned") but no implementation tracking existed until this entry. When this lands, also fold an Apple-Health-imported signal into the Capabilities page "Genome & Health" row (`server/lib/capabilityMap.js#genomeRow` + the route's `genome` fetch) so a health-only setup no longer reports "Not set up" purely because no genome is uploaded (codex review of `[codex5-onboarding-capability-map]`, 2026-05-24).-- [ ] [ref-watch-phosphene-mlx-post-decode-os-exit] **Bypass MLX post-decode deallocator hang via `os._exit(0)`.** From `reference-watch` review of phosphene (commits `adc1cd25` + `94bd6965`, 2026-05-22). At PortOS's current `LTX2_PIN=f8f20c83` the bug isn't reachable, but the moment a user updates `ltx-2-mlx` or PortOS bumps the pin past the May 9 refactor, every Distilled / Extend / two-stage render stalls 5–15 min after the upstream "Decoding done in X.Xs" log while Metal command-buffer completion handlers hold the GIL through frame teardown. Fix: in `scripts/generate_ltx2.py` `main()`, after `print(json.dumps(...))`, call `os._exit(0)` instead of returning normally — mp4 is on disk, stdout was flushed, skipping deallocator teardown saves up to 15 min. Document why in the file's docstring. Subsumes any in-helper watchdog approach.-- [ ] [ref-watch-phosphene-broaden-negative-prompt-override] **Broaden `DEFAULT_NEGATIVE_PROMPT` override to every module that defines it.** From `reference-watch` review of phosphene (commit `4e6129b7`, 2026-05-22). `scripts/generate_ltx2.py:55-70` `configure_negative_prompt()` only patches `ti2vid_one_stage.DEFAULT_NEGATIVE_PROMPT`. At PortOS's current pin this happens to cover every pipeline (the constant resolves against `ti2vid_one_stage` for the base class), but post-May-9 the constant moves to `ltx_pipelines_mlx._base` and `utils.constants` — and the PortOS override silently no-ops on Q8 / two-stage / HQ paths with no error for the user to chase. Fix: rewrite `configure_negative_prompt()` to probe `ti2vid_one_stage`, `_base`, and `utils.constants`, monkey-patch every module that has the constant. Keep PortOS's *replace* semantics (don't switch to phosphene's append-with-comma). No contextmanager needed — the helper is short-lived.-- [ ] [peer-sync-ephemeralize-then-delete-stalls-tombstone] **A previously-shared universe/series that's marked ephemeral, then deleted, never propagates the tombstone when the peer still has other subscriptions of that kind.** Codex iter-8 in v2.7.0 release review (P2). The ephemeralize step's `unsubscribeAllForRecord` removes the per-record sub for that record; the subsequent delete fires `recordEvents.deleted` but there's no sub to push it. The snapshot path in `syncOrchestrator.categoriesCoveredByPeerSync` then suppresses the whole-category snapshot for that peer (because ANY other per-record sub for that kind exists), so the tombstone has no fallback transport either. The peer keeps the old live copy indefinitely. Same root cause as `[peer-sync-snapshot-skip-too-coarse-for-partial-subscriptions]` — the snapshot-skip fix needs to either send the snapshot with subscribed records excluded (so tombstones for unsubscribed-but-previously-known records can still ride it), or detect the ephemeralize-then-delete sequence and proactively push the tombstone before tearing down the sub.-- [ ] [peer-sync-per-record-tombstone-ack-cursor] **Tombstone ack cursor is per-peer but should be per-(peer,record).** Codex iter-6 in v2.7.0 release review (P2). Today `ackDeletesUpTo(peerId, deletedAt)` writes a single high-water-mark per peer. If push for record-A fails and a later push for record-B succeeds, the receiver returns `ackedDeletesUpTo = B.deletedAt > A.deletedAt`; the sender then advances the cursor past A's deletedAt even though A was never confirmed delivered. After grace, `tombstoneGc` treats A as acked, prunes it, and A's stale live copy on the receiver resurrects on the next sync that lands. Fix options: (a) per-`(peer, kind, recordId)` cursor (storage proliferation; needs cleanup on record GC); (b) per-(peer, kind) cursor advanced only when the push response cumulatively confirms every-tombstone-up-to-that-deletedAt was delivered (requires receiver to track-and-respond with "I have all your tombstones up to T"); (c) keep current cursor but also persist a per-record `lastConfirmedPushedAt` on each subscription row, and let GC's `cutoffForKind` use `min(min-of-lastConfirmedPushedAt-across-all-records-of-this-kind)`. Option (c) is the smallest behavioral change. Defer because under the dominant single-writer/single-reader pattern in PortOS, push failures are rare and re-tried on the next event tick.-- [ ] [peer-sync-medialightbox-use-mediaimage-for-syncing-assets] **`MediaLightbox.jsx` uses a raw `<img src=...>` for the main media element — peer-synced images that haven't been pulled yet show a broken image and don't get the `peerSync:asset-arrived` placeholder/live-swap.** Codex iter-6 in v2.7.0 release review (P2). The `MediaImage` component was added specifically to handle this, but only thumbnail/card paths use it. Replace the lightbox's `<img>` with `MediaImage` so opening an image during the sync window shows the "Syncing" placeholder and atomically swaps to bytes when they land. Cross-check every `<img>` in `MediaPreview.jsx`, `MediaCollectionDetail.jsx`, `UniverseBuilder.jsx` for the same gap. Defer because the lightbox is reached after the user clicks a thumbnail — by then the thumbnail's MediaImage has likely already swapped to live bytes, so the lightbox typically sees the same.-- [ ] [peer-sync-snapshot-skip-too-coarse-for-partial-subscriptions] **`syncOrchestrator.categoriesCoveredByPeerSync` skips the entire `universe`/`pipeline` snapshot for any peer with ANY per-record subscription in that category, AND uses our OUTGOING subscriptions to suppress INBOUND snapshot pulls — two conflated failures.** Codex iter-4 + iter-9 in v2.7.0 release review (P1/P2). Today: (a) if peer-A has 3 subs for universes A/B/C but the user has 10 universes total, the snapshot for peer-A is fully suppressed, so universes D-J never get edits to peer-A; (b) the outbound sub only proves WE push to peer-A — if the reverse subscription was never created (older peer, inbound-only, initial push failed), peer-A's edits stop reaching us. The fix needs to: (1) distinguish outbound (we push) from inbound (peer pushes) coverage; (2) send the snapshot for un-subscribed records of the category — either by suppressing only when full coverage is confirmed, or by passing an exclude-set into `getUniverseSnapshot`/`getPipelineSnapshot`. Scope: rework `categoriesCoveredByPeerSync` to return a per-direction record-id-set; thread the exclude-set into the snapshot getters. Defer because the snapshot-skip works correctly for the common case (peer subscribes to all-or-none); fixing it requires a thoughtful refactor.-- [ ] [vitest-global-instances-mock-blocks-peer-sync-leakage] **Add a global vitest setup file that mocks `services/instances.js#getPeers` to return `[]` by default, with an opt-out for tests that need the real peer registry.** Surfaced 2026-05-23 during v2.7.0 release: every npm test run was creating "Commit U" + "Commit S" series/universe records on the user's null sync machine. Root cause: `services/instances.js` uses `dataPath('instances.json')` whose closure captures the REAL `PATHS.data`, so a test's `vi.mock('../lib/fileUtils.js', { PATHS: redirected })` doesn't redirect instances reads. `createUniverse`/`createSeries`/`createIssue` then call `autoSubscribeRecordToAllPeers` → `getPeers()` (real instances.json) → `subscribePeer` → initial `pushRecordToPeer` (real HTTP POST to live peer). Three test files were patched as point fixes (`importer.test.js`, `universeBuilderCollectionHook.test.js`, `writersRoom/promoteToPipeline.test.js`) but the pattern will recur as new tests are added. Two paths: (a) add `setupFiles: ['./vitest.setup.js']` to `vitest.config.js`, where setup does `vi.mock('./services/instances.js', { getPeers: () => Promise.resolve([]) })` plus an opt-out registry; (b) refactor `fileUtils.js#dataPath` to use a `getDataRoot()` getter so PATHS mocks propagate through. Option (a) is smaller and more targeted; option (b) fixes a class of leakage beyond peer-sync. Pick (a) for v2.7.x, revisit (b) if more leakage surfaces.-- [ ] [peer-sync-video-collection-metadata-sync] **Sync video-history.json rows alongside .mp4 bytes pushed via peer-sync.** Codex review of the v2.7.0 release PR (2026-05-23) flagged that `buildAssetManifestForCollection` ships the `.mp4` bytes for `kind: 'video'` collection items but never pushes the corresponding `video-history.json` row. After the receiver pulls the asset, `MediaCollectionDetail.jsx#hydrate` looks up the item ref in the `videosById` map (`listVideoHistory()`) and silently filters it out as "missing." The collection appears half-empty on the receiver. Fix options: (a) add `videoHistory` to the snapshot-sync category set so the rows ride the 60s loop; (b) bundle the matching `video-history.json` row alongside the collection item in `linkedCollection` and merge on the receiver; (c) on first pull, synthesize a stub history row from the asset metadata. (a) is the simplest and matches the existing `mediaCollections` snapshot category pattern. Also generate thumbnails on the receiver (or push them as a sibling asset kind). Scope: `server/services/dataSync.js` add `videoHistory` getter + merge; `routes/dataSync.js` add to enum; `routes/instances.js` `syncCategoriesSchema` add the key; `client/src/services/apiInstances.js` `SYNC_CATEGORY_META` add the row. Surfaced in v2.7.0 release codex review.-- [ ] [peer-sync-reverse-subscription-ui-broadcast] **Emit a socket event when applyIncomingPush auto-creates a reverse subscription so the Instances page updates without a refetch.** Today `peerSync:subscription:created` (or similar) doesn't exist; the `PeerCard` in `Instances.jsx` loads `peerSubs` once on mount keyed on `peer.instanceId` only, so a reverse-sub created via `maybeCreateReverseSubscription` is invisible until page reload. Add a socket event (or include a `peerSubsRevision` token on `instances:peers:updated`) and let `PeerCard` re-fetch on bump. Reviewer-3 in v2.7.0 release review.-- [ ] [peer-sync-disambiguate-two-health-rows-in-palette] **Disambiguate the two `Health` rows the ⌘K palette now renders.** Moving the CoS Health page from `meatspace.health` semantics also added `aliases: ['cos-health', 'health']` to `nav.cos.health` while keeping `nav.meatspace.health` with the label "Health". The palette renders two rows labeled "Health" under different sections; bare "health" voice routes to CoS. Pick one: rename the MeatSpace label to "Body Health" / "Health Metrics" in both `Layout.jsx` and `navManifest.js`, or document the bare-word disambiguation as final. Reviewer-6 in v2.7.0 release review.-- [ ] [peer-sync-insertxxxwithid-emit-on-resurrection] **`insertXxxWithId` should `emitRecordUpdated` + `autoSubscribeRecordToAllPeers` when it overwrites a tombstone.** Today `insertUniverseWithId` / `insertSeriesWithId` / `insertIssueWithId` warn and overwrite the on-disk tombstone but never notify federated peers. A share-bucket re-import that resurrects a deleted record won't propagate until the next manual edit bumps `updatedAt`. Mirror `createUniverse`'s side effects on the tombstone-overwrite branch. Reviewer-2 in v2.7.0 release review.-- [ ] [peer-sync-importer-tombstone-deferred-detection] **Share-bucket importer treats local tombstones as "deferred" forever.** `server/services/sharing/importer.js` reads with default `getUniverse(...).catch(() => null)` which 404s tombstoned records, returns `{ missingUniverse: true, itemsDeferred }`. The deferred items never apply because the universe IS on disk — just tombstoned. Fix: read with `includeDeleted: true` and either treat tombstone as "deferred until live" with a UI message, or auto-resurrect via `insertUniverseWithId`. Reviewer-2 in v2.7.0 release review.-- [ ] [tui-handledata-finish-rejection-not-handled-by-trycatch] **TUI `handleData`'s try/catch covers most awaits but `await finish(...)` on command-not-found can still reject inside the same body.** The v2.7.0 wrap is fine for `updateAgent` rejections but `finish` is `async` and could be extended in the future to surface a rejection on its own write path. Add a defensive `.catch` on the `await finish(...)` invocation OR confirm in a one-line comment that `finish` is idempotent and never rejects. Reviewer-4 in v2.7.0 release review.-- [ ] [mortalloom-writestore-transient-set-widen] **`mortalLoomStore.writeStoreAtPath`'s `withTransientRetry` accepts a narrower errno set than what real iCloud writes throw.** `isTransientFsError` covers EAGAIN/EDEADLK/-11 but not the EBUSY/EIO that `bird` daemon contention can surface on busy iCloud paths. Either widen the predicate OR document the choice. Reviewer-4 in v2.7.0 release review.-- [ ] [video-gen-remix-stale-model-toast] **VideoGen `validateModelId` effect silently drops a Remix-supplied model to default when the original is gone.** A user who Remixes a clip generated on a model they later uninstalled gets dropped to default with no toast — they think they're rendering with the same model. Add a single one-shot `toast.info('Original model X no longer available — using default')`. Reviewer-6 in v2.7.0 release review.-- [ ] [universes-sidebar-per-universe-grandchildren] **Sidebar parity: expand the "Universes" nav item into per-universe sub-links (like Series Pipeline).** The Series Pipeline sidebar entry uses `dynamic: 'pipelineSeries'` to render one grandchild link per series (`client/src/components/Layout.jsx:434` `decoratePipelineChild`, fed by a `listPipelineSeries()` fetch at 399–423). The new `/universes` index (PR for `[work] universe-builder-crud`) left the "Universes" entry as a plain link — no per-universe grandchildren. For parity, add a `dynamic: 'universes'` flag to the `{ to: '/universes', label: 'Universes' }` child, a sibling `listUniverses()` fetch + `setUniverses` (mirror the pipelineSeries effect, including the 30s focus-refresh + signature guard), and a `decorateUniverseChild` in the `resolvedNavItems` memo that maps each universe to `{ to: '/universes/<id>', label, activePathPrefix: '/universes/<id>' }`. Skipped in the CRUD PR as scope creep — the user asked for a list/table page, not sidebar sub-links. Low urgency; nice-to-have discoverability.-- [ ] [ref-watch-phosphene-lazy-eval-env-bootstrap] **Lazy-eval env bootstrap for M-series perf.** From `reference-watch` review of phosphene (commit `a6e4573f`, context from `ec1437fe`, 2026-05-22). Phosphene measured ~15–25× perf loss on M4 Max with the upstream default `LTX2_DIT_EVAL_EVERY=8` vs `=0`/`=1`, caused by per-block Metal command-buffer churn. The env vars only exist post-May-9 upstream, so this is a "land it with the pin bump" item. Fix: at the very top of `scripts/generate_ltx2.py` (BEFORE any `ltx_*` import, because `ltx_core_mlx.model.transformer.model` reads `LTX2_DIT_EVAL_EVERY` at import time), add `os.environ.setdefault("LTX2_DIT_EVAL_EVERY", "0")` and `os.environ.setdefault("LTX2_GEMMA_EVAL_EVERY", "0")`. User-supplied env still wins via `setdefault`. Phosphene's matrix suggests `=1` is a slightly safer middle if `=0` produces a post-decode hang; use `=0` and revisit if regressions appear.+_Batch-cleared 2026-05-25: 23 Next Up items shipped together via parallel sub-agents (env-file helper, formatBytes migration, lazy voice UI text, voice long-term-memory routing, voice tool expansion + `ui_describe_visually`, three phosphene generate_ltx2.py hardenings, the peer-sync snapshot-coverage P1 refactor + ephemeralize-then-delete, per-record tombstone-ack clamp, MediaLightbox→MediaImage, global vitest peer mock, videoHistory sync category, reverse-sub UI broadcast, palette Health disambiguation, insertXxxWithId resurrection side-effects, importer tombstone detection, TUI finish-rejection note, mortalLoom errno widen, VideoGen stale-model toast, Universes sidebar grandchildren). See `git log` + `.changelog/NEXT.md`. The two remaining items below were deferred (gated on external resources)._++- [ ] [flux2-multi-reference-python-runner] **FLUX.2 multi-reference Python runner.** The UI + server contract for multi-reference editing shipped 2026-05-17 (slug `multi-reference-image-editing-for-flux-2-ui`); the Python runner (`scripts/flux2_macos.py`) currently ignores the `--reference-images`/`--reference-strengths` args that `local.js` now passes. Wire diffusers' multi-reference API in the runner and swap `server/lib/mediaModels.js#flux2-klein-9b` `tokenizerRepo` to `FLUX.2-klein-9B-kv` (gated repo — requires the user to accept the license on HF). Validate end-to-end with 2–4 uploaded refs. _(Deferred 2026-05-25 from the batch-clear: blocked on gated HF model + GPU validation; can't be verified autonomously.)_+- [ ] [apple-health-integration-live-sync] **Apple Health integration for MeatSpace.** iOS live sync (HealthKit Shortcut → `POST /api/meatspace/apple-health` endpoint) plus a bulk historical import path for an exported `export.xml`. Wire into existing MeatSpace tabs so steps / sleep / heart rate / VO2 max / resting HR show alongside the alcohol / blood / body / epigenetic tracks already shipped. GOALS.md flags this as a documented Secondary Goal ("Apple Health integration planned") but no implementation tracking existed until this entry. When this lands, also fold an Apple-Health-imported signal into the Capabilities page "Genome & Health" row (`server/lib/capabilityMap.js#genomeRow` + the route's `genome` fetch) so a health-only setup no longer reports "Not set up" purely because no genome is uploaded (codex review of `[codex5-onboarding-capability-map]`, 2026-05-24). _(Deferred 2026-05-25 from the batch-clear: multi-file feature with an iOS Shortcut component that needs a device to verify.)_+- [ ] [peer-sync-per-category-version-gate] **Generalize the cross-install schema version gate from whole-payload to per-category.** Surfaced by code review during the batch-clear of `[peer-sync-video-collection-metadata-sync]` (2026-05-25). `compareSchemaVersions` (`server/lib/schemaVersions.js`) walks the UNION of category keys, and the three gate sites (`dataSync.js` `applyRemote`, `peerSync.js` push, `importer.js` import) reject the ENTIRE payload on any `ahead.length > 0`. So introducing a brand-new category key — or bumping one category — makes every not-yet-upgraded peer reject ALL categories (universe, pipeline, …), severing sync across a federation that upgrades on independent schedules. `videoHistory` sidestepped this by deliberately staying OUT of `PORTOS_SCHEMA_VERSIONS` (see the comment there), but `mediaCollections: 1` has the same latent property. Fix: scope the ahead-check to the category (for `applyRemote`/import) or the record's kind→category (for push) actually being transferred, so a newer sender's unknown/bumped category gates only THAT category's transfer, not unrelated ones. Keep the union-walk for diagnostics/UI. Needs new cross-key test coverage (today's tests only exercise same-category gaps).+- [ ] [voice-weather-settings-location] **Wire a real `settings.location { lat, lon }` field so `weather_now` can use a configured location.** Surfaced during the batch-clear review of `[voice-cos-tool-expansion]` (2026-05-25). The `weather_now` voice tool already reads `settings?.location?.{lat,lon}` (forward-compatible, guarded) but no Settings UI or Zod slice ever sets it, so with no `lat`/`lon` args it always falls back to the default location. Add a `location` settings field (Settings UI + a Zod slice in `server/lib/validation.js`), then the existing tool path lights up. Small.+- [ ] [mediacard-use-mediaimage-for-syncing-assets] **`MediaCard.jsx` grid thumbnails still use a raw `<img src={previewUrl}>`.** Same peer-sync placeholder/live-swap gap that `[peer-sync-medialightbox-use-mediaimage-for-syncing-assets]` fixed for the lightbox — `client/src/components/media/MediaCard.jsx` (~line 42) doesn't get the "Syncing" placeholder or the `peerSync:asset-arrived` atomic swap. Swap the raw `<img>` for `MediaImage`. Surfaced by that item's cross-check during the batch-clear (2026-05-25); was outside its stated scope.## Deferred Architecture (human-led planning)