Skip to content

Fix workspace replay, stale cache reads and search state; refresh image/video models - #417

Merged
ProfSynapse merged 7 commits into
mainfrom
fix/data-safety-and-media-models
Oct 14, 2026
Merged

ProfSynapse merged 7 commits into
mainfrom
fix/data-safety-and-media-models

Conversation

@ProfSynapse

Copy link
Copy Markdown
Owner

Summary

Follow-ups to #416: four data-safety and correctness fixes, and an image/video model catalog refresh ahead of Google's Veo 3.1 preview shutdown on 2026-10-22.

Fixes

  • Same-name workspaces no longer destroy each other on replay. workspace_created replay used INSERT OR REPLACE; a create with the same name and a different id hit UNIQUE(name) and SQLite deleted the other workspace's row and edits (order-dependent). Both rows are now kept under their own ids so sessions, states, traces, tasks and conversations stay linked; the earliest-created keeps the name and the other is shown as Name (id), independent of replay order. Colliding replayed renames keep their other changes; live renames onto a taken name are refused before the event is written.
  • "Rebuild cache" left stale reads. The shared 60 s query cache is now cleared after a rebuild (also on failure) and after startup sync; a refresh that arrives mid-sync waits for the real run instead of reporting a fake success.
  • Search tool said "still initializing" when semantic search was off or broken. State now reads the embedding manager as well as the saved setting: off → keyword fallback with the off note; failed start / model load failure → new error state with a clear note; "initializing" only while actually starting.
  • Images/Video summaries named unusable models. Shows "No image provider" / "No video provider" / "Not set" when nothing usable is configured.

Image and video models

  • Deprecated: Veo 3.1 Google-direct preview (veo-3.1-generate-preview, shuts down 2026-10-22), gpt-image-1 (2026-10-23), gpt-image-1.5 and gpt-image-1-mini (2026-12-01), gemini-2.5-flash-image (2027-03-15).
  • Default video model for new installs moves to OpenRouter google/veo-3.1-fast (the Google-direct default is shutting down). Existing saved defaults are unchanged.
  • Added image: Nano Banana 2.1 (Google, OpenRouter), GPT Image 2.5 Sunburst and Flare, FLUX.3 Image, Seedream 5.0 Pro and Flash (via OpenRouter).
  • Added video (OpenRouter): Seedance 2.5, Kling v3.0 Pro, Grok Imagine Video 1.5, Runway Gen-4.5; Veo 3.1 gains 4K; Veo 1:1 removed (not supported).
  • Fix: OpenRouter 4K requests sent 4k instead of 4K and would have failed.
  • New ids verified against OpenRouter's model listings; Google/OpenAI direct ids could not be listing-checked (no keys) and no paid generations were run.
  • Needs adapter work (not included): Google's Veo successor gemini-omni-1.1-flash (Interactions API), MiniMax Hailuo 3 (2K only).
  • schemas/5.20.4/* regenerated as schemas:check requires (image model enum).

Test plan

  • npm run build (schemas check, lint, tsc, esbuild, connector)
  • Full Jest: 551 suites / 6,557 tests passing; every new test confirmed failing on the old code
  • check_model_registry.py exits 0 for google, openai, openrouter
  • Live in a throwaway vault: same-name workspace rebuild, stale-read after rebuild, semantic off/error fallback, "No image/video provider" summaries
  • End-to-end generation with the new image/video models (no paid calls made)

🤖 Generated with Claude Code

ProfSynapse and others added 7 commits October 14, 2026 12:58
Replaying a workspace_created whose name another id already held went
through INSERT OR REPLACE, which resolved UNIQUE(name) by deleting the
other row. Streams from 5.17-5.20.x (and two devices creating the same
name before syncing) therefore lost a workspace, its edits, and the parent
row of its sessions, states, projects and tasks on cache rebuild.

Both workspaces now keep their rows and ids, so every reference still
resolves. The earliest-created (ties: smaller id) keeps the name; the
other is shown as "<name> (<id>)", independent of shard order. A replayed
rename onto a taken name applies the rest of the event with the same
disambiguated name instead of failing it, and the live update refuses
such a rename before appending its event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nced

"Nexus: Rebuild cache" wiped and replayed SQLite but left the shared
repository QueryCache alone, so getWorkspace (and every other repository
read) answered with pre-rebuild rows until the 60 s TTL or a reload.
rebuildCache now clears it once the replay settles, on failure too.

Startup clears it after its sync/rebuild, since the adapter serves reads
while replay is still filling the cache. And a sync() that arrives while
another is in flight now waits for the follow-up run instead of returning
a fabricated 0-event success, so "Refresh synced data" clears the query
cache after its changes have landed, not before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
search content decided between "off" and "initializing" from the saved
setting alone. A manager turned off at runtime (setEnabled(false), or a
toggle not yet saved) and a manager whose engine failed to start or whose
model failed to load all answered semantic=true with "still
initializing", which agents retry indefinitely.

resolveSemanticSearchState now also reads the manager: turned off reads
as off (keyword fallback, "turned off" note and description), and a
failed start or a model-load error reads as a new 'error' state that
falls back to keyword search with a note naming the cause and pointing
at "Try again". "Initializing" is left for a manager that is on and
starting. EmbeddingManager keeps the last start error in getStatus().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no image provider set up, the Images fold summary named the default
model from the catalog ("Nano Banana 2") while its Model dropdown said
"No models available". The Video fold did the same for a saved provider
without a key ("Veo 3.1 · 16:9 · 720p" next to "(unavailable)").

The summaries now read "No image provider" / "No video provider" when no
provider of that kind is set up, and "Not set" when the selected one is
unusable (no key, turned off, or listed no models). The saved model is
kept, so it applies again once its provider is set up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Image:
- Add Nano Banana 2.1 (gemini-nano-banana-2.1) on Google direct and
  OpenRouter, GPT Image 2.5 Sunburst/Flare via OpenRouter, FLUX.3 Image,
  Seedream 5.0 Pro and Seedream 5.0 Flash via OpenRouter.
- Mark gpt-image-1 (shuts down 2026-10-23) and gpt-image-1.5 /
  gpt-image-1-mini (2026-12-01) as deprecated; gemini-2.5-flash-image's
  shutdown moved to 2027-03-15 per Google's deprecations page.

Video:
- Veo routes accept 16:9 and 9:16 only: drop 1:1 from Veo 3.1 (Google
  direct) and Veo 3.1 Fast (OpenRouter); add 4k to Veo 3.1 on OpenRouter.
- Send OpenRouter's case-sensitive '4K' instead of the internal '4k'.
- Add Seedance 2.5, Kling v3.0 Pro, Grok Imagine Video 1.5 and Runway
  Gen-4.5 via OpenRouter.
- Google retires every Veo 3.1 preview id on 2026-10-22 and its successor
  needs the Interactions API, so the shipped video default moves to
  OpenRouter's google/veo-3.1-fast.

Regenerate the tool catalogs for the image model enum, and add a
nexus-model-updates protocol for video models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ProfSynapse
ProfSynapse merged commit 63c6850 into main Oct 14, 2026
1 check passed
@ProfSynapse
ProfSynapse deleted the fix/data-safety-and-media-models branch October 14, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant