Repository navigation
refactor(catalog): remove the unpublished v3 wire format - #187481
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesRemoves catalog v3 parsing and publication while retaining v1/v2 support, native manifest metadata, and existing cache keys. Example: An operator refreshes from a custom mirror serving schemaVersion 3.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR is a focused, maintainer-approved cleanup with no actionable implementation findings; the supplied upgrade report addresses the earlier compatibility blocker. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin manifests and pricing sources enter the catalog publisher; downloaded bundles pass through validation and SQLite storage before model-and-pricing activation. flowchart LR
A[Plugin manifests] --> C[Catalog publisher]
B[Pricing sources] --> C
C --> D[V1 and V2 bundles]
D --> E[Client validation]
E --> F[SQLite catalog cache]
F --> G[Model and pricing activation]
Technical reviewBest possible solution: Retire the unused wire format through the existing publisher and parser owners while preserving supported catalogs and cache identities. Do we have a high-confidence way to reproduce the issue? This is an intentional refactor, and source inspection confirms the unused third wire path without executing target code. Is this the best way to solve the issue? The diff is the smallest complete cutover: it removes v3 and its version-selection wrapper while preserving v1/v2 assembly, transport sanitization, and installed inference metadata. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b367b1fd64d8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -55, Tests -135, Docs -2, Other -56. Total -248 across 9 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 29, 2026, 6:55 AM ET / 10:55 UTC (Revision 2). |
|
Decision: @vincentkoc (author of v3 in #157492) approved removing the unpublished v3 wire format, relayed by the models/catalog maintainer. Landing after CI and review. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed as c67429b.
|
…7481) ## What Problem This Solves The model catalog has a v3 wire format (openclaw#157492) that nothing uses: - The hosted publisher never writes it. `openclaw/catalog`'s publish workflow passes only `--out` and `--out-v2`, so `catalog.openclaw.ai/models/v3/catalog.json` returns 404. - No release reads it by default. The default feed is v2. Still, every catalog change has to keep a third schema, parser, publisher path and set of tests valid, and the extra format confuses anyone reading the catalog code. ## User Impact There is no change for hosted-catalog users: published v1/v2 bundles are byte-identical. A self-hosted mirror that serves v3 is now rejected like any unsupported format. The refresh fails with an error, and the previous catalog stays active. ## Why This Change Was Made - **Removed:** - The v3 schemas, types, parser and sanitizer (`remote-catalog-bundle.ts`). - The client's `schemaVersion === 3` branch (`remote-bundle.ts`). - The publisher's `--out-v3` path. `assembleVersionedModelCatalogBundle` collapses into `assembleModelCatalogBundleV2`. - The v3 mirror docs and the v3-only tests. - **Kept:** - The `inference` capability data in plugin manifests and bundled rows, which ONNX, Levanto, Liquid AI, ClawRouter, Baseten and the OpenAI policy read. - The SQLite slot key `modelCatalog.remote.v3`. It is persisted state, and renaming it would discard every install's cached catalog; only its comment changes. **Decision (models and catalog maintainer, approved by @vincentkoc, the v3 author):** remove v3 rather than publish a third hosted feed for one optional field. Additive fields will be handled by reader tolerance, not by new wire versions. Net −248 lines (9 files, +44/−292). **Known edge, unchanged behavior:** an install that points at a custom v3 mirror and still has a v3 row cached gets a parse error from `readRemoteModelCatalogUpdate` and the recommendation read until it points at a v1/v2 feed. That is the existing intended contract for any unreadable stored download (see "keeps the accepted pair after invalid JSON"). Startup already treats it as absent. ## Evidence - **Upgrade from latest stable (2026.10.8), sandboxed with the network blocked:** - The stable `openclaw models refresh` cached the hosted v2 catalog. It wrote the row `modelCatalog.remote.v2` (`schemaVersion` 2), and `config set agents.defaults.model.primary` was also set. - This PR's build, reading the same state, still lists 2 marker models that exist only in the hosted catalog. The same build with no cache lists neither. - The config value is intact, and the stored row is unchanged (no re-download). - The legacy v1 slot, emulated by re-keying a v1 row, still loads too. - A mirror serving `schemaVersion: 3` fails the refresh with exit 1, and the previous catalog stays active. A stored v3 row at startup is treated as absent: the Gateway starts cleanly with bundled rows. - Byte-identical publisher output. I ran the publisher offline before and after the change (real repo manifests with empty source lists, plus the decisions fixture). `cmp` matches for v1 (167,405 B), v2 (174,027 B), both fixture outputs and the list of fetched URLs. - Focused tests pass: - `model-catalog-normalize`: 55 tests, including new rejection of `schemaVersion: 3`. - `remote-refresh` and `remote-overlay`: 19 tests, including a new "unsupported schemaVersion" case. - `publish-model-catalog-decisions` and `-typesafe`. - `oxfmt --check` and `oxlint --type-aware` are clean on the changed files. - `git grep -E 'BundleV3|bundleV3|outV3|out-v3|modelV3|ModelV3'` finds nothing. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
The model catalog has a v3 wire format (#157492) that nothing uses:
openclaw/catalog's publish workflow passes only--outand--out-v2, socatalog.openclaw.ai/models/v3/catalog.jsonreturns 404.Still, every catalog change has to keep a third schema, parser, publisher path and set of tests valid, and the extra format confuses anyone reading the catalog code.
User Impact
There is no change for hosted-catalog users: published v1/v2 bundles are byte-identical. A self-hosted mirror that serves v3 is now rejected like any unsupported format. The refresh fails with an error, and the previous catalog stays active.
Why This Change Was Made
remote-catalog-bundle.ts).schemaVersion === 3branch (remote-bundle.ts).--out-v3path.assembleVersionedModelCatalogBundlecollapses intoassembleModelCatalogBundleV2.inferencecapability data in plugin manifests and bundled rows, which ONNX, Levanto, Liquid AI, ClawRouter, Baseten and the OpenAI policy read.modelCatalog.remote.v3. It is persisted state, and renaming it would discard every install's cached catalog; only its comment changes.Decision (models and catalog maintainer, approved by @vincentkoc, the v3 author): remove v3 rather than publish a third hosted feed for one optional field. Additive fields will be handled by reader tolerance, not by new wire versions.
Net −248 lines (9 files, +44/−292).
Known edge, unchanged behavior: an install that points at a custom v3 mirror and still has a v3 row cached gets a parse error from
readRemoteModelCatalogUpdateand the recommendation read until it points at a v1/v2 feed. That is the existing intended contract for any unreadable stored download (see "keeps the accepted pair after invalid JSON"). Startup already treats it as absent.Evidence
Upgrade from latest stable (2026.10.8), sandboxed with the network blocked:
openclaw models refreshcached the hosted v2 catalog. It wrote the rowmodelCatalog.remote.v2(schemaVersion2), andconfig set agents.defaults.model.primarywas also set.schemaVersion: 3fails the refresh with exit 1, and the previous catalog stays active. A stored v3 row at startup is treated as absent: the Gateway starts cleanly with bundled rows.Byte-identical publisher output. I ran the publisher offline before and after the change (real repo manifests with empty source lists, plus the decisions fixture).
cmpmatches for v1 (167,405 B), v2 (174,027 B), both fixture outputs and the list of fetched URLs.Focused tests pass:
model-catalog-normalize: 55 tests, including new rejection ofschemaVersion: 3.remote-refreshandremote-overlay: 19 tests, including a new "unsupported schemaVersion" case.publish-model-catalog-decisionsand-typesafe.oxfmt --checkandoxlint --type-awareare clean on the changed files.git grep -E 'BundleV3|bundleV3|outV3|out-v3|modelV3|ModelV3'finds nothing.