chore(k1): checkpoint connection recovery work
This commit is contained in:
@@ -9,6 +9,7 @@ let claimExclusiveLiveViewer;
|
||||
let createRecordedOpenWatchdog;
|
||||
let createReentrantViewerDisposer;
|
||||
let isLiveRerunPresentationReady;
|
||||
let liveTimelineNeedsSynchronization;
|
||||
let liveRerunReceiverBindingIdentity;
|
||||
let recordedOpenWatchdogTimeoutMs;
|
||||
let rerunViewerInitialSource;
|
||||
@@ -26,6 +27,7 @@ before(async () => {
|
||||
createRecordedOpenWatchdog,
|
||||
createReentrantViewerDisposer,
|
||||
isLiveRerunPresentationReady,
|
||||
liveTimelineNeedsSynchronization,
|
||||
liveRerunReceiverBindingIdentity,
|
||||
recordedOpenWatchdogTimeoutMs,
|
||||
rerunViewerInitialSource,
|
||||
@@ -82,6 +84,14 @@ test("live presentation waits for the exact receiver to expose a usable range",
|
||||
assert.equal(isLiveRerunPresentationReady(true, { min: 1, max: 1 }, 1), true);
|
||||
});
|
||||
|
||||
test("live timeline is retried only after stream_time exists and until it is active", () => {
|
||||
assert.equal(liveTimelineNeedsSynchronization(false, undefined, { min: 1, max: 2 }), false);
|
||||
assert.equal(liveTimelineNeedsSynchronization(true, undefined, null), false);
|
||||
assert.equal(liveTimelineNeedsSynchronization(true, undefined, { min: 1, max: 2 }), true);
|
||||
assert.equal(liveTimelineNeedsSynchronization(true, "log_time", { min: 1, max: 2 }), true);
|
||||
assert.equal(liveTimelineNeedsSynchronization(true, "stream_time", { min: 1, max: 2 }), false);
|
||||
});
|
||||
|
||||
test("live receiver binding stays stable across recovery authority projections", () => {
|
||||
const sourceUrl = "rerun+http://127.0.0.1:9877/proxy";
|
||||
const streamId = "acq-001";
|
||||
@@ -217,7 +227,11 @@ test("recorded RRD bytes are never split across LogChannel.send_rrd calls", asyn
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/const readyToRender = followLive\s*\? isLiveRerunPresentationReady\(/,
|
||||
/const readyToRender = followLive\s*\? liveTimelineSynchronized && isLiveRerunPresentationReady\(/,
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/viewer\.get_active_timeline\(event\.recording_id\)[\s\S]*viewer\.set_active_timeline\(event\.recording_id, timeline\)/,
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
@@ -257,7 +271,16 @@ test("raw replay exercises the same streaming receiver lifecycle as a live scan"
|
||||
new URL("../src/workspaces/Workspaces.tsx", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
assert.match(source, /followLive=\{!recordedReplay && streamActive\}/);
|
||||
assert.match(
|
||||
source,
|
||||
/const liveRerunSource = !recordedSource && \/\^rerun\\\+https\?:\\\/\\\//,
|
||||
);
|
||||
assert.match(
|
||||
source,
|
||||
/const livePresentationActivitySequence = metrics\?\.publishedFrameCount \?\?[\s\S]*liveRerunSource && !streamActive \? 1 : null/,
|
||||
);
|
||||
assert.match(source, /followLive=\{liveRerunSource\}/);
|
||||
assert.match(source, /liveActivitySequence=\{livePresentationActivitySequence\}/);
|
||||
assert.match(
|
||||
source,
|
||||
/sourceUrl\.trim\(\) && pointCloudVisible && !intentionalSourceEnd/,
|
||||
|
||||
Reference in New Issue
Block a user