Mission-critical audit fixes: MLX test gating, sendability, and registry test drift#37
Open
christopherkarani wants to merge 1 commit intomainfrom
Open
Mission-critical audit fixes: MLX test gating, sendability, and registry test drift#37christopherkarani wants to merge 1 commit intomainfrom
christopherkarani wants to merge 1 commit intomainfrom
Conversation
…tests - fix DiffusionModelDownloaderTests compile gating to match MLX-only production conditions - harden DeviceCapabilities chip detection by checking sysctl return codes and replacing deprecated String(cString:) path with safe UTF-8 decode - make GenerationSchema internal EncodingError payload Sendable-safe by replacing Any with String - update ModelIdentifierTests for current registry composition (Kimi cloud models and capability totals) - update ProtocolCompilationTests for new ProviderType cases (kimi/minimax) Validation: - swift build - swift test
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.
Summary
This automation run performed a mission-critical audit focused on correctness and test reliability, then implemented and verified fixes.
1) Fixed hard test compile break (MLX gating mismatch)
DiffusionModelDownloaderTestswas compiled under#if canImport(Hub)while production diffusion types are only compiled underCONDUIT_TRAIT_MLX && canImport(MLX)(+ backend imports).DiffusionModelDownloader,DiffusionModelRegistry,DownloadedDiffusionModel).#if CONDUIT_TRAIT_MLX && canImport(MLX) && (canImport(Hub) || canImport(HuggingFace))Tests/ConduitTests/ImageGeneration/DiffusionModelDownloaderTests.swift2) Removed deprecated + less-safe chip type decoding path
DeviceCapabilities.getChipType()used deprecatedString(cString:)and ignoredsysctlbynamereturn values.sysctlbynamereturn codes and size validity.Sources/Conduit/Core/Types/DeviceCapabilities.swift3) Resolved Swift 6 Sendable warning in schema encoding error path
EncodingError.invalidValuestoredAny, causing Sendable diagnostics.String, preserving behavior while removing non-Sendable payload.Sources/Conduit/Core/Types/GenerationSchema.swift4) Fixed stale unit tests after provider/model catalog expansion
ModelIdentifierTestsandProtocolCompilationTestshad hard-coded expectations that no longer matched current catalog/provider surface (Kimi and MiniMax additions).kimiandminimaxplus network/display checks.Tests/ConduitTests/Core/ModelIdentifierTests.swiftTests/ConduitTests/Core/ProtocolCompilationTests.swiftVerification
swift build✅swift test✅Notes
tasks/were intentionally not committed per repo guidance.