Archilyzer · Source

archilyzer

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

commit e3327d26332765f9a959438a9bac07c4adf716e8
parent 66a2329201ad0326ad9c4720acaca10f67a2af18
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 21 Nov 2026 14:12:49 -0500

docs: mark provenance, the source-gone opt-in and marks-backfill

OPERATING.md (Clean audio without checking), COMMANDS.md regenerated, the ops
CLI's help, editor CHANGELOG.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
MCOMMANDS.md | 3++-
MOPERATING.md | 34++++++++++++++++++++++++++++++++--
Meditor/CHANGELOG.md | 19+++++++++++++++++++
3 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/COMMANDS.md b/COMMANDS.md @@ -206,7 +206,8 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run) | `delete-file` | delete-file deletes one file of one video, as its Files list does: {"slug", "id", "file"}. A tiered media file goes with its bytes on the media drive (never a bare link); refused while that drive is not answering. No undo. A raw live chat named in one form while the other is there (transcript.live\_chat.json and its .zst): only the named one goes, never the other, and "note" says the other is still there. | | | `do-not-clean` | do-not-clean sets one video's "Do not clean" marker: {"slug", "id", "keep"?: true}; "keep": false removes it. (keep-videos is the bulk form.) | | | `drop-saved-alternate` | drop-saved-alternate deletes one saved alternate of one video, as its "Drop this alternate" button does: {"slug", "id", "file", "dryRun"?}. "file" is a name `get saved-alternates` lists under "alternates"; the active copy, an unlisted name and any path are refused, and so is a store being moved. The file goes from the store and its entry from saved-video.json (the rest of the pointer is untouched); one already gone is cleaned from the pointer ("existed": false). "dryRun": true answers the same and changes nothing. No undo. An ORIGINAL ("keptAs": "original", the source of a compacted copy) needs "confirmOriginal": true; the compacted copy is read back from disk (size, sha256, container, length) before it goes; a video not freshly checked on its platform needs a review of this copy recorded first; and nothing goes while a download or persist of the video is queued or running, or while it is being compacted. A FORMER original ("former-original") needs its own "confirmFormerOriginal": true, and the same gone/review rule. | | -| `cleanup` | cleanup runs one of a channel's cleanup sweeps as a job: {"slug", "sweep": "transcribed" (audio of transcribed videos — the /cleanup total) \| "extra-formats" \| "wrong-format" \| "failed-transcriptions" (clears the list; deletes nothing)}. Do-not-clean videos are skipped; `get cleanup <slug>` says what each would reclaim. "unchecked": true (transcribed only) is "Clean without checking": the source is not asked, so the audio of videos no longer available anywhere goes too; every other protection holds; the job is "Clean audio without checking". With "dryRun": true it answers what it would remove — {plan: {ids, videos, files, bytes, protected, awaitingDiarization, awaitingVoiceprint, inspected}} — and starts nothing; without it the plan is counted at the call, its counts answered ({jobId, plan}) and logged, and the job removes at most those videos' audio. It never touches a saved video. With the channel's cleanAudioWithoutChecking on, "transcribed" with no flag runs unchecked with no count (so do job retry and retry-failed of a clean). A checked clean the source rate-limits ends deferred and schedules a retry off the queue after at least 15 min (twice at most), then gives up; `job cancel <the deferred job id>` cancels the retry. | `pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed"}' --wait`<br>`pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed","unchecked":true,"dryRun":true}'` | +| `cleanup` | cleanup runs one of a channel's cleanup sweeps as a job: {"slug", "sweep": "transcribed" (audio of transcribed videos — the /cleanup total) \| "extra-formats" \| "wrong-format" \| "failed-transcriptions" (clears the list; deletes nothing)}. Do-not-clean videos are skipped; `get cleanup <slug>` says what each would reclaim. "unchecked": true (transcribed only) is "Clean without checking": the source is not asked, so the audio of videos no longer available anywhere goes too; every other protection holds; the job is "Clean audio without checking". With "dryRun": true it answers what it would remove — {plan: {ids, videos, files, bytes, protected, awaitingDiarization, awaitingVoiceprint, inspected}} — and starts nothing; without it the plan is counted at the call, its counts answered ({jobId, plan}) and logged, and the job removes at most those videos' audio. It never touches a saved video. With the channel's cleanAudioWithoutChecking on, "transcribed" with no flag runs unchecked with no count (so do job retry and retry-failed of a clean). "includeSourceGone": true (with "unchecked" only; off by default, never implied by the channel key, never replayed) also removes the audio of videos kept ONLY because the source was gone: a mark by the availability check (inferred ones included) that nothing else holds. The plan counts that group apart, {plan: {sourceGone: {ids, videos, files, bytes, inferred: {ids, videos, files, bytes}}}}; the marks stay and record the removal. A mark a person, an import or a live recording set, or one from before marks said who set them, is never reached. A checked clean the source rate-limits ends deferred and schedules a retry off the queue after at least 15 min (twice at most), then gives up; `job cancel <the deferred job id>` cancels the retry. | `pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed"}' --wait`<br>`pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed","unchecked":true,"dryRun":true}'`<br>`pnpm ops cleanup --json '{"slug":"x","sweep":"transcribed","unchecked":true,"includeSourceGone":true}' --wait` | +| `marks-backfill` | marks-backfill relabels a channel's old do-not-clean marks (no "by") as set by the availability check, "inferred": true, only where the records prove it: availability.json says a check found the video gone within a minute of the mark, and a clean job of the channel running then names the pin in its log. Never from the note. {"slug", "dryRun"?: true} — a dry run unless "dryRun": false; answers {marks, labelled, relabelled: \[{id, setAt, evidence}\], notProven: \[{id, setAt, reason}\], oldestCleanJobAt}. | `pnpm ops marks-backfill --json '{"slug":"x"}'` | | `diarize` | diarize runs a channel's "Diarize speakers" as a job: {"slug"}. Every video still holding audio with no current diarization.json is diarized, and a diarized one without voice fingerprints gets them from its own turns — the voiceprint backfill, one channel at a time. Runs while the Speakers lane is paused; nothing is deleted. | `pnpm ops diarize --json '{"slug":"x"}' --wait` | | `web-search` | web-search searches the web (DuckDuckGo's HTML page) and answers the results: {"query", "n"?: 6 (at most 20)} -&gt; {results: \[{title, url, snippet}\]}. Read only, through the editor's one web queue: one request at a time, 3 s apart, backing off on a 429 or 503. For context; a web page is never cited as what someone said. | `pnpm ops web-search --json '{"query":"second shop opening","n":5}'` | | `web-fetch` | web-fetch reads one web page as plain text: {"url", "maxChars"?: 12000 (at most 60000)} -&gt; {page: {url, finalUrl, status, contentType, title?, text, truncated}}. http and https only; a private or loopback host (by name, by address, or by what its name resolves to, every redirect checked) is refused before any request, and so is a page that is not text (a PDF, an image). Read only, on the same web queue as web-search. | `pnpm ops web-fetch --json '{"url":"https://example.com/news/item","maxChars":4000}'` | diff --git a/OPERATING.md b/OPERATING.md @@ -1102,6 +1102,9 @@ pnpm ops diarize --json '{"slug":"example"}' --wait # one channe pnpm ops cleanup --json '{"slug":"example","sweep":"transcribed","unchecked":true,"dryRun":true}' # what it would remove pnpm ops cleanup --json '{"slug":"example","sweep":"transcribed","unchecked":true}' --wait # Clean without checking pnpm ops channel-config --json '{"slug":"example","cleanAudioWithoutChecking":true}' # always, for this channel +pnpm ops cleanup --json '{"slug":"example","sweep":"transcribed","unchecked":true,"includeSourceGone":true}' --wait # and audio kept only because the source was gone +pnpm ops marks-backfill --json '{"slug":"example"}' # which old marks the records prove (dry run) +pnpm ops marks-backfill --json '{"slug":"example","dryRun":false}' # relabel them ``` - **Clean audio checks first**: before deleting a transcribed video's audio it asks the source whether the video is @@ -1135,8 +1138,35 @@ pnpm ops channel-config --json '{"slug":"example","cleanAudioWithoutChecking":tr new channel never starts with it. Clean after capture still holds a URL-less channel (`cleanAfterCaptureUnverified`) and a whole-recording one (`diarization.cleanWholeRecordingAudio`) — those holds are not the availability check. Audio an earlier checked clean pinned as "deleted from source (pre-clean check)" - stays do-not-clean: unpin it on the video page (or `pnpm ops do-not-clean --json '{"slug":"example","id":"<id>","keep":false}'`) to let - it go. + stays do-not-clean: let it go with the opt-in below, or unpin it on the video page (or `pnpm ops do-not-clean + --json '{"slug":"example","id":"<id>","keep":false}'`). +- **Who set a do-not-clean mark** is in the mark (`data/<id>/do-not-clean.json`): `by` is `availability-check` (the + checked clean's gate, clean after capture, the keep-latest window's deletion check), `live-recording` + (`record-live`), `import` (`import-media`) or `operator` (the video page's toggle, `do-not-clean`, `keep-videos`, + and a keep asked for before the video landed); `via` says which, `surface` where a person asked (`button` or + `ops`) and `jobId` the job that wrote it. A machine never replaces a mark that is there; a person's replaces the + machine's (re-marking a source-gone video makes it yours). A mark from before this has no `by` and is treated as + the operator's. +- **"Also remove audio kept only because the source was gone"** — a checkbox on Clean without checking's + confirmation, off by default, and `"includeSourceGone": true` with `"unchecked": true` over ops. Never implied by + `cleanAudioWithoutChecking`, never on Clean audio, never carried by a Retry or a restart. It reaches ONLY marks + with `by: "availability-check"` (inferred ones included) that nothing else holds (the keep-latest window, the + speaker holds); a mark set by a person, an import, a live recording, or one with no `by`, is never reached. The + plan always counts that group apart (`plan.sourceGone`: ids, videos, files, bytes, and `inferred` the same), and + the ticked confirmation gives it its own line: "Also removed, kept only because the source was gone: N audio files + (X) from M videos the availability check marked do not clean. Their marks stay." — with the inferred part named + after it. The job carries those ids and re-reads each mark just before removing. The mark stays (the video is + still gone, so every other cleaner and the saved-video prune keep it) and gains `audioRemoved: [{at, jobId, + files, bytes, why}]`. +- **`marks-backfill`** relabels an OLD mark (no `by`) as `by: "availability-check", inferred: true` only when the + records prove it, never from its note: `availability.json` says a **check** found the video gone within a minute + of the mark's `setAt`, AND a finished Clean audio job of the channel (or its rate-limit retry), running then, has + the line `Pinned <id> as do-not-clean (<that state>)` in its log. A dry run unless `"dryRun": false`; it lists + every mark it would relabel with that evidence, and every other with why not (`notProven`, and + `oldestCleanJobAt` — job logs are pruned by retention). What it cannot prove: a pin made on a **cached** verdict + (the check ran days before the clean), any mark older than the oldest job log kept, a mark whose availability + record a later recheck moved, and every keep-latest-check or clean-after-capture pin (not a clean job's). Those + stay the operator's; unpin them by hand. - **A checked clean the source rate-limits** (HTTP 429 on the channel listing or on a confirmation probe) deletes nothing it could not verify and ends **deferred** on /jobs, with its counts. **The 429 counts toward the platform's pace and hold**: a rate-limited listing records the platform's cooldown as Sync does diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,25 @@ # Changelog ## [Unreleased] +- **A do-not-clean mark says who set it, and Clean without checking can drop the audio kept only because the source was gone.** + - Every mark now records `by`: `availability-check` (the checked clean's gate, clean after capture, the keep-latest + window's deletion check), `live-recording`, `import` or `operator` (the video page's toggle, `do-not-clean`, + `keep-videos`, a keep asked before the video landed), with `via`, the `surface` a person used (`button` or + `ops`) and the job's id. One writer writes the file; a test fails the build if anything else does. A machine + never replaces a mark that is there; a person's replaces the machine's. + - A mark from before this has no `by` and is the operator's. `pnpm ops marks-backfill {slug, dryRun}` (a dry run + unless `"dryRun": false`) relabels one as `by: "availability-check", inferred: true` only on proof from other + records: availability.json says a check found the video gone within a minute of the mark, and a clean job's log, + running then, names the pin. Never from the note. It lists every relabel with its evidence and every other mark + with why not. On a corpus whose old pins were made on cached verdicts, or whose job logs are pruned, it relabels + nothing. + - Clean without checking's confirmation has a new checkbox, off by default: "Also remove audio kept only because + the source was gone" (`"includeSourceGone": true` with `"unchecked": true` over ops). It reaches only marks by + the availability check, inferred ones counted on their own, and never a mark a person, an import or a live + recording set. The group has its own line in the confirmation (videos, files, bytes) and in the plan + (`plan.sourceGone`). The job carries its ids and re-reads each mark before removing. The mark stays and records + `audioRemoved` (when, which job, the files, why). The channel key never implies it, and a Retry or a restart + never carries it. - **A clip window past the end of a saved recording is cut from the saved video, clamped at the end.** - Before, the last clip of a recording asked for a window that ended past the saved container (its cut plus a 3 s pad). The window was "not-covering" and went to the platform's download queue: a network fetch for footage