test: TestMaskTextScalesLinearlyOnAPayloadFullOfSecrets flaky on Windows (wall-clock ratio)
TestMaskTextScalesLinearlyOnAPayloadFullOfSecrets (internal/security/mask_test.go) failed on the Windows Build Binaries leg of PR #1995 (a Dockerfile-only change):
masking a payload 4x the size took 89.9199ms vs 6.102ms for the baseline — looks like a complexity regression, not scheduler noise
Run: https://github.com/smart-mcp-proxy/mcpproxy-go/actions/runs/45041736702/job/137277094590
Cause
MaskText is linear (local best-of-5: 4KB 0.98ms, 16KB 3.7ms, 64KB 12.1ms, 256KB 48ms, 1MB 195ms, about 4x per 4x). The test compared one ~6ms baseline timing with one 4x-payload timing, so a single scheduler or GC stall on a slow runner produced a 15x ratio. It is a measurement flake, not a regression.
Fix
Time each size best-of-N after a warm-up and use an 8x size step with a 3x-of-linear ceiling, so noise cannot trip it but a quadratic regression still does.