Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 4bfeea81e208cb9bdcc61726a69face82ea81e57
parent c544c0dd61f17d1929f05f7f7d9b5899bc40018a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 15 Oct 2026 17:12:37 -0400

editor: the salvaged-transcript status is not a chore card, and an e2e scenario for the corrupt-full-source retry (release 30 lane Q) — the notice moves out of ./cards (videoChoreCards pins that every card there is a listed chore; this one runs nothing, like the "media archived" status); audio-check-scenarios.spec gains a retry scenario: a corrupt full source, then a clean source, then the bucket's Retry card refetches and the kept file goes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 2++
Reditor/app/channels/[slug]/videos/[id]/components/cards/SalvagedTranscriptNotice.tsx -> editor/app/channels/[slug]/videos/[id]/components/SalvagedTranscriptNotice.tsx | 0
Meditor/app/channels/[slug]/videos/[id]/components/VideoPanel.tsx | 2+-
Meditor/app/channels/[slug]/videos/[id]/lib/videoChoreCards.ts | 5+++--
Meditor/e2e/audio-check-scenarios.spec.ts | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +- **Retrying a corrupt full source downloads it again.** A video whose download completed with malformed audio (Odysee's intermittent AAC, on a channel with the audio check) kept its file, and that file made every retry say "Nothing to fetch". A retry of the **corrupt full sources** bucket — the new card on the channel's Download stage, or `pnpm ops retry-bucket --json '{"slug": "<channel>", "bucket": "corruptFullSource"}'` — now sets the kept file aside and downloads again: a clean result replaces it; a malformed one keeps whichever copy decodes longer; a download that fails (a 429, the network) puts the kept file back and the video stays in the bucket, with the attempt recorded. Each retry is recorded in the video's `download-outcome.json`. Needs a restart of the editor. +- **A damaged recording is transcribed for what decodes, instead of not at all.** Transcribing a corrupt full source used to fail at the first bad stretch. It is now decoded with error tolerance, with the stretches that will not decode kept as silence of their own length, so every line of the transcript is at its true time in the recording; with parakeet, a window that still fails is skipped and noted. The transcript is marked **salvaged**: the video page says how much decoded and which stretches have no transcript, and the channel's report lists it under **salvaged transcript**. It happens on its own for a corrupt full source; `pnpm ops transcribe-one --json '{"slug": "<channel>", "id": "<video>", "salvage": true}'` asks for it on any video (`false` turns it off). Needs a restart of the editor. - **find-copy can fetch from an archive.org copy that is a single video file.** Such a file's fetch failed with "Requested format is not available" and the copy was then marked as failed. A copy's window is now cut from whatever single file it is, and a copy is marked failed only when the copy itself is gone or refused. `pnpm ops find-copy --json '{"article": "<id>", "retryFailed": true}'` tries copies marked failed again. Needs a restart of the editor. - **A model can propose verdicts for a fact-check's unruled claims, for you to approve or reject.** `pnpm ops report-draft --json '{"task":"verdicts","article":"<id>"}'` asks each claim with no verdict, with the verdict bench's own prompt, and keeps each proposed verdict, its reason, the model and the prompt version in `verdicts.proposed.json` beside the article, never in `report.json`. It runs only on a model you ticked on the verdict bench (`settings.generation.verdicts.models`, empty until you do), and never sets a verdict itself. umtool's Inbox shows "N verdicts proposed" under Review; **Review verdicts** opens the article, where each proposal has **Approve** (the claim gets that verdict) and **Reject** (the claim stays unruled), with an optional note. A claim you have ruled, or whose proposal you have reviewed, is not asked again. `pnpm ops verdict-review` does the same from the command line. Needs a restart of the editor and umtool. - **Draft everything can add the on-screen deck first.** Tick **with the deck** beside **Draft everything** on a cut's Media tab (or `umtool chain <article> <n> --draft-all --deck`): before the flips, a step adds the on-screen deck with every setting at its default to a cut that has none, so the flips and threads are drafted on a cut the converter made. A copy of the cut as it was is kept in its revisions first. A cut that already has a deck is left as it is, and the step says "deck added" or "deck already there". Off by default: without the tick, Draft everything is as it was. Needs a restart of umtool. diff --git a/editor/app/channels/[slug]/videos/[id]/components/cards/SalvagedTranscriptNotice.tsx b/editor/app/channels/[slug]/videos/[id]/components/SalvagedTranscriptNotice.tsx diff --git a/editor/app/channels/[slug]/videos/[id]/components/VideoPanel.tsx b/editor/app/channels/[slug]/videos/[id]/components/VideoPanel.tsx @@ -14,7 +14,7 @@ import type { } from "yt-dlp-transcript-common/lib/channelConfig"; import type { DownloadOutcomeRecord } from "yt-dlp-transcript-common/lib/downloadOutcome"; import type { TranscriptSalvage } from "yt-dlp-transcript-common/lib/transcribeOutcome"; -import { SalvagedTranscriptNotice } from "./cards/SalvagedTranscriptNotice"; +import { SalvagedTranscriptNotice } from "./SalvagedTranscriptNotice"; import type { SavedVideoPointer } from "yt-dlp-transcript-common/lib/savedVideo"; import type { SourceVideoQuality } from "yt-dlp-transcript-common/ytdlp/downloadFormat"; import type { AvailabilityHistoryEntry } from "yt-dlp-transcript-common/lib/availability"; diff --git a/editor/app/channels/[slug]/videos/[id]/lib/videoChoreCards.ts b/editor/app/channels/[slug]/videos/[id]/lib/videoChoreCards.ts @@ -20,8 +20,9 @@ // videoChoreCards.test.ts pins that its render order is exactly this list, so // a card added there without a row here fails a test rather than going unlisted. // Not a card, so not listed: VideoNavStrip, PipelineStatusStrip, the umtool -// link and the one-line "media archived" status, which is the archive-media -// card's marker restated at the top. +// link, the one-line "media archived" status, which is the archive-media +// card's marker restated at the top, and the one-line salvaged-transcript +// status (release 30, lane Q), which runs nothing. // // No directive: a plain data module. Nothing server-side imports it; a server // component that did would get client references for `component`, not values. diff --git a/editor/e2e/audio-check-scenarios.spec.ts b/editor/e2e/audio-check-scenarios.spec.ts @@ -323,6 +323,61 @@ test.describe("audio-checked download scenarios", () => { ).toBe(false); }); + test("a retry of a corrupt full source downloads again; a clean result replaces the kept file", async ({ + page, + }) => { + // Release 30 lane Q1. The kept container used to make the bucket's retry + // a no-op ("Nothing to fetch"); an intermittent source can come back + // clean, so the retry sets the kept file aside and downloads again. + await resetData("audio-check-channel"); + await writeFakeConfig({ + mode: "corrupt-final", + deterministicCorrupt: true, + totalChunks: 4, + chunkDelayMs: 100, + }); + await triggerDownload(page); + await waitForOutcome( + (o) => o.status === "corrupt-full-source", + "corrupt-full-source outcome", + ); + await expect + .poll( + async () => + ( + await readJson<{ buckets?: { corruptFullSource?: string[] } }>( + `${CHANNEL_ROOT}/snapshot.json`, + ).catch(() => null) + )?.buckets?.corruptFullSource?.length ?? -1, + { timeout: 15_000, message: "the video in the corruptFullSource bucket" }, + ) + .toBe(1); + + // The source serves clean audio now. + await writeFakeConfig({ mode: "happy", totalChunks: 4, chunkDelayMs: 100 }); + await page.goto(channelStage(CHANNEL, "download")); + const bucket = page.getByLabel("retry corrupt full sources bucket"); + await bucket.getByRole("button", { name: /^Retry \(1\)$/ }).click(); + const retryLog = page.getByLabel("Retry corrupt full sources output"); + await expect(retryLog).toContainText("Corrupt full source: refetching", { + timeout: 30_000, + }); + await expect(retryLog).toContainText("the refetch is clean", { + timeout: 60_000, + }); + const outcome = await waitForOutcome( + (o) => o.status === "ok-audio-checked", + "clean refetch outcome", + ); + expect(outcome.corruptRefetches?.[0]?.result).toBe("clean"); + expect( + await pathExists(`${CHANNEL_ROOT}/data/${VIDEO_ID}/audio.mp3`), + ).toBe(true); + expect( + await pathExists(`${CHANNEL_ROOT}/data/${VIDEO_ID}/audio.mp4.corrupt-kept`), + ).toBe(false); + }); + test("deterministic corruption exhausts retry cap and surfaces failed-corrupt-source", async ({ page, }) => {