Skip to content

Seed the model registry at startup from the bundled catalogue - #448

Merged
charneykaye merged 1 commit into
mainfrom
fix/seed-model-registry
Jul 28, 2026
Merged

Seed the model registry at startup from the bundled catalogue#448
charneykaye merged 1 commit into
mainfrom
fix/seed-model-registry

Conversation

@charneykaye

Copy link
Copy Markdown
Contributor

A fresh profile had an EMPTY model_registry table: nothing ever called
load_and_persist_registry(), and the PyInstaller bundle did not even
include model-registry/registry.yaml. The Welcome screen therefore had
no starter model to offer, and "Set me up" dead-ended with
MODEL_NOT_FOUND before any download began — the model-install flow was
unusable on every fresh install (it only ever worked on dev profiles
whose DB had been seeded by hand).

  • convsim-core.spec bundles model-registry/registry.yaml
  • config gains model_registry_path (frozen: sys._MEIPASS/model-registry;
    dev: repo root; env-overridable as CONVSIM_MODEL_REGISTRY_PATH)
  • startup seeds via load_and_persist_registry (idempotent upsert);
    a missing/invalid file logs a warning and degrades to an empty
    catalogue instead of blocking startup

test_model_registry_seeding.py pins the fresh-profile guarantees:
registry non-empty, a starter-role model exists, and
POST /api/setup/install admits it.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01X4GogqwrcPc5M5VkM6wMWT

A fresh profile had an EMPTY model_registry table: nothing ever called
load_and_persist_registry(), and the PyInstaller bundle did not even
include model-registry/registry.yaml. The Welcome screen therefore had
no starter model to offer, and "Set me up" dead-ended with
MODEL_NOT_FOUND before any download began — the model-install flow was
unusable on every fresh install (it only ever worked on dev profiles
whose DB had been seeded by hand).

- convsim-core.spec bundles model-registry/registry.yaml
- config gains model_registry_path (frozen: sys._MEIPASS/model-registry;
  dev: repo root; env-overridable as CONVSIM_MODEL_REGISTRY_PATH)
- startup seeds via load_and_persist_registry (idempotent upsert);
  a missing/invalid file logs a warning and degrades to an empty
  catalogue instead of blocking startup

test_model_registry_seeding.py pins the fresh-profile guarantees:
registry non-empty, a starter-role model exists, and
POST /api/setup/install admits it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X4GogqwrcPc5M5VkM6wMWT
@charneykaye
charneykaye merged commit d21646d into main Jul 28, 2026
@charneykaye
charneykaye deleted the fix/seed-model-registry branch July 28, 2026 11:14
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