Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(verify): calibrate on the second FULL run, timing-dependent storm bounds

Richie McIlroy65085b7ee057
diff --git a/crates/verify/expectations.toml b/crates/verify/expectations.toml
index 9373f6601..29b07cd20 100644
--- a/crates/verify/expectations.toml
+++ b/crates/verify/expectations.toml
@@ -140,16 +140,16 @@ link = "https://github.com/CapSoftware/Cap/pull/2638"
case = "seek/seek-gop/storm30/avf"
class = "stale"
platforms = ["macos"]
-bound = { screen-frames = 20, camera-frames = 20, delta = 352, frame = [1, 900] }
-reason = "A reused AVAssetReader answers from a frame cached by an earlier, unrelated seek (seek 349 shows 237): 20 of 3000 full-tier seeks (1 in the fast tier), up to 352 source frames stale"
+bound = { screen-frames = 30, camera-frames = 30, delta = 450, frame = [1, 900] }
+reason = "A reused AVAssetReader answers from a frame cached by an earlier, unrelated seek (seek 349 shows 237): 20 of 3000 full-tier seeks (1 in the fast tier), up to 352 source frames stale. Which earlier seek's frame answers depends on timing, so the bound is the mechanism's: any frame of the fixture (450), at most 1% of the seeks"
link = "https://github.com/CapSoftware/Cap/pull/2638"
[[xfail]]
case = "seek/seek-native/storm30/avf"
class = "stale"
platforms = ["macos"]
-bound = { screen-frames = 28, camera-frames = 28, delta = 243, frame = [1, 900] }
-reason = "Same reader reuse as seek/seek-gop/storm30/avf on the native fixture: 28 of 3000 full-tier seeks (2 in the fast tier), up to 243 source frames stale"
+bound = { screen-frames = 40, camera-frames = 40, delta = 450, frame = [1, 900] }
+reason = "Same reader reuse as seek/seek-gop/storm30/avf on the native fixture: 7 to 28 of 3000 full-tier seeks (2 in the fast tier), up to 243 to 287 source frames stale between runs; bounded like seek/seek-gop/storm30/avf"
link = "https://github.com/CapSoftware/Cap/pull/2638"
[[xfail]]
@@ -198,15 +198,15 @@ link = "https://github.com/CapSoftware/Cap/pull/2638"
[[xfail]]
case = "seek/seek-gop/storm30/ffmpeg"
class = "stale"
-bound = { screen-frames = 71, camera-frames = 71, delta = 81, frame = [1, 900] }
-reason = "NEW: FFmpeg decoder seeks answer stale frames: the backward-seek lookback tolerance serves a cached frame 1 to 4 source frames old, and seeks near the start are answered by the first-frame shortcut with frame 0 (71 of 3000 full-tier seeks, 1 in the fast tier, up to 81 source frames stale)"
+bound = { screen-frames = 100, camera-frames = 100, delta = 100, frame = [1, 900] }
+reason = "NEW: FFmpeg decoder seeks answer stale frames: the backward-seek lookback tolerance serves a cached frame 1 to 4 source frames old, and seeks near the start are answered by the first-frame shortcut with frame 0 (71 of 3000 full-tier seeks, 1 in the fast tier, up to 81 source frames stale). The count depends on the decoder's wall-clock paths (it varies between runs on macOS: 65 to 78 on the native fixture), so the bound is the mechanism's: at most 100 seeks (3.3%), never more stale than the 100 frames the shortcut and the lookback can reach"
link = ""
[[xfail]]
case = "seek/seek-native/storm30/ffmpeg"
class = "stale"
-bound = { screen-frames = 65, camera-frames = 65, delta = 83, frame = [1, 900] }
-reason = "NEW: same FFmpeg lookback tolerance and first-frame shortcut as seek/seek-gop/storm30/ffmpeg on the native fixture: 62 to 65 of 3000 full-tier seeks (9 in the fast tier), up to 83 source frames stale"
+bound = { screen-frames = 100, camera-frames = 100, delta = 100, frame = [1, 900] }
+reason = "NEW: same FFmpeg lookback tolerance and first-frame shortcut as seek/seek-gop/storm30/ffmpeg on the native fixture: 62 to 78 of 3000 full-tier seeks (9 in the fast tier), up to 83 source frames stale; bounded like seek/seek-gop/storm30/ffmpeg"
link = ""
[[xfail]]
@@ -313,9 +313,8 @@ link = ""
[[xfail]]
case = "export/instant/output/mp4/native"
class = "sync-system"
-platforms = ["linux"]
bound = { count = 1, offset-ms = [5, 34] }
-reason = "NEW: the gate's per-pipeline zero (see export/instant-gated-*): on Linux, whose Instant audio anchors at the recording epoch and keeps the system markers, system audio is late by up to one video frame (8.5 ms measured)"
+reason = "NEW: the gate's per-pipeline zero (see export/instant-gated-*): system audio is late by up to one video frame (8.5 ms on Linux; 7.5 ms on macOS and Windows since #2635 keeps the system markers in the mix)"
link = ""
[[xfail]]
@@ -389,7 +388,7 @@ link = ""
[[xfail]]
case = "editing/export/multi-segment/seed-7"
class = "stale"
-bound = { screen-frames = 27, camera-frames = 14, delta = 29, frame = [129, 157] }
+bound = { screen-frames = 30, camera-frames = 14, delta = 29, frame = [129, 157] }
reason = "FFmpeg decoder (full tier): after the timeline played clip 0 from 1.68 s to its end and then transitions back into clip 0 at 0 s, the frames after the transition show source frame 0 instead of 20-29 (deterministic: 22 screen and 10 camera frames, output frames 135 to 157, with the dominant side of each blend checked). Same mechanism as the seek/*/storm*/ffmpeg entries: backward seeks near the start answer frame 0"
link = ""
diff --git a/crates/verify/tests/recording.rs b/crates/verify/tests/recording.rs
index 280a2d88d..187d29d11 100644
--- a/crates/verify/tests/recording.rs
+++ b/crates/verify/tests/recording.rs
@@ -1811,7 +1811,7 @@ fn sentinel_freezes_excuse_only_failures_localized_inside_them() {
assert!(machine_freezes(&log, reference, (2.0, 9.0)).is_empty());
let excuse = |problems: &[(&str, Option<Vec<f64>>)], freezes: &[(f64, f64)]| {
- let mut case = Case::new("recording/studio-camera/startup-drops");
+ let mut case = Case::new("recording/instant/screen-mic-system");
IMPLICATED.with(|m| m.borrow_mut().clear());
for (class, times) in problems {
case.problem(class, format!("{class} problem"));
@@ -1823,15 +1823,15 @@ fn sentinel_freezes_excuse_only_failures_localized_inside_them() {
frozen_failures(&case, 0, &implicated, freezes)
};
let lost = ("missing", Some(vec![9.8, 10.0, 10.4]));
- // Expected classes (camera-clock here) never need an excuse.
- let clock = ("camera-clock", None);
+ // Expected classes (sync-screen-mic here) never need an excuse.
+ let clock = ("sync-screen-mic", None);
assert!(excuse(&[lost.clone(), clock.clone()], &freezes).is_some());
// Without a freeze, or outside it, a loss stays a Cap failure.
assert!(excuse(&[lost.clone()], &[]).is_none());
assert!(excuse(&[("missing", Some(vec![10.0, 10.6]))], &freezes).is_none());
assert!(excuse(&[("missing", Some(vec![9.7]))], &freezes).is_none());
// A failure that is not localized (a sync median) is never excused.
- assert!(excuse(&[lost, ("sync", None)], &freezes).is_none());
+ assert!(excuse(&[lost, ("sync-screen-system", None)], &freezes).is_none());
// Only expected failures: nothing to excuse.
assert!(excuse(&[clock], &freezes).is_none());
}