fix(tests): use [SkippableFact] for gated safetensors E2E tests (#392) - #412
Open
jamesburton wants to merge 1 commit into
Open
fix(tests): use [SkippableFact] for gated safetensors E2E tests (#392)#412jamesburton wants to merge 1 commit into
jamesburton wants to merge 1 commit into
Conversation
Mistral7B_LoadsAndForwardsEndToEnd_WhenCheckpointPresent, Mixtral8x7B_LoadsAndForwardsEndToEnd_WhenCheckpointPresent, and Qwen15MoeA27B_LoadsAndForwardsEndToEnd_WhenCheckpointPresent were declared [Fact] instead of [SkippableFact], so the Xunit.SkipException thrown by RunGatedSafetensorsSmoke when the gated checkpoint is absent was counted as a test FAILURE instead of a skip, making the Integration Tests CI job red on every PR. Swept tests/ for other [Fact]/[Theory] methods that throw SkipException (via Skip.If/Skip.IfNot/SkipException) without the Skippable attribute; no other occurrences found.
There was a problem hiding this comment.
Pull request overview
Fixes CI instability in the integration test suite by ensuring gated Safetensors E2E tests are treated as skipped (not failed) when required checkpoint fixtures are absent, aligning with the existing skipping pattern used throughout RealHfSafetensorsEndToEndTests.
Changes:
- Switched three gated Safetensors E2E tests from
[Fact]to[SkippableFact]soSkipExceptionis reported as Skipped. - Brought
Mistral7B,Mixtral8x7B, andQwen15MoeA27Btests in line with the rest of the class’ gating conventions.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Aug 14, 2026
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
Closes #392.
Three
RealHfSafetensorsEndToEndTestsmethods were declared[Fact]instead of[SkippableFact]:Mistral7B_LoadsAndForwardsEndToEnd_WhenCheckpointPresentMixtral8x7B_LoadsAndForwardsEndToEnd_WhenCheckpointPresentQwen15MoeA27B_LoadsAndForwardsEndToEnd_WhenCheckpointPresentAll three route through
RunGatedSafetensorsSmoke, which throwsXunit.SkipExceptionwhen the gated checkpoint is absent (DOTLLM_*_CHECKPOINT_PATHunset and no conventionalC:/temp/...snapshot). Because they were plain[Fact], xunit counted thatSkipExceptionas a FAILURE, making the Integration Tests CI job red on every PR — confirmed live on PR #410 (Failed: 3, Passed: 145, Skipped: 314, Total: 462).Changed all three to
[SkippableFact], matching every other gated test in the same class (e.g.Phi35Mini_LoadsAndForwardsEndToEnd,TinyLlama_11B_LoadsAndForwardsEndToEnd), which already use the pattern correctly.Sweep for other latent instances
Per the issue and the related #393 (a different, probe-correctness defect — not addressed here), I audited
tests/DotLLM.Tests.Integration/andtests/DotLLM.Tests.Unit/for any other[Fact]/[Theory]method that throwsSkipException(directly, or viaSkip.If/Skip.IfNot) without theSkippableattribute.Method: a script walked every
.csfile undertests/, found each[Fact]/[Theory]-attributed method body (brace-matched), and flagged any body containing aSkip.If(,Skip.IfNot(, orSkipExceptionreference.Result: the only hit besides the three fixed above was a false positive —
SilentSkipConventionTests.DetectorFlagsTheAntiPatterncontains the literal strings"Skip.If(...)"inside its own test-fixture string arrays (data used to verify a different convention scanner, not an actualSkip.Ifcall). No other[Fact]/[Theory]test in the suite throwsSkipExceptionwithout theSkippableattribute.Verification
The fix is trivial to write but only provable in the absent-fixture case (locally having the checkpoints would make the tests pass rather than exercise the skip path). Ran with
DOTLLM_MISTRAL_7B_CHECKPOINT_PATH/DOTLLM_MIXTRAL_8X7B_CHECKPOINT_PATH/DOTLLM_QWEN15_MOE_A27B_CHECKPOINT_PATHunset and the conventionalC:/temp/...paths absent:Before (documented in the issue, PR #410):
Failed: 3, Passed: 145, Skipped: 314, Total: 462(repo-wide run).After (this class, absent fixtures):
Exit code
0. The three target methods report[SKIP]with the expected "checkpoint not found" messages, not[FAIL].What was verified: the absent-fixture negative control for the three named methods (and the rest of the class), full
Releasebuild ofDotLLM.Tests.Integrationwith 0 errors, and the sweep methodology/result above.What was not verified: a full repo-wide
dotnet testrun (not required to demonstrate the fix, and would take a long time in this environment) — the filtered run above isolates exactly the failure mode from the issue. CPU-only; no GPU/remote work performed.Test plan
DotLLM.Tests.IntegrationinRelease, 0 errorsRealHfSafetensorsEndToEndTestswith all three checkpoint env vars unset and conventional paths absent: 17/17 Skipped, 0 Failed, exit 0🤖 Generated with Claude Code