feat(agent): align FrameAnalyzerService with spec §16 — IntraOpNumThreads, MinConfidence, model path (#169)
This commit is contained in:
1 parent
e0290c8a1b
commit
4b3068e12f
3 files changed
+74
-15
No files matched your search
@@ -190,4 +190,38 @@ public class FrameAnalyzerServiceTests
|
||||
result.Length.ShouldBe(1);
|
||||
result[0].Label.ShouldBe("class_999");
|
||||
}
|
||||
|
||||
// ── Spec compliance tests ─────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
public void DefaultMinConfidence_MatchesSpec()
|
||||
{
|
||||
// Spec §16: CameraDetectionProfile.MinConfidence defaults to 0.4
|
||||
FrameAnalyzerService.DefaultMinConfidence.ShouldBe(0.4f);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AnalyzeFrameAsync_WithCustomMinConfidence_Passthrough_ReturnsNull()
|
||||
{
|
||||
using var service = new FrameAnalyzerService(Substitute.For<ILogger<FrameAnalyzerService>>());
|
||||
var result = await service.AnalyzeFrameAsync([1, 2, 3], minConfidence: 0.6f);
|
||||
result.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AnalyzeFrame_WithCustomMinConfidence_Passthrough_ReturnsNull()
|
||||
{
|
||||
using var service = new FrameAnalyzerService(Substitute.For<ILogger<FrameAnalyzerService>>());
|
||||
var result = service.AnalyzeFrame([1, 2, 3], minConfidence: 0.6f);
|
||||
result.ShouldBeNull();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AnalyzeFrameAsync_DefaultMinConfidence_Passthrough_ReturnsNull()
|
||||
{
|
||||
using var service = new FrameAnalyzerService(Substitute.For<ILogger<FrameAnalyzerService>>());
|
||||
// Default 0.4 threshold should work identically in passthrough
|
||||
var result = await service.AnalyzeFrameAsync([1, 2, 3]);
|
||||
result.ShouldBeNull();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user