commit 2738c12670bb0ba3d3bbee21b416f83640c63dd6
parent f9c62e5b1bc1b986ca5001b494a17886f301fb20
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Sat, 21 Nov 2026 16:36:37 -0500
verifyBeforeCleanMaxAgeHours: capped at 72 h, and the guarantee said plainly
The setting's description and OPERATING.md now state what changed: a
checked Clean audio removes audio when the video was listed or confirmed
within the window with nothing newer contradicting it, so a video removed
from its source inside the window, after its last sighting and before any
newer listing, can have its audio cleaned; 0 restores "always ask". The
cap drops from 168 to 72 hours. SETTINGS.md regenerated; CHANGELOG.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
5 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/OPERATING.md b/OPERATING.md
@@ -1153,16 +1153,30 @@ pnpm ops channel-config --json '{"slug":"example","cleanAudioWithoutChecking":tr
retries the next rate limit ends the job **failed**: "Gave up: rate-limited … It needs a person". A failure that is
not a rate limit (a network error, an extractor break) ends failed, "Could not verify availability …", and retries
nothing.
+- **What a checked Clean audio guarantees.** Before this change, a video's audio was removed only when a listing taken
+ in the same job named it, or a probe in the same job found it. Now the audio is removed when the video was listed
+ by its source, or confirmed by a per-video probe, within `verifyBeforeCleanMaxAgeHours` (24 hours by default,
+ at most 72), and nothing newer from the source contradicts it. **So a video removed from its source inside that
+ window, after its last sighting and before any newer listing, can have its audio cleaned** (and on a keep-latest
+ channel, its rolled-out saved video pruned). Setting `verifyBeforeCleanMaxAgeHours` to 0 restores "always ask".
- **What a checked clean accepts as "still there"**, cheapest first. A video is cleaned only when one of these vouches
for it; anything else keeps its audio and is "unverified":
- - **Stored evidence, nothing asked**: a listing that returned the video within `verifyBeforeCleanMaxAgeHours` (24
- by default; 0 = always ask). That is Sync's full sweep or paged walk, Store playlist, the Quick check, or an earlier
- clean's listing, including the entries a rate-limited listing returned before it stopped. A per-video probe that
- found the video public or unlisted in that window counts too (`availability.json`, `checkedBy: "check"`). The
- listings are kept in `channels/<slug>/listing-evidence.json`: each id with the time of the newest listing that
- returned it, and the shape of the last 20 listings. `roster.json`'s `lastListedAt` is not used, because its seed
- stamps the stored `playlist` as listed. If a complete listing in the window does not name a video, the video is
- asked about by itself, with no second listing.
+ - **Stored evidence, nothing asked**: a listing that returned the video within `verifyBeforeCleanMaxAgeHours`. That
+ is Sync's full sweep or paged walk, Store playlist, the Quick check, or an earlier clean's listing, including the
+ entries a rate-limited listing returned before it stopped. A per-video probe that found the video public or
+ unlisted in that window counts too: `availability.json` with `checkedBy: "check"`, and no download since that
+ found anything else (the same rule saved-video compaction uses). The listings are kept in
+ `channels/<slug>/listing-evidence.json`: each id with the time of the newest listing that returned it, and the
+ shape of the last 20 listings. The file applies to the channel URL they were taken from. A changed channel URL
+ starts it again. `roster.json`'s `lastListedAt` is not used, because its seed stamps the stored `playlist` as
+ listed.
+ - **Newer beats older**: a sighting or probe does not count if a newer complete listing in the window does not name
+ the video. Such a video is asked about by itself, with no second listing. The same applies when the clean's own
+ listing does not name it. For a listing cut short, that holds only over the stretch the listing covered, judged by
+ upload time; outside that stretch the older evidence still counts, by the window. While any video overruled this
+ way stays unconfirmed, the saved-video retention prune does not run. A listing counts as complete only when it
+ ended normally: a cancel, a restart part-way or an early stop (exit 101) leaves a partial one. A listing time in
+ the future (a wrong clock) is dropped.
- **A listing**: the videos it returns are verified. If the source rate-limits it part-way, the videos among the
entries it did return are still cleaned, and the job says "verified N from a partial listing of M entries; K
unverified remain". A video the partial listing did not reach is not judged and keeps its audio.
diff --git a/SETTINGS.md b/SETTINGS.md
@@ -351,7 +351,7 @@ Default: `true`
## `verifyBeforeCleanMaxAgeHours`
-How long (hours) stored evidence vouches for a video in the pre-clean availability check (verifyBeforeClean): a listing that RETURNED the video (Sync's full sweep or paged walk, the Quick check, or an earlier clean's listing, including the entries a rate-limited listing returned before it stopped — channels/<slug>/listing-evidence.json), or a per-video probe that found it public or unlisted (availability.json, checkedBy "check"). A candidate vouched for inside the window is cleaned without asking the source; anything else is asked, and whatever stays unanswered is left unverified and never deleted. Default 24 (clean after capture's window, diarization.cleanVerdictMaxAgeHours), max 168; 0 = always ask.
+How long (hours) stored evidence vouches for a video in the pre-clean availability check (verifyBeforeClean). THE GUARANTEE THIS SETS: a checked Clean audio removes a video's audio only when the video was listed by its source, or confirmed by a per-video probe, within this many hours, with nothing newer from the source contradicting it (a newer complete listing that does not name it, or a listing of the check that covered its place and did not name it). So a video removed from its source inside this window, after its last sighting and before any newer listing, CAN have its audio cleaned (and, on a keep-latest channel, its rolled-out saved video pruned). 0 restores "always ask": only a listing or probe taken by the clean itself counts. Evidence: a listing that RETURNED the video (Sync's full sweep or paged walk, Store playlist, the Quick check, or an earlier clean's listing, including the entries a rate-limited listing returned before it stopped — channels/<slug>/listing-evidence.json, taken from the channel's current URL only), or a probe that found it public or unlisted (availability.json, checkedBy "check", with no download since finding otherwise). Default 24 (clean after capture's window, diarization.cleanVerdictMaxAgeHours), max 72.
Default: `24`
diff --git a/common/lib/settingsSchema.test.ts b/common/lib/settingsSchema.test.ts
@@ -351,7 +351,7 @@ test("resumeMarginGB: 0 disables the hysteresis, capped at the max", () => {
]);
});
-test("verifyBeforeCleanMaxAgeHours: 24 by default, 0 = always ask, capped at a week", () => {
+test("verifyBeforeCleanMaxAgeHours: 24 by default, 0 = always ask, capped at 72 hours", () => {
checkField("verifyBeforeCleanMaxAgeHours", [
[-1, 0],
[0, 0],
@@ -362,6 +362,8 @@ test("verifyBeforeCleanMaxAgeHours: 24 by default, 0 = always ask, capped at a w
[null, S.VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_DEFAULT],
]);
assert.equal(S.VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_DEFAULT, 24);
+ assert.equal(S.VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_MAX, 72);
+ checkField("verifyBeforeCleanMaxAgeHours", [[168, 72]]);
});
test("parallelTranscriptions: floored at 1, capped at the max", () => {
diff --git a/common/lib/settingsSchema.ts b/common/lib/settingsSchema.ts
@@ -1022,9 +1022,11 @@ export const RESUME_MARGIN_GB_MAX = 1000;
// 24 h is clean after capture's window (diarization.cleanVerdictMaxAgeHours):
// the same risk — a video removed since that listing — the archive already
// accepts for an automatic delete, and long enough that a day's Sync or Quick
-// check lands inside it. Capped at a week; 0 = never use stored evidence.
+// check lands inside it. Capped at 72 hours (review 1, operator): a video
+// removed inside the window can lose its audio, and three days bounds that.
+// 0 = never use stored evidence (always ask, the behaviour before the lane).
export const VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_DEFAULT = 24;
-export const VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_MAX = 168;
+export const VERIFY_BEFORE_CLEAN_MAX_AGE_HOURS_MAX = 72;
export const PARALLEL_TRANSCRIPTIONS_MAX = 16;
export const PARALLEL_TRANSCRIPTIONS_DEFAULT = 2;
@@ -2046,7 +2048,7 @@ export const siteSettingsSchema = z.object({
"Whether the transcribed-audio cleanup sweep checks each candidate is still available upstream before deleting its audio, pinning (do-not-clean) any video found permanently gone. The delete is irreversible and a gone video's audio is irreplaceable, so this defaults to true. Turn it off for an offline or URL-less setup, where the check can never resolve and cleanup would otherwise never delete anything. See verifyBeforeClean.ts.",
),
verifyBeforeCleanMaxAgeHours: settingsField((v): number => clampVerifyBeforeCleanMaxAgeHours(v)).describe(
- "How long (hours) stored evidence vouches for a video in the pre-clean availability check (verifyBeforeClean): a listing that RETURNED the video (Sync's full sweep or paged walk, the Quick check, or an earlier clean's listing, including the entries a rate-limited listing returned before it stopped — channels/<slug>/listing-evidence.json), or a per-video probe that found it public or unlisted (availability.json, checkedBy \"check\"). A candidate vouched for inside the window is cleaned without asking the source; anything else is asked, and whatever stays unanswered is left unverified and never deleted. Default 24 (clean after capture's window, diarization.cleanVerdictMaxAgeHours), max 168; 0 = always ask.",
+ "How long (hours) stored evidence vouches for a video in the pre-clean availability check (verifyBeforeClean). THE GUARANTEE THIS SETS: a checked Clean audio removes a video's audio only when the video was listed by its source, or confirmed by a per-video probe, within this many hours, with nothing newer from the source contradicting it (a newer complete listing that does not name it, or a listing of the check that covered its place and did not name it). So a video removed from its source inside this window, after its last sighting and before any newer listing, CAN have its audio cleaned (and, on a keep-latest channel, its rolled-out saved video pruned). 0 restores \"always ask\": only a listing or probe taken by the clean itself counts. Evidence: a listing that RETURNED the video (Sync's full sweep or paged walk, Store playlist, the Quick check, or an earlier clean's listing, including the entries a rate-limited listing returned before it stopped — channels/<slug>/listing-evidence.json, taken from the channel's current URL only), or a probe that found it public or unlisted (availability.json, checkedBy \"check\", with no download since finding otherwise). Default 24 (clean after capture's window, diarization.cleanVerdictMaxAgeHours), max 72.",
),
buildArchives: settingsField((v): boolean => v !== false).describe(
"Whether site builds generate downloadable transcript/live-chat archive zips (into public/archives, linked on the Downloads page). Global default; a site can opt out via site.json `archives: false`, and a single build can skip via the \"Skip archive zips\" build control. Opt-out: default true.",
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -16,7 +16,14 @@
and paged walk, Store playlist, the Quick check, the clean's own listing, and the entries a rate-limited listing
returned before it stopped.
- A candidate listed within `verifyBeforeCleanMaxAgeHours` is cleaned without asking the source. So is one a
- per-video probe found in that window. The setting is new: 24 h by default, 0 = always ask (SETTINGS.md).
+ per-video probe found in that window, unless something newer from the source contradicts it. The setting is
+ new: 24 h by default, at most 72, 0 = always ask (SETTINGS.md).
+ - The guarantee changed. Before, a video was cleaned only when a listing or probe in the same job found it. Now a
+ listing or probe within the window is enough when nothing newer contradicts it. So a video removed from its
+ source inside the window, after its last sighting and before any newer listing, can have its audio cleaned.
+ - Newer beats older: a newer complete listing that does not name the video overrules an older sighting or probe,
+ and so does the clean's own listing. The video is then asked about by itself. A listing counts as complete only
+ when it ended normally: a cancelled one is a prefix.
- On Odysee and BitChute the next listing continues two pages before where the last one stopped. Elsewhere yt-dlp
cannot skip pages, so a retry keeps the earlier verdicts and asks only for the rest.
- When few candidates remain against a large channel, each one is asked about by itself (paced, every answer kept)