instrument: fix AHD node-tracking/tie-break/live-latch defects and close staged-envelope-curve test gaps

This commit is contained in:
2026-07-31 09:52:17 -04:00
parent d60ab1524a
commit 2fa1405b06
27 changed files with 360 additions and 86 deletions
+6 -1
View File
@@ -132,13 +132,18 @@ static void testOverlayAccentSeparatesFromTheWaveformAccent() {
const KitColor overlay = roleColor(Role::AccentTertiary);
const KitColor prior = roleColor(Role::AccentSecondary);
CHECK(contrastRatio(overlay, wave) > contrastRatio(prior, wave));
// Pin the MEASURED value, not just the relational improvement: today's pair sits at
// ~1.37:1 — BELOW the 3:1 indicator floor every other assertion in this file uses. That
// is a known, held deviation (Daniel's palette call, tracked separately) rather than a
// silently accepted one; a regression toward the old ~1.12:1 secondary pairing must fail.
CHECK(contrastRatio(overlay, wave) >= 1.35);
// Hue divergence against the waveform: the waveform's green dominates its red, the
// overlay's red dominates its green — opposite balances, not two shades of one.
CHECK(wave.g > wave.r);
CHECK(overlay.r > overlay.g);
const int delta = std::abs(int(wave.r) - int(overlay.r)) +
std::abs(int(wave.g) - int(overlay.g)) +
std::abs(int(wave.b) - int(overlay.b)) ;
std::abs(int(wave.b) - int(overlay.b));
CHECK(delta >= 60);
}