commit 50aedbcc2a26db8502f697b131aac20e9af2ff3d
parent 6b980b4899948a1635e29ef6df616103b12ce638
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sun, 22 Nov 2026 04:54:17 -0500
record-live: the live-edge insurance starts beside a from-start part found far behind (DESIGN-5 point 5, the orchestrator's go)
- A from-start main part (a fresh part, a first attempt) whose first
`frag N/M` shows it more than 10 min behind the live edge (the stream's
age x (1 - N/M)) starts the live-edge insurance beside it, or re-arms
it, whatever the keep mark, unless the request said insurance: false.
- It is no longer re-armed on every restart, resume or self-exit (the
reuse makes those catch-ups seconds).
- The insurance's starts are bounded 3 an hour (the hour is waited out)
and 24 a run, instead of 3 a run.
- One setting, liveRecording.insuranceWhenBehind (default true; SETTINGS.md
regenerated), switches it off without a code change. The go is in the
LOG so the operator can overturn it.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
9 files changed, 197 insertions(+), 21 deletions(-)
diff --git a/OPERATING.md b/OPERATING.md
@@ -1538,6 +1538,14 @@ pnpm ops keep-videos --json '{"slug":"example-rumble","ids":["v1abcde"],"note":
refusal) is `landedWhileLive` (when, why, how much of the stream by the clock is in no landed file), needs a person
until acknowledged, supersedes nothing, and every line says "so far"; nothing reusable (stream files, state,
fragments) is removed until the stream is confirmed done.
+- **A from-start part far behind gets a live-edge recorder beside it (DESIGN-5 point 5, the orchestrator's go —
+ `liveRecording.insuranceWhenBehind`, default on).** When a fresh part or a first attempt shows itself, by its first
+ `frag N/M`, more than 10 minutes behind the live edge (the stream's age × (1 − N/M)), the insurance starts beside it
+ whatever the keep mark (not when the request said `insurance: false`), so the tail is held while it catches up — a
+ stream can go private within minutes, and a download in progress does not survive it. It is not re-armed on every
+ self-exit or resume (the reuse makes those seconds); its starts are bounded 3 an hour (the hour waited out) and 24 a
+ run. The live-edge part is never proven: it goes only on an ended stream's duration, is joined only by the
+ proven-overlap join, and after a private switch both parts stay and the row is loud.
- **The landed file is verified before anything is removed (DESIGN-4).** After the landing and the transcription
hand-off the landed file is checked against the stream files it was merged from (packets per track equal, spans
within max(0.5 s, 2 frames), the picture's and the sound's spans within max(2 s, 2 fragments) of each other, no step
diff --git a/SETTINGS.md b/SETTINGS.md
@@ -270,13 +270,15 @@ How a running live recording is judged and kept alive (record-live; `pnpm ops ge
|---|---|---|
| `stallMinutes` | `10` | Minutes a running live recording's files may go without growing before `pnpm ops get live-recordings` (and /review, the banners) mark it `stalled` — and before record-live's own watchdog stops that recorder and, while the stream is still live, starts a new part from the live edge (at most 6 restarts an hour, 24 a run). Clamped 1–240; default 10. |
| `autoRestartOnBoot` | `true` | After an editor restart, a live recording the shutdown (or a crash) interrupted is restarted by itself: the new run reads the stream's state first (one paced metadata request) and records only if it is still live; ended, it lands what is in staging; unreadable, it starts nothing. At most once per interrupted run and 3 times an hour per stream; never after a person's Cancel (common/controller/liveRecordingBoot.ts). Default true; false leaves every interruption to /review's Record again. |
+| `insuranceWhenBehind` | `true` | When a from-start part (a fresh part after a stop, or a first attempt) shows itself, by its first `frag N/M`, more than 10 minutes behind the live edge, a live-edge recorder starts beside it — the insurance — whatever the keep mark (unless the request said `insurance: false`), so the stream's tail is held while the catch-up runs (a stream can go private within minutes, and a download in progress does not survive it). Not re-armed on every self-exit: the reuse of kept fragments makes those catch-ups seconds. Its starts are bounded 3 an hour, 24 a run. Default true (the orchestrator's go, DESIGN-5 point 5: the whole stream must be captured); false leaves the insurance to the keep mark and the request. |
Default:
```json
{
"stallMinutes": 10,
- "autoRestartOnBoot": true
+ "autoRestartOnBoot": true,
+ "insuranceWhenBehind": true
}
```
diff --git a/common/controller/liveRecordings.ts b/common/controller/liveRecordings.ts
@@ -114,6 +114,15 @@ export function liveRecordingCheckCommand(slug: string, id: string): string {
}
// settings.liveRecording.stallMinutes (record-live's watchdog reads it too).
+// settings.liveRecording.insuranceWhenBehind (default true).
+export function liveInsuranceWhenBehind(): boolean {
+ try {
+ return getSettings().liveRecording?.insuranceWhenBehind !== false;
+ } catch {
+ return true;
+ }
+}
+
export function liveStallMinutes(): number {
try {
const v = getSettings().liveRecording?.stallMinutes;
diff --git a/common/controller/recordLive.test.ts b/common/controller/recordLive.test.ts
@@ -1649,7 +1649,9 @@ test("slice 4: a stream marked keep gets the insurance by default; it stops once
assert.equal(f.state.stoppedBy(), "signal", "stopped after the catch-up");
assert.ok(waits.includes(60_000), "a pause after the from-start part's first bytes");
const row = (await rowOf(id))[0]!;
- assert.deepEqual(row.insurance, { mode: "catch-up", by: "default", state: "caught-up", starts: 1 });
+ const { startTimes, ...ins } = row.insurance ?? ({} as NonNullable<typeof row.insurance>);
+ assert.deepEqual(ins, { mode: "catch-up", by: "default", state: "caught-up", starts: 1 });
+ assert.equal(startTimes?.length, 1, "each start's time (the hourly bound)");
assert.equal(s.landed?.seconds, 7200);
assert.equal(row.coverage?.covers, true);
assert.ok(row.removedParts?.some((r) => /ytdlp-insure$/.test(r.stem)), "removed only because the landed file holds the whole stream");
@@ -3572,13 +3574,14 @@ test("B3 / DESIGN-5 7: a part an earlier run left waiting is never left as the o
let live = true;
const again = await incidentRun(
id,
- resumableYtdlp(async ({ resumedFrom, write }) => {
- assert.equal(resumedFrom, 51, "from what the earlier run downloaded");
+ resumableYtdlp(async ({ n, resumedFrom, write, args }) => {
+ if (n === 1) assert.equal(resumedFrom, 51, "from what the earlier run downloaded");
await write(7200);
live = false;
return "end";
}),
- { deps: { ...FAST_WATCH, join: null, merge: fakeMerge }, refresh: { stillLive: () => live } },
+ // (No stall watch under a loaded machine: the reuse is what is tested.)
+ { deps: { ...FAST_WATCH, stallMs: 60_000, join: null, merge: fakeMerge }, refresh: { stillLive: () => live } },
);
assert.equal((await again.run).status, "landed");
assert.equal(outOf(again.calls[0]!), stem, "the same files");
@@ -4000,7 +4003,7 @@ test("DESIGN-4 2: a from-start part with nothing to resume or reuse (no state, a
live = false;
return "end";
}),
- { deps: { ...FAST_WATCH, join: null, merge: fakeMerge }, refresh: { stillLive: () => live } },
+ { deps: { ...FAST_WATCH, stallMs: 60_000, join: null, merge: fakeMerge }, refresh: { stillLive: () => live } },
);
assert.equal((await run).status, "landed");
assert.equal(calls.length, 2);
@@ -4760,3 +4763,79 @@ test("REVIEW-6 13: one stream finished (its state gone), the other with its stat
assert.equal((await run).status, "landed");
assert.equal(outOf(calls[1]!), outOf(calls[0]!), "the same files");
});
+
+// --- DESIGN-5 point 5 (the orchestrator's go): the insurance when a from-start part is far behind ---------
+
+const FRAG_LINE = (n: number, m: number) => `1: [download] 0.1% of ~ 9.00GiB at 5.00MiB/s ETA 02:00:00 (frag ${n}/${m})`;
+async function behindRun(id: string, frag: [number, number], o: { insurance?: boolean; insuranceWhenBehind?: boolean } = {}) {
+ let live = true;
+ const r = await incidentRun(
+ id,
+ resumableYtdlp(async ({ write, print, args, signal }) => {
+ if (isInsurance(args)) {
+ await write(60);
+ await Promise.race([abortOf(signal), new Promise((res) => setTimeout(res, 2000))]);
+ return { exitCode: null, stderrTail: "", signalled: true };
+ }
+ print(FRAG_LINE(frag[0], frag[1]));
+ await write(3000);
+ await new Promise((res) => setTimeout(res, 300));
+ await write(7200);
+ live = false;
+ return "end";
+ }),
+ {
+ // Not keep-marked, no insurance asked: only the behind check can start one.
+ request: { doNotClean: false, insurance: o.insurance },
+ deps: { ...FAST_WATCH, stallMs: 60_000, join: null, merge: fakeMerge, insurancePollMs: 5, ...(o.insuranceWhenBehind !== undefined ? { insuranceWhenBehind: o.insuranceWhenBehind } : {}) },
+ refresh: { stillLive: () => live },
+ },
+ );
+ await r.run.catch(() => {});
+ return r;
+}
+
+test("point 5: a from-start part whose first frag N/M shows it hours behind starts the live-edge insurance beside it, whatever the keep mark", { timeout: 60_000 }, async () => {
+ const id = "exmplp5beh1";
+ const r = await behindRun(id, [10, 7200]);
+ assert.ok(r.calls.some(isInsurance), "a live-edge recorder beside it");
+ const row = (await rowOf(id))[0]!;
+ assert.equal(row.insurance?.by, "behind");
+ assert.ok(r.log.some((l) => /behind the live edge: a live-edge recorder \(the insurance\) starts beside it/.test(l)));
+});
+
+test("point 5: a part that is NOT far behind (under 10 min) starts no insurance; the setting off or `insurance: false` starts none either", { timeout: 60_000 }, async () => {
+ const near = await behindRun("exmplp5beh2", [7190, 7200]);
+ assert.ok(!near.calls.some(isInsurance), "a minute behind: none");
+ const off = await behindRun("exmplp5beh3", [10, 7200], { insuranceWhenBehind: false });
+ assert.ok(!off.calls.some(isInsurance), "the setting off: none");
+ assert.ok(off.log.some((l) => /insuranceWhenBehind is off/.test(l)));
+ const no = await behindRun("exmplp5beh4", [10, 7200], { insurance: false });
+ assert.ok(!no.calls.some(isInsurance), "asked not to: none");
+});
+
+test("point 5: the insurance's starts are bounded per HOUR (3), not per run — a fourth start waits the hour out", { timeout: 60_000 }, async () => {
+ const id = "exmplp5hr01";
+ let live = true;
+ let insurers = 0;
+ const { run, waits } = await incidentRun(
+ id,
+ resumableYtdlp(async ({ write, args }) => {
+ if (isInsurance(args)) {
+ insurers++;
+ await write(30);
+ // It dies early, again and again (an ingest that keeps dropping).
+ return { exitCode: 1, stderrTail: "ERROR: Connection reset by peer\n", signalled: false };
+ }
+ await write(3000);
+ await until(() => insurers >= 4, 4000);
+ await write(7200);
+ live = false;
+ return "end";
+ }),
+ { request: { insurance: true }, deps: { ...FAST_WATCH, stallMs: 60_000, join: null, merge: fakeMerge, insurancePollMs: 5 }, refresh: { stillLive: () => live } },
+ );
+ await run.catch(() => {});
+ assert.ok(insurers >= 4, `started past 3 in the run: ${insurers}`);
+ assert.ok(waits.some((w) => w > 60_000 && w <= 3_600_000), "the fourth waited for the hour");
+});
diff --git a/common/controller/recordLive.ts b/common/controller/recordLive.ts
@@ -73,6 +73,9 @@ import {
LIVE_INSURANCE_END_GRACE_MS,
LIVE_INSURANCE_MARGIN_MS,
LIVE_INSURANCE_MAX_STARTS,
+ LIVE_INSURANCE_MAX_STARTS_PER_HOUR,
+ LIVE_INSURANCE_BEHIND_SECONDS,
+ parseFragProgress,
catchUpTracker,
insuranceDecision,
restartWaitMs,
@@ -119,7 +122,7 @@ import { verifyMerged, verifyScan } from "../lib/liveVerify-server";
import { liveJoinsSidecar, liveRecordingSidecar } from "../lib/mediaImport-server";
import { ffmpegJoinDeps, joinLiveParts, type JoinDeps } from "./liveJoin";
import { loadLiveRecordingRows, patchLiveRecordingRow, rowOfRecord, upsertLiveRecordingRow } from "../lib/liveRecordings-server";
-import { liveRecordingCheckCommand, liveStallMinutes } from "./liveRecordings";
+import { liveInsuranceWhenBehind, liveRecordingCheckCommand, liveStallMinutes } from "./liveRecordings";
import { markLiveBootRestart } from "./liveRecordingBoot";
import { isDoNotClean, setDoNotClean } from "../lib/doNotClean-server";
import type { Paths } from "../lib/paths";
@@ -834,6 +837,8 @@ export type RecordLiveDeps = {
// (default 5 s), its margin after catch-up and its grace after the end
// (defaults LIVE_INSURANCE_MARGIN_MS, LIVE_INSURANCE_END_GRACE_MS).
insurancePollMs?: number;
+ // settings.liveRecording.insuranceWhenBehind, for a test.
+ insuranceWhenBehind?: boolean;
// DESIGN-4 2: false — never a fresh from-start part (tests of the
// live-edge path, as where from-start cannot reach the start).
freshFromStart?: boolean;
@@ -2154,7 +2159,7 @@ async function recordLiveRunInner(
req.doNotClean === true ||
(await isDoNotClean(videoDir).catch(() => false)) ||
(await loadPendingKeep(paths, req.slug).catch(() => [])).some((e) => e.id === id);
- const decided = fromStart && liveStatus !== "is_upcoming" ? insuranceDecision({ asked: req.insurance, keepMarked }) : null;
+ let decided = fromStart && liveStatus !== "is_upcoming" ? insuranceDecision({ asked: req.insurance, keepMarked }) : null;
if (!decided && req.insurance) say("No insurance recorder: it runs only beside a from-start recording of a stream already live.");
// The insurance's stop: replaced when a from-start restart re-arms it.
let insureStop = new AbortController();
@@ -2200,9 +2205,42 @@ async function recordLiveRunInner(
insuranceStopFor = "fallback";
insureStop.abort();
}
- if (restart && mode !== "now") rearmInsurance();
+ // (No re-arm on every restart or resume: DESIGN-5 point 5 — the
+ // behind check below starts or re-arms it when a part is far behind.)
+ void restart;
+ };
+ // DESIGN-5 POINT 5 (the orchestrator's go, settings.liveRecording.
+ // insuranceWhenBehind): a from-start main part's FIRST `frag N/M` shows
+ // how far behind the live edge it is — the stream's age × (1 − N/M).
+ // More than 10 min: the live-edge insurance starts beside it (or is
+ // re-armed), whatever the keep mark, so the tail is held while it
+ // catches up. Once per part.
+ const behindChecked = new Set<string>();
+ const behindCheck = (l: string) => {
+ if (!mainFromStart || !mainStem || behindChecked.has(mainStem)) return;
+ const fp = parseFragProgress(l);
+ if (!fp || fp.total <= 0) return;
+ behindChecked.add(mainStem);
+ const startMs = record.streamStartedAt ? Date.parse(record.streamStartedAt) : NaN;
+ if (!Number.isFinite(startMs)) return;
+ const behind = ((now().getTime() - startMs) / 1000) * (1 - fp.frag / fp.total);
+ if (behind <= LIVE_INSURANCE_BEHIND_SECONDS) return;
+ if (req.insurance === false) return;
+ if (!(deps.insuranceWhenBehind ?? liveInsuranceWhenBehind())) {
+ say(`${mainStem} is about ${spanWords(behind)} behind the live edge; no live-edge recorder beside it (settings.liveRecording.insuranceWhenBehind is off).`);
+ return;
+ }
+ if (!insurance) {
+ decided = { mode: "catch-up", by: "behind" };
+ say(`${mainStem} is about ${spanWords(behind)} behind the live edge: a live-edge recorder (the insurance) starts beside it, so the tail is held while it catches up.`);
+ insurance = insureLoop();
+ } else {
+ say(`${mainStem} is about ${spanWords(behind)} behind the live edge: the insurance is re-armed beside it.`);
+ rearmInsurance();
+ }
};
const onMainLine = (l: string) => {
+ behindCheck(l);
if (mainFromStart && mainTracker.feed(l)) caughtUpStem = mainStem;
if (record.insurance?.mode !== "catch-up" || caughtUpTimer || insureStop.signal.aborted || !mainFromStart) return;
if (!tracker.feed(l)) return;
@@ -2266,18 +2304,31 @@ async function recordLiveRunInner(
if (signal.aborted || mainDoneCtl.signal.aborted) return notStarted("the from-start recording ended before it began");
if (stopNow.signal.aborted) continue;
if ((ins.starts ?? 0) >= LIVE_INSURANCE_MAX_STARTS) {
- ins.reason = `not started again: at most ${LIVE_INSURANCE_MAX_STARTS} starts`;
+ ins.reason = `not started again: at most ${LIVE_INSURANCE_MAX_STARTS} starts a run`;
await save();
return;
}
+ // At most LIVE_INSURANCE_MAX_STARTS_PER_HOUR an hour: the hour is
+ // waited out, not an end.
+ {
+ const t = now().getTime();
+ const recent = (ins.startTimes ?? []).map((x) => Date.parse(x)).filter((x) => t - x < 3_600_000).sort((a, b) => a - b);
+ if (recent.length >= LIVE_INSURANCE_MAX_STARTS_PER_HOUR) {
+ const ms = Math.max(1_000, recent[0]! + 3_600_000 - t);
+ say(`The insurance recorder has started ${recent.length} times in the last hour: the next start waits ${spanWords(ms / 1000)}.`);
+ await waitFor(ms, waitStop);
+ if (signal.aborted || mainDoneCtl.signal.aborted) return notStarted("the from-start recording ended before it began");
+ }
+ }
if (!(await roomFor("the insurance recorder"))) return notStarted("the store's disk is under the free-space floor");
ins.starts = (ins.starts ?? 0) + 1;
+ (ins.startTimes ??= []).push(now().toISOString());
ins.state = "recording";
delete ins.reason;
say(
`The insurance recorder records the live edge beside the from-start recording` +
- `${ins.mode === "whole" ? " for the whole stream" : " until it catches up"} (${ins.by === "default" ? "the stream is marked keep" : "asked"})` +
- `${ins.starts > 1 ? `, start ${ins.starts} of at most ${LIVE_INSURANCE_MAX_STARTS}` : ""}.`,
+ `${ins.mode === "whole" ? " for the whole stream" : " until it catches up"} (${ins.by === "default" ? "the stream is marked keep" : ins.by === "behind" ? "the from-start part is far behind" : "asked"})` +
+ `${ins.starts > 1 ? `, start ${ins.starts} (at most ${LIVE_INSURANCE_MAX_STARTS_PER_HOUR} an hour)` : ""}.`,
);
const tag = ins.starts === 1 ? "ytdlp-insure" : `ytdlp-insure-r${ins.starts}`;
const o = await ytdlpPart(plan.url, tag, "now", "insurance; ", { insurance: true, noWait: true, stop: stopNow.signal });
@@ -2323,7 +2374,7 @@ async function recordLiveRunInner(
return;
}
};
- const insurance: Promise<void> | null = decided ? insureLoop() : null;
+ let insurance: Promise<void> | null = decided ? insureLoop() : null;
let index0 = false;
let fromStartFailures = 0;
let edgeFailures = 0;
@@ -2774,7 +2825,9 @@ async function recordLiveRunInner(
// DESIGN-4 5: a from-start recorder that ended by itself (yt-dlp's
// own end after ~35 s with no fragment: an ingest pause) — the live
// edge is held at once (the insurance re-armed) before the read.
- if (cur.mode === "from-start") rearmInsurance();
+ // (No re-arm here — REVIEW-6 / DESIGN-5 point 5: the same files
+ // continue, reused, in seconds; a part found far behind starts the
+ // insurance by its first frag N/M.)
say(`${cur.o.part.stem}: its recorder exited while the stream reads live; read again in ${spanWords(LIVE_RESTART_CONFIRM_MS / 1000)} before restarting.`);
await waitFor(stretch(LIVE_RESTART_CONFIRM_MS), signal);
if (signal.aborted) break;
diff --git a/common/lib/liveCapture.ts b/common/lib/liveCapture.ts
@@ -738,9 +738,14 @@ export const LIVE_INSURANCE_DELAY_MS = 60_000;
export const LIVE_INSURANCE_MARGIN_MS = 5 * 60_000;
// After the main recording ends with the stream read as ended.
export const LIVE_INSURANCE_END_GRACE_MS = 2 * 60_000;
-// Starts of the insurance recorder in one run: the first, after it died
-// early, after a from-start restart put the main behind again.
-export const LIVE_INSURANCE_MAX_STARTS = 3;
+// Starts of the insurance recorder: the first, after it died early, after a
+// from-start part showed itself far behind again. Bounded PER HOUR (DESIGN-5
+// point 5: ingest pauses must not spend them), and per run.
+export const LIVE_INSURANCE_MAX_STARTS_PER_HOUR = 3;
+export const LIVE_INSURANCE_MAX_STARTS = 24;
+// How far behind the live edge a from-start part must show itself (its first
+// `frag N/M`: the stream's age × (1 − N/M)) for the insurance to start.
+export const LIVE_INSURANCE_BEHIND_SECONDS = 10 * 60;
// waiting for the from-start part's first bytes (and the pause)
// recording it records
@@ -759,8 +764,11 @@ export type LiveInsuranceState = "waiting" | "recording" | "caught-up" | "ended"
export type LiveInsurance = {
mode: "catch-up" | "whole";
- // On by the keep-mark default, or asked by the request.
- by: "default" | "asked";
+ // On by the keep-mark default, asked by the request, or started because a
+ // from-start part showed itself far behind (insuranceWhenBehind).
+ by: "default" | "asked" | "behind";
+ // When each start was made (the hourly bound).
+ startTimes?: string[];
state: LiveInsuranceState;
reason?: string;
// How many times it was started.
diff --git a/common/lib/settingsSchema.ts b/common/lib/settingsSchema.ts
@@ -1017,6 +1017,7 @@ export function sanitizeLivePreclip(v: unknown): LivePreclipSettingsBlock {
export type LiveRecordingSettingsBlock = {
stallMinutes: number;
autoRestartOnBoot: boolean;
+ insuranceWhenBehind: boolean;
};
export const LIVE_RECORDING_SETTINGS_FIELD_DOCS: FieldDocs<LiveRecordingSettingsBlock> = {
@@ -1030,11 +1031,19 @@ export const LIVE_RECORDING_SETTINGS_FIELD_DOCS: FieldDocs<LiveRecordingSettings
"is in staging; unreadable, it starts nothing. At most once per interrupted run and 3 times an hour per stream; never " +
"after a person's Cancel (common/controller/liveRecordingBoot.ts). Default true; false leaves every interruption to " +
"/review's Record again.",
+ insuranceWhenBehind:
+ "When a from-start part (a fresh part after a stop, or a first attempt) shows itself, by its first `frag N/M`, more " +
+ "than 10 minutes behind the live edge, a live-edge recorder starts beside it — the insurance — whatever the keep mark " +
+ "(unless the request said `insurance: false`), so the stream's tail is held while the catch-up runs (a stream can go " +
+ "private within minutes, and a download in progress does not survive it). Not re-armed on every self-exit: the reuse " +
+ "of kept fragments makes those catch-ups seconds. Its starts are bounded 3 an hour, 24 a run. Default true (the " +
+ "orchestrator's go, DESIGN-5 point 5: the whole stream must be captured); false leaves the insurance to the keep mark " +
+ "and the request.",
};
export function sanitizeLiveRecording(v: unknown): LiveRecordingSettingsBlock {
const r = (v && typeof v === "object" ? v : {}) as Record<string, unknown>;
- return { stallMinutes: clampInt(r.stallMinutes, 1, 240, 10), autoRestartOnBoot: r.autoRestartOnBoot !== false };
+ return { stallMinutes: clampInt(r.stallMinutes, 1, 240, 10), autoRestartOnBoot: r.autoRestartOnBoot !== false, insuranceWhenBehind: r.insuranceWhenBehind !== false };
}
export const SLEEP_BETWEEN_DOWNLOADS_MAX_SECONDS = 600;
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -42,6 +42,13 @@
every fragment is kept until the stream is confirmed done.
- A landing while the stream still reads live is `landedWhileLive`: loud, "so far", the unrecorded time by the
clock, superseding nothing.
+ - yt-dlp's fatal fragment line (`ERROR: \r[download] Got error …`) is read whole and stops the recorder; the fragments
+ past a resume's state are removed first; a short or torn track, or a stream file that is not its fragments, is
+ never "verified".
+ - A stream that ends while its from-start part is behind is resumed once to the end; a landing short of an ended
+ stream's duration says "download the VOD now"; a network drop no longer spends the resume or ends the recording.
+ - A from-start part found more than 10 minutes behind starts the live-edge insurance beside it
+ (`liveRecording.insuranceWhenBehind`, default on); the insurance's starts are bounded per hour.
- **A live recording's landing never deletes around, or replaces, a recording already in the store that it is not
proven to hold.**
- When the landing keeps the container already stored, nothing is removed: the part and every part meant for
diff --git a/settings.json.example b/settings.json.example
@@ -18,7 +18,8 @@
},
"liveRecording": {
"stallMinutes": 10,
- "autoRestartOnBoot": true
+ "autoRestartOnBoot": true,
+ "insuranceWhenBehind": true
},
"pacing": {
"sleepRequestsCapSeconds": 16,