tools: check the WebUI catalog in the loader sync check - #456
Open
CryptVenture wants to merge 1 commit into
Open
tools: check the WebUI catalog in the loader sync check#456CryptVenture wants to merge 1 commit into
CryptVenture wants to merge 1 commit into
Conversation
CryptVenture
marked this pull request as ready for review
September 4, 2026 18:34
check_loader_catalog_sync.py compared registered loaders, model_specs and
model_manager_v2, then reported "in sync" without ever opening
webui/configs/models_catalog.json -- the file that decides which models the
WebUI shows. Nothing in CI could see a catalog entry that named a package id
no spec publishes, or a path no package installs into.
Adds a catalog pass:
- the entry's family exists in model_specs
- download_id is an exact packages[].id in that entry's own family
- path matches the resolved package's target_directory or an installed file
- every spec family with installable GGUF packages has an entry
- every distinct installable GGUF target directory is reachable, which is
what catches shipped-but-unreachable checkpoints
- each spec's default and ui.recommended_package can actually be selected
- task and mode are in the vocabularies parsed out of session.cpp, rather
than a hardcoded list
- duplicate entry ids
- model_params.json groups resolve to a family and its declared options
Deliberate exclusions are derived rather than listed: a package counts as
installable only when its effective download.kind is huggingface_snapshot, so
families carrying kind "unsupported" for licence reasons drop out on their own.
The summary line also separates manager_packages from server_packages, which
exposes that the Python tool knows packages the native manager filters out.
The new findings are advisories by default, so this check reports the current
state rather than requiring the catalog to be rewritten in the same change:
against main it prints 86 advisories and still exits 0. --strict-catalog
promotes them to failures, which is the flag to turn on in CI once the catalog
corrections have landed.
Validation:
python3 tools/check_loader_catalog_sync.py # exit 0
python3 tools/check_loader_catalog_sync.py --strict-catalog # exit 1, 86 findings
python3 tools/check_loader_catalog_sync.py --self-test # 10 tests, OK
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CryptVenture
force-pushed
the
pr/catalog-sync-checker
branch
from
September 4, 2026 18:53
6bd2b1d to
d611ce6
Compare
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.
tools/check_loader_catalog_sync.pyalready checks that runtime loaders,model_specs/andmodel_manager_v2agree. It does not look atwebui/configs/models_catalog.json, which is how a catalog entry can name adownload_idno package defines, or apathno package installs into, and nothing notices.This teaches the existing checker to read the catalog, and reports what it finds as advisories by default so the check keeps passing on
maintoday.Behaviour
Default mode prints the advisories and a summary line naming the count, so the state is visible without failing anyone's build.
--strict-catalogpromotes them to errors, for a CI job or a local gate once the catalog is clean.What it checks per entry, for families that have a
model_specs/<family>.json:download_idis apackages[].idin that family's spec.pathis the package'starget_directory, or an installed file inside it.Example finding:
With the catalog corrected
Run against
mainit reports 86 advisories. Run with #428's catalog in place:So the two together take the catalog to clean and keep it there.
Known gap
An entry whose
familyhas nomodel_specs/<family>.jsonat all is skipped rather than reported — currently thebreeze_tts,cosyvoice3andchatterbox_turboentries. Those cannot install either, but flagging a missing spec is a different check with a different judgement call behind it (a family may legitimately ship ahead of its spec), so it is not in this change. Happy to add it as a further advisory if you want it.Self-test
--self-testruns 10 unit tests over synthetic spec/catalog pairs covering both checks, the advisory/error split, and the exit codes, so the checker's own logic is verified without depending on the repo's current contents.