Albums: no numbered volumes or stray suffixes; the replay report counts the group's releases
Test and deploy / test (push) Successful in 1m10s
Test and deploy / edge (push) Successful in 2m1s
Test and deploy / deploy (push) Skipped

acs5152s1.11 is a volume, Broforce.vol00+01.par2.temp a par2: neither an
album's member. replay:corpus reported every release in the scratch catalog
as the group's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Fable 5.1 committed 2026-10-26 12:28:40 +01:00
1 parent 4d0610ca06
commit 6860e6ccaf
2 files changed
+15 -8

No files matched your search

+8 -6
View File
@@ -199,7 +199,7 @@ export default class ReplayCorpus extends BaseCommand {
this.exitCode = 1
return
}
await this.report(ranges, Date.now() - started)
await this.report(groupId, ranges, Date.now() - started)
}
private async benchBinary(): Promise<string | null> {
@@ -310,8 +310,8 @@ export default class ReplayCorpus extends BaseCommand {
return out
}
/** What the replay left in the catalog, and its size per article. */
private async report(ranges: StoredRange[], elapsedMs: number) {
/** What the replay left in the catalog (this group's releases; the sizes are the whole catalog's), per article. */
private async report(groupId: number, ranges: StoredRange[], elapsedMs: number) {
const ids = ranges.map((r) => r.id)
const { rows: counts } = await db.rawQuery(
`SELECT count(*)::bigint AS releases,
@@ -326,10 +326,12 @@ export default class ReplayCorpus extends BaseCommand {
coalesce(sum(files), 0)::bigint AS files,
coalesce(sum(segments), 0)::bigint AS segments,
coalesce(sum(bytes), 0)::bigint AS bytes
FROM releases`
FROM releases WHERE group_id = ?`,
[groupId]
)
const { rows: sources } = await db.rawQuery(
`SELECT source, count(*)::bigint AS n FROM releases GROUP BY source ORDER BY source`
`SELECT source, count(*)::bigint AS n FROM releases WHERE group_id = ? GROUP BY source ORDER BY source`,
[groupId]
)
const { rows: headerRows } = await db.rawQuery(
`SELECT coalesce(sum(headers), 0)::bigint AS headers FROM ranges WHERE id = ANY(?::bigint[])`,
@@ -371,7 +373,7 @@ export default class ReplayCorpus extends BaseCommand {
)
}
this.logger.info(
`NVMe tables: ${(nvme / 1e6).toFixed(1)} MB, ${(nvme / Math.max(1, headers)).toFixed(2)} B/header; HDD tables (CHUNK_TABLESPACE): ${(other / 1e6).toFixed(1)} MB, ${(other / Math.max(1, headers)).toFixed(2)} B/header.`
`NVMe tables: ${(nvme / 1e6).toFixed(1)} MB, ${(nvme / Math.max(1, headers)).toFixed(2)} B/header; HDD tables (CHUNK_TABLESPACE): ${(other / 1e6).toFixed(1)} MB, ${(other / Math.max(1, headers)).toFixed(2)} B/header (the whole catalog's sizes over this group's headers: only the first group's are its own).`
)
}
}