commit 5888ec444d7c2dcb139afb2f08040e7a7ee9e2fe
parent 5d3464634ab3bc50a4bff3e71353e514ab0de7aa
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 21 Sep 2026 13:47:04 -0400
tags S2: /tags.json is a ROOT_FILE now, so fetch it as one
S1 added TAGS_FILENAME to ROOT_FILES with the spec-4 bump that announces the
document, so the two readers that were routing around the missing entry can
stop: `rootFileUrl(TAGS_FILENAME)` in RemoteSource and
`rootFileUrl(TAGS_FILENAME, this.hubBase)` in HubSource, exactly as their
search-aliases siblings do. Same URL either way — what changes is that the
file name now comes from the contract rather than from a string next to it,
and the comment explaining the detour is gone with the detour.
Co-Authored-By: Claude Opus <noreply@anthropic.com>
Diffstat:
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/common/lib/archive/reader-hub.ts b/common/lib/archive/reader-hub.ts
@@ -13,7 +13,7 @@ import { TAGS_FILENAME, type PublishedTag } from "../curatedTags";
import { coercePublishedTags } from "../publishedTags";
import type { ChannelDigestsManifest, VideoDigest } from "../digests";
import type { VideoStat } from "../stats";
-import { archiveUrl, corpusUrl, rootFileUrl, type HubSite } from "./contract";
+import { corpusUrl, rootFileUrl, type HubSite } from "./contract";
import {
EMPTY_GROUPS,
RemoteSource,
@@ -115,7 +115,7 @@ export class HubSource implements ArchiveReader {
async loadTags(): Promise<PublishedTag[]> {
if (this.tags) return this.tags;
try {
- const res = await fetch(archiveUrl(this.hubBase, `/${TAGS_FILENAME}`));
+ const res = await fetch(rootFileUrl(TAGS_FILENAME, this.hubBase));
this.tags = res.ok ? coercePublishedTags(await res.json()) : [];
} catch {
this.tags = [];
diff --git a/common/lib/archive/reader.ts b/common/lib/archive/reader.ts
@@ -43,7 +43,6 @@ import {
type ChannelGroup,
} from "../channelGroups";
import {
- archiveUrl,
manifestUrl,
pageUrl,
rootFileUrl,
@@ -796,11 +795,8 @@ export class RemoteSource implements ArchiveReader {
return this.getJson<unknown>(rootFileUrl("search-aliases.json"));
}
- // Not a rootFileUrl() call: /tags.json joins ROOT_FILES with the corpus-spec
- // bump that announces it, which is a separate change. archiveUrl is the same
- // join rootFileUrl performs, so the URL is identical either way.
readTags(): Promise<unknown> {
- return this.getJson<unknown>(archiveUrl(undefined, `/${TAGS_FILENAME}`));
+ return this.getJson<unknown>(rootFileUrl(TAGS_FILENAME));
}
readDuplicates(): Promise<DuplicateReport> {