Seed the model registry at startup from the bundled catalogue - #448
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
dev: repo root; env-overridable as CONVSIM_MODEL_REGISTRY_PATH)
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