Archilyzer · Source

archilyzer

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

commit ff0fd7f02efd51196fe83431bc326476e216303c
parent c3bd5972a5c298d0ffd29036d8c111c51495dd12
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 10 Oct 2026 12:28:58 -0400

plans: release 23 Lane 2 — cited-only channels, as shipped; REPORT, CITATIONS, FACTS, changelog

REPORT.md and CITATIONS.md (the video/audio/post `channel` rows) say a cited
channel must be in the site's `channels` or `citedChannels`, regenerated from
their sources; FACTS gains the "cited means four things" naming hazard; the
editor changelog's [Unreleased] leads with the cited-only bullet; and
plans/release-23.md records S1–S5 as shipped with the gates.

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

Diffstat:
MCITATIONS.md | 6+++---
MREPORT.md | 2+-
Mcommon/lib/citations/schema.ts | 6++++--
Mcommon/lib/report/docs.ts | 7+++++--
Meditor/CHANGELOG.md | 1+
Mplans/FACTS.md | 9+++++++++
Mplans/release-23.md | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 104 insertions(+), 8 deletions(-)

diff --git a/CITATIONS.md b/CITATIONS.md @@ -46,7 +46,7 @@ Regenerate this file with `pnpm --filter yt-dlp-transcript-common exec tsx bin/f | Key | Required | Description | |---|---|---| | `kind` | yes | `"video"`. | -| `channel` | yes | The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page. | +| `channel` | yes | The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page. The citing site must name it in `channels` (its pool) or `citedChannels` (cited only: the moment page and its clip publish, with no link into a corpus) — see [SITE.md](SITE.md); any other channel is refused at compose (`not-in-site`). | | `id` | yes | The record's video id (its directory under `data/`; may start with `-`). A path segment of the moment page. | | `start` | yes | Where the cited span starts, in seconds from the start of the record. | | `end` | yes | Where the cited span ends, in seconds; after `start`. | @@ -57,7 +57,7 @@ Regenerate this file with `pnpm --filter yt-dlp-transcript-common exec tsx bin/f | Key | Required | Description | |---|---|---| | `kind` | yes | `"audio"`: a span of a record with no picture worth showing (a podcast). Rendered with a poster. | -| `channel` | yes | The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page. | +| `channel` | yes | The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page. The citing site must name it in `channels` (its pool) or `citedChannels` (cited only: the moment page and its clip publish, with no link into a corpus) — see [SITE.md](SITE.md); any other channel is refused at compose (`not-in-site`). | | `id` | yes | The record's video id (its directory under `data/`; may start with `-`). A path segment of the moment page. | | `start` | yes | Where the cited span starts, in seconds from the start of the record. | | `end` | yes | Where the cited span ends, in seconds; after `start`. | @@ -75,7 +75,7 @@ Regenerate this file with `pnpm --filter yt-dlp-transcript-common exec tsx bin/f | Key | Required | Description | |---|---|---| | `kind` | yes | `"post"`. | -| `channel` | yes | The post's channel slug. A path segment of the moment page. | +| `channel` | yes | The post's channel slug. A path segment of the moment page. The citing site must name it in `channels` or `citedChannels` (see [SITE.md](SITE.md)), and may carry the post (the post visibility rule). | | `id` | yes | The post's id. A path segment of the moment page. | | `thread` | no | True to show the post with the thread it belongs to. Absent = the post alone. | diff --git a/REPORT.md b/REPORT.md @@ -6,7 +6,7 @@ One cited report, format `"archilyzer-report"`, version 1, persisted to `transcr A **fact-check** (`"kind": "factcheck"`) is sections (chapters) of claims, each with a verdict and its findings. A **sweep** (`"kind": "sweep"`) is sections with no verdicts, or bodies that cite inline. Either may keep a **timeline** (`entries`): dated entries appended over time. Markdown fields (`summary`, an entry's `body`, a section's `body`, a claim's `findings`) cite with `[label](cite:<id>)`. -`common/lib/report/validate.ts` reports every problem with its JSON path: an unknown key, a reference that names nothing (a listed citation, a claim's source sentence, a `cite:` link, the subject), a section, claim or entry id used twice (they share one namespace: the report page's anchors) or named for one of the page's own anchors, a sweep's claim with a verdict, `updated` before `published` (or an entry's before its `date`), a date that is not one, a slide field out of bounds (below), and every citation problem CITATIONS.md lists. Whether a still or the report's video exists, whether the video fits the publish limit, and whether a quote matches its cues are checked when the site is composed. +`common/lib/report/validate.ts` reports every problem with its JSON path: an unknown key, a reference that names nothing (a listed citation, a claim's source sentence, a `cite:` link, the subject), a section, claim or entry id used twice (they share one namespace: the report page's anchors) or named for one of the page's own anchors, a sweep's claim with a verdict, `updated` before `published` (or an entry's before its `date`), a date that is not one, a slide field out of bounds (below), and every citation problem CITATIONS.md lists. Whether a still or the report's video exists, whether the video fits the publish limit, whether a quote matches its cues, and whether each cited channel is one the site may cite — in its `channels` (its pool) or its `citedChannels` (cited only: the moment pages and clips publish, the channel's transcripts, search and corpus.json entry do not; see [SITE.md](SITE.md)) — are checked when the site is composed. Regenerate this file with `pnpm --filter yt-dlp-transcript-common exec tsx bin/file-schemas-docs.ts`. diff --git a/common/lib/citations/schema.ts b/common/lib/citations/schema.ts @@ -166,7 +166,8 @@ type Own<T> = Omit<T, keyof CitationCommon>; export const VIDEO_CITATION_FIELD_DOCS: FieldDocs<Own<VideoCitation>> = { kind: '`"video"`.', - channel: "The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page.", + channel: + "The record's channel slug (its directory under `transcripts/channels/`). A path segment of the moment page. The citing site must name it in `channels` (its pool) or `citedChannels` (cited only: the moment page and its clip publish, with no link into a corpus) — see [SITE.md](SITE.md); any other channel is refused at compose (`not-in-site`).", id: "The record's video id (its directory under `data/`; may start with `-`). A path segment of the moment page.", start: "Where the cited span starts, in seconds from the start of the record.", end: "Where the cited span ends, in seconds; after `start`.", @@ -185,7 +186,8 @@ export const CITATION_PAD_FIELD_DOCS: FieldDocs<CitationPad> = { export const POST_CITATION_FIELD_DOCS: FieldDocs<Own<PostCitation>> = { kind: '`"post"`.', - channel: "The post's channel slug. A path segment of the moment page.", + channel: + "The post's channel slug. A path segment of the moment page. The citing site must name it in `channels` or `citedChannels` (see [SITE.md](SITE.md)), and may carry the post (the post visibility rule).", id: "The post's id. A path segment of the moment page.", thread: "True to show the post with the thread it belongs to. Absent = the post alone.", }; diff --git a/common/lib/report/docs.ts b/common/lib/report/docs.ts @@ -61,8 +61,11 @@ export function renderReportMarkdown(): string { "`published` (or an entry's before its `date`), a date that is not one, a slide " + "field out of bounds (below), and every citation problem " + "CITATIONS.md lists. Whether a still or the report's video exists, whether the " + - "video fits the publish limit, and whether a quote matches its cues are checked " + - "when the site is composed.", + "video fits the publish limit, whether a quote matches its cues, and whether each " + + "cited channel is one the site may cite — in its `channels` (its pool) or its " + + "`citedChannels` (cited only: the moment pages and clips publish, the channel's " + + "transcripts, search and corpus.json entry do not; see [SITE.md](SITE.md)) — are " + + "checked when the site is composed.", ); out.push(""); out.push(REGENERATE_SCHEMA_DOC); diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **A site's reports can cite a channel the site does not publish.** A channel row outside the site's pool on the site form now has a **Cited only** box (`citedChannels` in site.json — see SITE.md); `/sites` shows "· N cited" beside the channel count. A report on that site may cite the channel: its moment pages and their clips publish, but not its browse page, transcripts, search entry or corpus.json entry, and its moments link no corpus page. A channel in the pool is never cited-only: ticking **Include** clears the box. A citation of a channel in neither list is still refused at compose (`not-in-site`), and the refusal now names both keys. A build or deploy whose bundle holds a cited-only channel's transcripts, subs, posts, digests, stats or archives, or lists it in corpus.json or site.json, is refused; a change to its transcripts or posts makes the site stale. Renaming a channel renames it in `citedChannels` too, and `pnpm ops get sites` lists the key. A site padding its pool with a channel only to cite it can move the channel to **Cited only**. Needs a restart of the editor for the form; rebuild each site that uses it. - **"Clear failure list" keeps its log on screen.** On a channel's Transcribe stage, clearing the failed-transcriptions list hid the controls the moment the list emptied, its output ("Cleared N entries") with them. They now stay until the page is reloaded, the button disabled at (0). - **archive.org imports take many items, or a search.** `pnpm ops import-archive-org` now takes `"items"` (identifiers, or `{item, files | match}`) or `"query"` (an archive.org search, its first `"limit"` items) as one job, paced between files and between items. Records already held — on disk or in the saved-video store — are skipped; a dry run lists every file as held, RESTRICTED (archive.org will not hand it out) or would-get; three items in a row refused by archive.org stop the job and back the platform off. - **What an Odysee or BitChute channel lists that it does not hold.** `pnpm ops get remote-listing <slug>` reads the channel's listing once, on the platform's own queue at its pace, and prints the videos listed but not held and the ones held but no longer listed. Nothing is written. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -169,6 +169,15 @@ Never name the curated field `tags`. Never assume a `tags.json` is the keyword l A grep for either word finds all three; read the file before assuming which. +**`cited` means four things** (release 23): + +| Which | Where | What it is | +| --- | --- | --- | +| A cited (report-only) site | `common/lib/siteSchema.ts` — `isCitedSite` (`search: false`); corpus.json `site.scope: "cited"`; `isCitedBuild` / `citedBuildProblem` (`lib/builtExport.ts`) | A site that publishes only its reports and the moments they cite. | +| A cited-only channel | `site.json` `citedChannels`; `siteCitableChannelSlugs`, `isCitedOnlyChannel` (`lib/siteSchema.ts`); `builtCitedOnlyProblem` (`lib/builtExport.ts`) | A channel a site's reports may cite without the site publishing it: its moments and clips publish, its corpus does not. `siteChannelSlugs` (and `publishedMemberSlugs`) stay pool-only. | +| `citedMoments` | `common/publish/reportMedia.ts` | The moments a site's reports cite, one per span, with the citations that cite each. | +| Compose's `citedSite` | `common/publish/composeReports.ts` `resolveSiteReports` | The local `isCitedSite(site)` (renamed from `cited` in release 23). | + **Never publish a path segment named `.git`.** wrangler's Pages upload drops `**/.git` (and `**/node_modules`) SILENTLY, and Cloudflare's managed rules block `/.git/` requests. The source mirror is `/source/archilyzer.git/` for that reason (release 12, below). A mirror named `.git` would diff --git a/plans/release-23.md b/plans/release-23.md @@ -67,3 +67,84 @@ straight from `channels/<slug>/data` (`readCitedRecord`). ## Record (Lane 2 adds "### Step S<n>, as shipped" sections here; the orchestrator adds "As it went" and "Rollout".) + +Lane 2 (`r23/cited-only` off `r23/integration` `d3296bab`), S1 → S5, one commit each, tsc clean per commit. Every +fixture is synthetic; nothing read the corpus. + +### Step S1, as shipped — the schema + +`citedChannels: [{slug}]` in `common/lib/siteSchema.ts`: `SiteCitedChannel` and its field docs, `parseSiteCitedChannels` +(trim, blanks and repeats dropped), the object step dropping a slug the pool holds, `siteToDisk` writing the key only +when non-empty (re-parsed and pool-filtered), and the nested table in `fileSchemaDocs.ts`. Absent parses to `[]`; the +type is optional, so no existing `Site` literal changed. `siteChannelSlugs` (pool-only, unchanged) moved from +`site.ts` to beside the new `siteCitableChannelSlugs` and `isCitedOnlyChannel` (all re-exported by `site.ts`). The +`channels` and `search` docs say what the pool is; SITE.md regenerated. Tests in `siteSchema.test.ts`: the shape pins +(the key in every parse), the parse rules, the round trip (the `everything` fixture carries dirty cited slugs), +`writeSite`/`getSite`, `patchSite` keeping the key, `channelsOnlyOnUnlistedSites` ignoring cited slugs. + +### Step S2, as shipped — resolution and media + +Compose's membership check (`resolveSiteReports`) and prepare's and `missingEvidenceWindows`' (`reportMedia.ts`, the +pool-membership lines only) take `siteCitableChannelSlugs`. `corpusUrl` is dropped when `citedSite || +isCitedOnlyChannel(site, channel)` (the four record views); compose's local `cited` is `citedSite`. `not-in-site`'s +sentence is one helper, `notInSiteMessage` (siteSchema.ts): `channel "<slug>" is in neither this site's `channels` nor +its `citedChannels``. `postsVisibleTo` still runs after the citable check, unchanged. **The proving test** +(`composeReports.test.ts`): `padded` (pool both channels) publishes the video channel's corpus and links its moments; +`padded-cited` and `padded-private` (pool `[SOCIAL]`, cited `[VIDEOS]`) publish its two moment pages and clips with no +`corpusUrl` (the pool's post keeps its link), prune its `transcripts/`, `subs/`, `digests/`, `posts/`, `stats/`, +`archives/` trees (a padded build and a stray digest left them in public/), no non-report file names it, corpus.json +and site.json list the pool alone, and the sitemap lists the moment; `unpadded` (pool `[SOCIAL]`, nothing cited) is +refused naming both keys. A mutation check (the `corpusUrl` drop disabled) fails it. `reportMedia.test.ts` +1 (a cited +channel's clip is cut; a channel in neither key is `not-in-site`), `missingEvidenceWindows.test.ts` +1 and a message +assertion. + +### Step S3, as shipped — staleness and the leak guard + +`siteInputSig` signs each cited-only channel's shared `transcripts` and `posts` trees (`cited/<tree>/<slug>`), and a +`cited-only` line, only when the site has one: every existing site keeps its signature. `builtCitedOnlyProblem(site, +outDir)` (`lib/builtExport.ts`) refuses an out dir holding a cited-only channel's `transcripts`, `subs`, `posts` (a +tombstone tree aside — `isTombstoneChannelPostsDir`, split out of `isTombstonePostsTree`), `digests`, `stats` or +`archives` tree, or listing it in corpus.json's or site.json's `channels`. Chained after `builtScopeProblem` in the +build phase (`publish/build.ts`), the deploy stage's bundle guards and `deployAudienceProblem`. Tests: `inputSig.test.ts` ++1, `builtExport.test.ts` +1, the deploy-stage bundle-guard test extended (refused before wrangler, nothing recorded), +and the compose proving test asks the guard over a padded build (refused) and each cited build (clean). + +### Step S4, as shipped — writers and the editor + +`renameChannel` rewrites `citedChannels` beside `channels`; `get sites` (`/api/ops/sites`) carries `citedChannels` +(slugs) and its help line says so (COMMANDS.md regenerated). The site form: a "Cited only: <name>" box on each channel +row outside the pool (never "Include …"), ticking Include clears it; the save action reads the hidden +`citedChannelsJson` through the pure `editor/app/sites/lib/citedChannelsFromForm.ts` (bare slugs or `{slug}`, a pool +slug dropped, a non-array payload refused). `/sites` shows "· N cited". Tests: `renameChannel.test.ts` (a citing site +retargeted in place), `citedChannelsFromForm.test.ts` (3), `_read.test.ts` (the ops row), and one `sites-crud.spec` +test (save to `citedChannels`, the list's count, Include clears it). + +**Stays pool-only, verified, unchanged:** `publishedMemberSlugs` (and through it the per-site index, compose's trees, +archives, tombstones, publish state and plan), poolSummary / channel-sites.json, buildStats, curatedTagsIndex, the +channel views, the seeder, the editor channel pages and `siteChannelIndex` all read `site.channels` or +`siteChannelSlugs`; none reads the cited scope. The channel page's membership writer (`siteMemberships.ts`) carries +`citedChannels` through `writeSite`, and adding a cited channel to the pool there drops it from the cited scope. + +### Step S5, as shipped — docs and this record + +REPORT.md (what compose checks) and CITATIONS.md (the `channel` rows of video, audio and post) from their sources +(`lib/report/docs.ts`, `lib/citations/schema.ts`), regenerated; FACTS "Naming hazards" gains "`cited` means four +things"; `editor/CHANGELOG.md` `[Unreleased]` leads with the bullet ("rebuild each site that uses it"). + +**Export e2e: not added.** The report suite's fixture is a cited (report-only) site staged from precomposed views, on +which a cited-only channel is no different from any citation; the default export suite's fixture composes no reports. +Carrying a full site with a report would mean new fixture machinery, so the compose proving test (S2) is the proof. + +**Found and left.** A channel moved from a site's pool to its cited scope is not tombstoned: its posts paths a public +site served before stay at the edge until their TTL, as for any channel taken off a site today. + +| Gate | Result | +| --- | --- | +| tsc (`pnpm -r … tsc --noEmit`), each commit | clean ×5 | +| common suite, whole, at the end | 3681 tests, 3671 pass, 10 fail — `controller/attachMedia.test.ts` (8) and `controller/preparePlayable.test.ts` (2), which fail the same on `r23/integration` (environmental) | +| touched common files | siteSchema 31, composeReports 19, reportMedia + missingEvidenceWindows 10, inputSig 6, builtExport 22, deployStage 15, renameChannel 7 — all pass | +| editor unit (`pnpm --filter editor test`) | 240/240 | +| export unit / homepage unit | 118/118 / 23/23 | +| `test:scripts` | 761: 758 pass, 3 skipped | +| `docs files --check`, `docs cli --check` | clean | +| `sites-crud.spec` (start mode; the editor rebuilt through the heavy slot, 40 s) | 18/18, 29.1 s |