mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 14:53:49 +00:00
Add a quality gate for tests, Clippy, and the model sources
This commit is contained in:
10 files changed
+484
-7
No files matched your search
@@ -125,6 +125,21 @@ public sealed class ModelFamilyTests
|
||||
Assert.That(refused?.Message, Does.Contain("more than once"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ARankNobodyAccountedForIsRefused()
|
||||
{
|
||||
//
|
||||
// The rank is the way past everything the specificity computes, and the sentence next to it
|
||||
// is the only thing keeping it accountable. The compiler asks for that sentence; this is
|
||||
// what keeps an empty one from passing for it, because a number without an explanation
|
||||
// reads as noise to whoever comes next -- and noise is what the computation replaced.
|
||||
//
|
||||
var family = new FamilyRankingWithoutSayingWhy();
|
||||
var refused = Assert.Throws<ArgumentException>(() => _ = family.Rules);
|
||||
|
||||
Assert.That(refused?.Message, Does.Contain("specificity gets wrong"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AFamilyWhichAdjustsRatherThanChoosesStatesAModifier()
|
||||
{
|
||||
@@ -250,6 +265,15 @@ public sealed class ModelFamilyTests
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class FamilyRankingWithoutSayingWhy : ModelFamily
|
||||
{
|
||||
public override ModelVendor Vendor => ModelVendor.UNKNOWN;
|
||||
|
||||
public override ModelSource Source => new("https://example.invalid/rank", new DateOnly(2026, 9, 13), "A family moving one of its rules by hand without saying what it moves it past.");
|
||||
|
||||
protected override void Declare(ModelFamilyBuilder builder) => builder.Rule("thing").Rank(1, " ").Capabilities(Capability.TEXT_INPUT);
|
||||
}
|
||||
|
||||
private sealed class FamilyWithAModifier : ModelFamily
|
||||
{
|
||||
public override ModelVendor Vendor => ModelVendor.UNKNOWN;
|
||||
|
||||
Reference in new issue
Block a user