commit b5277a59f60d9b5fd3b27be07031315d9da4c95e
parent 3d0192ed43543122a7a9767a10e7a78c3dacf670
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 12 Nov 2026 08:11:51 -0500
local media e2e + changelog: the preview counts the short-form transcript's two cues; the editor changelog says what a library's short cue timings do
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## [Unreleased]
+- **A local media library's subtitles may use short cue timings (`01:02.500 --> 01:04.000`).** A Local Archive channel (New channel → Local Archive, or `pnpm ops local-media-configure`) scans a folder of recordings with their `.info.json` and `.vtt` or `.srt`, and imports them as records whose video stays in the library. A `.vtt` written with minutes and seconds only — what FFmpeg and hand-made subtitle files write — read as "no usable cues" and was held for review; it is now read, previewed with its cue count and imported byte for byte. The hours form every published site's captions are read with is unchanged and tried first, so no existing caption file reads differently (checked against 10,874 of the corpus's caption files: 0 cues differ); a short-form line is read only where it does not match, and only strictly: minutes and seconds 00–59, exactly three millisecond digits, hours optional, and a stamp whose hours are too long to be a number is not a cue. A recording whose file name holds a control character, `\` or `:` is now held for review in the preview, saying so, instead of being offered as new and refused at import.
- **A published archive is a source: connect it once, sweep it, and fetch its cited clips with no local corpus.** A fresh clone pointed at jeralyzer.pages.dev could search it through the MCP and do nothing else: Create had no corpus to offer, and every clip of a channel the editor did not archive was a 404 `Channel "<slug>" not found`. An archive is now connected by its origin — `/sites` → **Connected archives**, or `pnpm ops archives --json '{"connect":"https://jeralyzer.pages.dev"}'` (`"dryRun": true` reads it and writes nothing; `pnpm ops get archives` lists them) — and kept in `settings.remoteArchives`. `TRANSCRIPT_SITE_URL`'s archive is offered without being connected, so a clone set up as AGENTS.md says starts with one. Create offers each connected archive as a sweep's source, preselected when this machine has no corpus of its own, the MCP's `list_sources` lists them and `generate` passes the choice. A sweep over an archive cites that archive's origin, whatever `generation.citationOrigin` says, and its revisions, drafts and refreshes inherit it. A clip window cited from one registers its channel **remote-only** on first need (`fetch-windows` and `fetch-window` take `"archive"`, and the MCP's `fetch_clip` names it): a `config.json` and nothing else, shown as "remote only" in the channel list, skipped by every sync, lane, scan and site build, and left out of the site form's channel picker. On a whole-recording platform (Rumble) a window means downloading the whole recording, which nobody planned for a channel that is not archived here: it is refused with the recording's length and estimated size until the ask carries `"allowWholeRecording": true`. The archive's documents are cached on disk by its build (512 MB by default), read one at a time and paced. `corpus.json` is spec 6 (the export's changelog): each channel names its platform and its page there; an older archive's platform is read from a record's `webpageUrl`.
- **A connected archive is untrusted input.** umtool can connect one and is open on the LAN, and everything an archive serves is someone else's JSON. An archive on this machine or its network — loopback, private, link-local and CGNAT addresses in any spelling (decimal, hex, IPv4 carried inside IPv6), a `.local`/`.internal`/`.lan` name, or a name that resolves to one — is refused at connect, before anything is asked of it, unless the editor runs with `ARCHILYZER_ALLOW_PRIVATE_ARCHIVES=1` or the origin is `TRANSCRIPT_SITE_URL`'s or already in `settings.json`; the check is made once, at connect. Its documents are read on its own origin only: a redirect elsewhere is refused unfollowed, a manifest its `corpus.json` names on another origin is not followed, and no document past 32 MB is read or kept. A record's page URL is fetched only when its host is its channel's video platform's own domain or a subdomain (`evilyoutube.com` and `youtube.com.evil.example` are not YouTube); a URL carrying a backslash, whitespace or a control character is refused unparsed, because Node and yt-dlp's Python read its host differently; and what reaches yt-dlp is the URL the check parsed, never the archive's own string. A remote-only channel whose archive was removed from settings is refused before its record is read.
- **umtool: the Source chip connects an archive, and an article swept over one is cut from it.** The Source chip takes an archive's address, reads it and connects it through the editor; a connected archive is offered as the source of **Article from a question** and of a new article, first when this machine has no corpus. The chain of an article swept over an archive asks the editor for its windows with the archive named and each record's page URL, so the cited channels are registered remote-only and fetched; a manifest with no sweep naming an origin takes the archive as its QR origin. A Rumble window fails the step with every recording's size, nothing fetched, until **Fetch the whole recordings** (`umtool chain <article> <n> --allow-whole-recording`). `--stop-before-render` ends Draft everything before the voices, and its new `cut-windows` step fetches the drafted cut's windows, asking the editor only for those not on disk. The cue walk, the link check and a source's build identity read an archive under the same rules as the editor (its own origin, 32 MB), and a chain whose archive is no longer connected stops and says to connect it again.
diff --git a/editor/e2e/local-media.spec.ts b/editor/e2e/local-media.spec.ts
@@ -14,7 +14,9 @@ import { resetData, testPaths, writeChannelConfig } from "./helpers";
const VTT = "WEBVTT\n\n00:00:01.000 --> 00:00:03.000\nA synthetic library cue\n";
// Short-form cue timings (mm:ss.mmm), what FFmpeg and hand-made subtitle files
-// write: the prepared recording carries them through preview, import and index.
+// write: the prepared recording carries them through preview (both cues
+// counted) and import (byte for byte). Its index is
+// common/controller/buildIndexLocalRecording.test.ts.
const SHORT_VTT = "WEBVTT\n\n00:01.000 --> 00:03.000\nA short-form library cue\n\n01:02.500 --> 01:04.000\nA second short-form cue\n";
test("a Local Archive channel imports a library recording and a prepared one, playback left off", async ({ page }) => {
@@ -47,6 +49,10 @@ test("a Local Archive channel imports a library recording and a prepared one, pl
await expect(page.getByRole("status").filter({ hasText: "discovered" })).toHaveText(
"2 discovered · 1 new · 0 occupied · 1 need review",
);
+ // Cues / notes: the short-form transcript's two cues are read, not "no usable cues".
+ const cuesOf = (media: string) => page.getByRole("row").filter({ has: page.getByLabel(`Import ${media}`) }).getByRole("cell").nth(3);
+ await expect(cuesOf("talk.mp4")).toHaveText(/^2(?!\d)/);
+ await expect(cuesOf("aaaaaaaaaaa.mp4")).toHaveText(/^1(?!\d)/);
await page.getByLabel("Import aaaaaaaaaaa.mp4").check();
await page.getByRole("button", { name: "Prepare details for talk.mp4" }).click();