Skip to content

Fix CI-breaking registry and diffusion test regressions#39

Open
christopherkarani wants to merge 1 commit intomainfrom
automation/check-frameworks-issues-20260314
Open

Fix CI-breaking registry and diffusion test regressions#39
christopherkarani wants to merge 1 commit intomainfrom
automation/check-frameworks-issues-20260314

Conversation

@christopherkarani
Copy link
Copy Markdown
Owner

Summary

This mission-critical audit run found and fixed deterministic CI blockers introduced by API/catalog evolution.

Issues fixed

  1. Compile-gate mismatch in diffusion tests (hard CI failure on non-MLX environments)

    • Tests/ConduitTests/ImageGeneration/DiffusionModelDownloaderTests.swift compiled with #if canImport(Hub) only.
    • Production symbol DiffusionModelDownloader is gated by CONDUIT_TRAIT_MLX && canImport(MLX) && (canImport(Hub) || canImport(HuggingFace)).
    • Result: tests attempted to compile against symbols excluded from the build graph.
    • Fix: mirror production gate exactly in test file.
  2. Stale model catalog assertions after provider/model expansion (CI failures)

    • Tests/ConduitTests/Core/ModelIdentifierTests.swift assumed old registry totals/provider distributions.
    • Catalog now includes additional cloud models (kimi) and changed capability distribution.
    • Fix: update provider-specific expectations to current registry shape and strengthen capability/provider invariants.
  3. Outdated ProviderType case-count expectation (CI failure)

    • Tests/ConduitTests/Core/ProtocolCompilationTests.swift expected 10 provider cases.
    • Current API surface has 12 (kimi, minimax added).
    • Fix: update expected count and explicit containment checks.

Why this matters

  • Restores full testability in environments where MLX traits are disabled.
  • Prevents false-negative CI due to stale hard-coded counts.
  • Keeps protocol/API conformance tests aligned with the actual public enum surface.

Verification

  • swift test --filter DiffusionModelDownloaderTests
  • swift test --filter ModelIdentifierTests --filter ProtocolCompilationTests
  • swift build
  • swift test

All commands pass in this workspace.

Scope

  • No production runtime behavior changed.
  • Changes are test-only and targeted to correctness of test gating and expectations.

…ests

- align DiffusionModelDownloaderTests compile gate with production symbol gate (CONDUIT_TRAIT_MLX + MLX + Hub/HuggingFace)
- update ModelIdentifierTests expectations for current registry composition including Kimi cloud models
- replace brittle capability/provider assumptions with invariant assertions that still validate registry semantics
- update ProviderType case-iterable test to current 12-case API surface (adds kimi/minimax)
- verify with focused regression tests, full swift build, and full swift test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant