Skip to content

feat(ai): migrate model catalogs to Diffex - #287

Merged
Pepps233 merged 4 commits into
mainfrom
feat/model-catalog-diffex
Oct 27, 2026
Merged

Pepps233 merged 4 commits into
mainfrom
feat/model-catalog-diffex

Conversation

@Pepps233

@Pepps233 Pepps233 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move model-catalog publication and refresh to the Diffex-owned API at https://api.diffex.ai/api/models/providers/{providerId}.

Existing caches from another URL or client version fall back to bundled models until a valid refresh succeeds.

Reasoning

Create-only revision objects, verified immutable manifests, and conditional index writes prevent interrupted or concurrent publication from exposing incomplete catalogs.

Cache provenance prevents old endpoint data, validators, or refresh timers from suppressing the migration.

Compatibility floors retain supported clients while immutable timestamps keep revalidation stable when content is unchanged.

Changes

  • Reuse bundled-model field validation for strict JSON exports and client responses.
  • Record generation time and source SHA; publish verified immutable manifests and a conditional index with initial floor 0.3.3.
  • Correct the R2 account and separate staging/production upload environments and bucket-scoped credentials.
  • Preserve Vienna publication windows, bind artifacts and publishing code to one resolved SHA, reject stale main revisions, and serialize uploads without cancellation.
  • Persist URL/version provenance, validate complete responses, and retain valid matching caches through network failures, malformed responses, timeout, and cancellation.
  • Add publication monitoring, local integration and opt-in real staging rehearsal, and cross-repository operational documentation.

Testing

  • npm run check passed on current main plus this branch.
  • Focused publisher/workflow/monitor tests: 13 passed.
  • Focused AI validation/generation tests: 18 passed.
  • Client/store/update/selector tests: 74 passed.
  • Credential-isolated harness: all 3,021 coding-agent tests passed, and ./test.sh other passed after compiling the telemetry prerequisite in the fresh worktree.
  • GitHub PR catalog generation and build-check passed; publication was correctly skipped for the PR.
  • Local publisher -> R2 S3 API -> Worker -> isolated CLI update -> interactive selector -> offline restart passed.
  • Real staging rehearsal passed interrupted uploads, conditional-write conflicts, identical-content retries, HTTP 200/304/HEAD, CLI refresh, and offline recovery.
  • Staging cleanup restored the previous index and verified zero remaining fixture objects.
  • Fresh strict upstream generation validated 1,574 models across 39 providers.

- Validate complete catalog exports before publication
- Preserve generation provenance and advance R2 indexes conditionally
- Bind serialized uploads to current main and separate staging credentials
- Match cache bodies, validators, and refresh timers to URL and client version
- Validate downloads and preserve matching caches on failure
- Use the Diffex catalog origin and retire catalog identity exceptions
- Exercise real publication, Worker serving, CLI refresh, and offline recovery with isolated fixtures.
- Detect missed generation and production publication independently of content age.
- Bind generation and upload to the resolved source revision.
@Pepps233 Pepps233 added enhancement New feature or request coding-agent labels Oct 27, 2026
@Pepps233 Pepps233 self-assigned this Oct 27, 2026
Comment thread scripts/model-publication-window.mjs Fixed
Comment thread scripts/publish-model-catalog.test.mjs Fixed
- Emit the publication decision on stdout so the script cannot write an environment-selected file.
- Restrict fixture property writes to known providers and cover the CLI regression.
@Pepps233
Pepps233 merged commit 50317ed into main Oct 27, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coding-agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants