Skip to content

test: remove provider tests that dependencies already run, and low-value tests - #1785

Merged
davidtai merged 2 commits into
devfrom
test/value-cut
Nov 4, 2026
Merged

davidtai merged 2 commits into
devfrom
test/value-cut

Conversation

@davidtai

@davidtai davidtai commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Do not merge: David schedules the merge.

Why

David asked to remove provider tests that a dependency's own CI already runs, and tests with little value. He ruled the class defaults: remove class A, trim class B to the wiring check, keep class C, remove class D; tests kept by rule stay. The inventory with every candidate, its evidence and the tests left in place is work/d-inference-test-dedup-inventory.md in the layr-labs work folder (DRAFT, 2026-11-04).

Seconds below are measured: suite seconds from scripts/provider-test-shard-weights.json, per-test seconds and XCTest seconds from the dev CI run 41852182460 (3ac8dd7).

Class A: exact duplicates, removed

Each covering test runs unskipped in the dependency's Fork Tests on the pinned commit: Layr-Labs/mlx-swift-lm 32f5c744 (run 41707650518, main push, green) and Layr-Labs/mlx-swift c633d221 (run 40602051379, green).

Removed d-inference test Covering test Seconds
GPTOSSOptimizationTests target: 7 symlinks into libs/mlx-swift-lm/Tests/MLXLMTests (CBv2ModelTests, GPTOSSCompiledExperts, GPTOSSGateUpFusion, GPTOSSPrefillOutput, GPTOSSRealCheckpointParity, IncrementalCheckpointMaterialization, QuantizedSwitchLinearConstantCast) the same files, mlx-swift-lm Tests/MLXLMTests/*.swift@32f5c744 (e.g. CBv2ModelTests.swift:231,472,777,945, GPTOSSPrefillOutputTests.swift:12) 28.07
GPTOSSOptimizationTests target: 5 symlinks into libs/mlx-swift/Tests/MLXTests (ConstantArrayCastCache, GPTOSSMXFP4DecodeTail, GPTOSSMXFP4Kernel, QuantizedBiasAccumulator, QuantizedConstantCast) the same files, mlx-swift Tests/MLXTests/*.swift@c633d221:5-6 7.79
ProviderCoreTests/.../GLM5Next/GLM5NextAlignedPayloadReaderTests.swift, GLM5NextArtifactCachePolicyTests.swift (suite UnitTests) and their namespace file mlx-swift-lm Tests/MLXLMTests/Unit/Models/GLM5NextAlignedPayloadReaderTests.swift@32f5c744:11, GLM5NextArtifactCachePolicyTests.swift@32f5c744:11 (same source up to formatting) 4.31
ProviderCoreTests/.../GLM5Next/GLM5NextArtifactLoaderTests.swift (suite KernelTests) mlx-swift-lm Tests/MLXLMTests/Kernel/LLM/GLM5NextArtifactLoaderTests.swift@32f5c744:159 (byte-identical) 1.67
ProviderCoreTests/Inference/Streaming/SequenceStateMachineTests.swift (5 tests) mlx-swift-lm Tests/MLXLMTests/Unit/Common/SequenceStateMachineTests.swift@32f5c744:13 (14 tests, all five cases) 0.001
ProviderCoreTests/Inference/Engine/EvalProbeTests.swift mlx-swift Tests/MLXTests/EvalProbeTests.swift@c633d221:19,30 0.005

GPTOSSRealCheckpointParityTests skips on both sides (it needs a real checkpoint), so removing the provider copy loses no executed coverage. The GPT-OSS copies were added on 2026-09-05 (#840), before the SDK had Fork Tests (2026-09-28, mlx-swift-lm #159); the GLM5Next copies were added on 2026-10-19 (a735c3a), before the SDK suites landed (2026-10-21, mlx-swift-lm #314).

Class B: trimmed to the wiring check

None trimmed. Each candidate's dependency re-assertion and its provider wiring share one test body (NemotronSuperLocalMTP/MTPBatched/PrefixCache/Paged, EngineV2BenchmarkMTPVerification, DistributedPrefixPartition, GLM5NextCalibrationQuoteOwnership), or the test is a regression test kept by rule (GLM5NextMediaRouting OpenRouter video, #1561). Trimming them would mean rewriting tests, which the ruling does not cover. The inventory lists each.

Class D: little value, removed

Removed test Seconds Reason Covering test
DarkbloomCLITests/ClusterServiceLoginAgentTests.swift@3ac8dd76a:92 theServiceSupervisorRestartsAKilledServiceAfterTheBackoffAndNamesItself 2.180 Slow duplicate: same kill, backoff, restart and stop path; logName and restartHint are never asserted DarkbloomCLITests/ClusterMemberSupervisorTests.swift@3ac8dd76a:69, 1.256 s
ProviderCoreTests/Server/Distributed/DistributedLocalServerTests.swift@3ac8dd76a:65 distributedLocalServerHasNoLifetimeAndServesUntilStopped 1.526 1.5 s sleep; the fake session's lifetime is never read, so the test cannot detect a lifetime; serving and stop are covered faster same file :5, 0.051 s
ProviderCoreTests/Coordinator/CoordinatorIntegrationTests.swift@3ac8dd76a:330 coordinatorReconnectAfterDrop 0.882 Sibling runs the same drop and re-register steps and also checks delivery same file :390 outboundDeliverySurvivesReconnect, 1.014 s
DarkbloomCLITests/MacOSUpgradeNoticeTests.swift@3ac8dd76a:30, cases models --help, start --help, stop --help 0.548 The notice is emitted once before parsing; every --help takes the same path the --version and --help cases (kept)
ProviderCoreTests/KVCacheSSD/SSDBlockIndexTests.swift@3ac8dd76a:31, counts 4_097 and 20_000 about 0.5 (estimate; parallel cases) Same heap code as counts 64 to 256 counts 0 to 256 (kept); tieBreakOrder :69
DarkbloomFanCoreTests/FanPolicyTests.swift@3ac8dd76a:8 defaults 0.014 Asserts only default constants -
ProviderCoreTests/KVCacheSSD/SSDPrefixCacheTests.swift@3ac8dd76a:639 verifiedWeightBindingRequired 0.001 Same checks as the factory test KVCacheSSD/SSDPrefixCacheFactoryTests.swift@3ac8dd76a:155
ProviderCoreTests/KVCacheSSD/SSDPrefixCacheTests.swift@3ac8dd76a:1868 receiptRetention 0.001 Asserts one constant -
ProviderCoreTests/KVCacheSSD/SSDCompleteCheckpointStageCapTests.swift@3ac8dd76a:61 attentionCapsUnchanged 0.001 Asserts defaults only SSDPrefixCacheTests.swift@3ac8dd76a:720 ssdKnobs
ProviderCoreTests/Inference/Engine/MultiModelBatchSchedulerEngineTests.swift@3ac8dd76a:15 multiModelEngineReportsRegistry 0.001 Only checks that an empty registry is empty same file :24 multiModelEngineReturnsSortedIDs
DarkbloomCLITests/RestartCommandTests.swift@3ac8dd76a:19 restartConfiguration 0.001 Command name and abstract constants restartParses (registration)
DarkbloomCLITests/WatchdogCommandTests.swift@3ac8dd76a:21 watchdogConfiguration 0.001 Command name and visibility constants watchdogParses
ProviderCoreTests/NemotronSuperLongContextTests.swift@3ac8dd76a:15 servedContextIsTheVerifiedCeiling 0.001 Asserts one constant -
ProviderCoreTests/Coordinator/NativePairMember/NativePairMemberInvocationTests.swift@3ac8dd76a:203 thisBuildsInstalledOwnerServesACommittedStartOnlyOverTheLink 0.001 Asserts static let ... == true -
ProviderCoreTests/Benchmark/ThroughputSweepTests.swift@3ac8dd76a:436 strategyLabel (its suite is now empty and is removed) 0.001 Asserts one constant -
ProviderCoreTests/Benchmark/ThroughputSweepTests.swift@3ac8dd76a:107 fixedDecodeBudget 0.001 Asserts one constant is empty -
ProviderCoreTests/Service/WatchdogTests.swift@3ac8dd76a:73 defaultGraceIsFiveMinutes 0.001 Asserts one constant -
ProviderCoreTests/Inference/Distributed/ClusterLocalServingTests.swift@3ac8dd76a:23 theNoticeIsOnePlainLine 0.001 Compares a constant string with itself -
ProviderCoreTests/Inference/Models/GLM5Next/GLM5NextLocalLoadPolicyTests.swift@3ac8dd76a:266 providerLoadsUseTheQualifiedServingPolicy 0.001 Asserts one constant -
ProviderCoreTests/FlashNextReclaimDiagnostics.swift@3ac8dd76a:14 0 (no lane sets its switch) No assertion: sleeps, records memory and prints; undocumented -

No removed test is a security, attestation, billing, signing, release-integrity, updater or incident-regression test; each was checked with git log on its file and function. Candidates in those categories stay and are listed in the inventory under "kept by rule".

Seconds saved per lane

Lane Class A Class D Total
Provider Unit Tests (3 shards) 41.85 s 5.66 s 47.51 s
Provider SDK Tests 0 0 0
Cluster lanes 0 0 0

The provider shards ran 959 s of Swift tests in run 41852182460 (299, 289 and 371 s), so this is about 5.0 %. Measured on this PR (run 41868389528, head cd7a225): 300, 276 and 344 s, 920 s in all, 39 s less; the slowest shard is 27 s shorter. Shard order and runner speed differ between runs, so read these as one sample. The build also stops compiling and linking the GPTOSSOptimizationTests bundle; that time is not measured here.

Shard plan (scripts/provider-test-shards.py, 3 shards): estimated 382.3 s per shard before, 371.0 s after. The 7.79 s of mlx-swift XCTest classes were not in the weights (SwiftPM writes no XCTest xUnit report for a serial run); they ran in the last shard. Three shards stay. Removing entries lets the greedy plan re-place the other suites; NemotronSuperManagedSlotTests and Qwen4PagingPrefixIntegrationTests still land in different shards (KEPT_APART).

Hooked up

  • provider-swift/Package.swift: the GPTOSSOptimizationTests test target is removed with its directory.
  • scripts/provider-test-shard-weights.json: 16 entries of deleted suites removed (10 GPT-OSS suites, UnitTests, KernelTests, SequenceStateMachineTests, EvalProbeTests, FlashNextReclaimDiagnostics, SchedulerPrefillBenchmarkTests). No other weight changed.
  • scripts/test-provider-test-shards.py: drops GPTOSSOptimizationTests from the serial-target list.
  • docs/developer/test.md: the GLM5Next SDK copies paragraph now says the SDK's Fork Tests run them.
  • The Provider Unit Tests Summary audit compares executed tests with swift test list, so the removed tests drop out of both sides.

Refactor pass

An independent subagent reviewed the diff statically and pushed cd7a225: it removed the beforeReload parameter of FlashNextQuietCancellationReloadLiveTests.runReloadLifecycle, whose only caller was the deleted diagnostic, an empty MARK section in CoordinatorIntegrationTests.swift, and re-wrapped one doc line. No assertion changed.

Not changed

  • ci.yml and the Provider SDK Tests lane. Its suites duplicate the SDK's Fork Tests, but the lane is not in the gate and builds with the provider's SDK 27 toolchain; it is a separate decision in the inventory.
  • NemotronSuperRecurrentAdmissionTests: duplicates an SDK test, but scripts/nemotron-qualification/templates/Provider.Package.swift compiles the file.
  • scripts/provider-test-shard-weights.json keeps the stale EnrollmentRecoveryTests weight (22.2 s, measured 0.02 s); refreshing weights is out of scope here.

🤖 Generated with Claude Code

…lue tests

Class A (exact duplicates; the dependency's own Fork Tests run them on the
pinned commits): the GPTOSSOptimizationTests target, whose twelve files were
symlinks into libs/mlx-swift and libs/mlx-swift-lm; the provider copies of the
SDK's GLM5NextAlignedPayloadReaderTests, GLM5NextArtifactCachePolicyTests and
GLM5NextArtifactLoaderTests and their namespace file; SequenceStateMachineTests
(the SDK suite covers every case); EvalProbeTests (mlx-swift EvalProbeTests).

Class D (little value, David's ruling on the defaults): tests that assert only
a constant or a default, a sleep-bound test that could not detect what it
names, a reconnect test whose sibling runs the same steps and more, a
supervisor restart test that a faster test covers, a no-assertion diagnostic
that no lane runs, and redundant parameter cases (SSDBlockIndex counts
4097/20000, three --help cases of the upgrade notice test).

The shard weights drop the deleted suites' entries; docs/developer/test.md
no longer describes the removed SDK copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Error Error Nov 4, 2026 4:34pm UTC
d-inference-console-ui-dev Error Error Nov 4, 2026 4:34pm UTC
d-inference-landing Ready Ready Preview Nov 4, 2026 4:34pm UTC
darkbloom-status Ready Ready Preview Nov 4, 2026 4:34pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 4, 2026 4:34pm UTC

Request Review

…behind

FlashNextReclaimDiagnostics was the only caller that passed a beforeReload
closure to runReloadLifecycle, so the parameter and its call are removed.
The coordinator reconnect section header had no test left under it. The
GLM5Next test-guide paragraph is rewrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidtai
davidtai merged commit 447b230 into dev Nov 4, 2026
23 of 26 checks passed
@davidtai
davidtai deleted the test/value-cut branch November 4, 2026 17:01
davidtai added a commit that referenced this pull request Nov 4, 2026
dev's one ci.yml change, Release Integrity's new
scripts/test-provider-release-notes.py, goes into ci-master.yml, where
Release Integrity now runs; provider-tests.yml keeps this branch's lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference-landing — cd7a225b Deployed Nov 4, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — cd7a225b Deployed Nov 4, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — cd7a225b Deployed Nov 4, 2026 by vercel[bot]
Preview – d-inference — cd7a225b Deployed Nov 4, 2026 by vercel[bot]
Preview – darkbloom-status — cd7a225b Deployed Nov 4, 2026 by vercel[bot]
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