Skip to content

refactor(catalog): remove the unpublished v3 wire format - #187481

Merged
obviyus merged 1 commit into
mainfrom
refactor/remove-catalog-v3
Oct 29, 2026
Merged

obviyus merged 1 commit into
mainfrom
refactor/remove-catalog-v3

Conversation

@obviyus

@obviyus obviyus commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The model catalog has a v3 wire format (#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.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: M labels Oct 29, 2026
@obviyus
obviyus marked this pull request as draft October 29, 2026 07:59
@obviyus
obviyus requested a review from vincentkoc October 29, 2026 07:59
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Removes 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.

  • Before: The client accepts and caches the v3 catalog.
  • After: The refresh rejects the unsupported format and preserves the previously accepted catalog.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct cleanup supported by a detailed maintainer upgrade report and successful current-head gates; runtime results were reported rather than independently replayed.
Proof confidence 🐚 platinum hermit (4/6) This collaborator-authored PR is outside the ordinary contributor proof gate; its body reports offline CLI upgrade, publisher byte comparisons, v3 refresh rejection, and Gateway startup behavior, without attached terminal artifacts.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: The unpublished third wire format adds maintenance cost without serving the default hosted catalog.
Reason: The collaborator-authored PR records approval for removal, retains native plugin capabilities, and accepts the limited custom-mirror compatibility change.

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
Reviewed head: 68c101989d91f95ab8c2e00dbdd13023fac2c3e9

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The reported CLI upgrade covers preserved caches and settings, but no red-on-base execution output is supplied for the new v3 rejection case.
Agent review details

How this fits together

Plugin 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]
Loading

Technical review

Best 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

  • V3 schemas, client parsing, publication, and associated tests changes intended behavior with a stated reason (cff3c30: Carry native decision capabilities separately from released v1/v2 feeds.)
  • V2 publisher assembly keeps the original intent (a87f01c: Publish a model-first v2 catalog beside unchanged v1 output using the existing assembly and pricing owners.)
  • Version-isolated cached catalog state keeps the original intent (cff3c30: Keep older readers' cached entries intact when newer clients store their own catalog.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 2c9c6c8 adds scripts/publish-model-catalog.mts:1042 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2c9c6c868855; files: scripts/publish-model-catalog.mts)
  • Vincent Koc: Raw commit f1f18d7 adds src/model-catalog/remote-bundle.ts:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f1f18d72dec0; files: src/model-catalog/remote-bundle.ts)
  • Peter Steinberger: Raw commit 4909d3e adds src/model-catalog/remote-store.ts:86 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4909d3ebce32; files: src/model-catalog/remote-store.ts)

PR surface

Source -55, Tests -135, Docs -2, Other -56. Total -248 across 9 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 4 59 -55
Tests 4 14 149 -135
Docs 1 5 7 -2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 21 77 -56
Total 9 44 292 -248

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is maintenance cleanup without an established hosted-user outage.
  • merge-risk: 🚨 compatibility: Custom v3 mirrors and cached v3 payloads become unsupported; the recorded maintainer decision explicitly accepts this tradeoff.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-29T08:14:11.876Z sha 68c1019 :: blocked before merge. :: none

Reviewed October 29, 2026, 6:55 AM ET / 10:55 UTC (Revision 2).

@obviyus
obviyus marked this pull request as ready for review October 29, 2026 10:05
@obviyus

obviyus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@obviyus

obviyus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 29, 2026
@obviyus
obviyus merged commit c67429b into main Oct 29, 2026
288 of 323 checks passed
@obviyus
obviyus deleted the refactor/remove-catalog-v3 branch October 29, 2026 10:57
@obviyus

obviyus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as c67429b.

  • Problem: catalog v3 had no hosted publisher and no default reader, yet every catalog change had to keep its schema, parser and publisher path valid.
  • Fix: removed the v3 schemas, parser, client branch, --out-v3 path, docs and v3-only tests (net −248 lines). Kept inference in manifests and the modelCatalog.remote.v3 SQLite slot key.
  • Decision: approved by @vincentkoc, who authored v3. Thanks, Vincent.
  • Proof:
    • Published v1/v2 output is byte-identical.
    • An upgrade from 2026.10.8, sandboxed and offline, still loads the cached hosted catalog and config. A v3 mirror bundle is rejected, and the previous catalog stays active.
    • CI is green, and ClawSweeper says ready on 68c1019.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant