Sources: accepted-duplicate % (curation-quality signal)
Per Codex's optional note: alongside the ingest-wide duplicate_rate, expose accepted_dup_rate — of what a source got ACCEPTED, how much was a duplicate of already-served content (accepted_total − served). Nearly free (derived from existing counts); surfaced as a tooltip on the Dup column so the table stays uncluttered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -320,8 +320,12 @@ def source_health(conn: sqlite3.Connection) -> list[dict]:
|
||||
for r in rows:
|
||||
d = dict(r)
|
||||
total = d["total_articles"] or 0
|
||||
d["acceptance_rate"] = round(100 * d["accepted_total"] / total) if total else None
|
||||
accepted = d["accepted_total"] or 0
|
||||
d["acceptance_rate"] = round(100 * accepted / total) if total else None
|
||||
d["duplicate_rate"] = round(100 * d["duplicates"] / total) if total else None
|
||||
# Curation quality: of what this source got ACCEPTED, how much was a
|
||||
# duplicate of content already served (accepted_total − served = accepted dupes).
|
||||
d["accepted_dup_rate"] = round(100 * (accepted - d["served"]) / accepted) if accepted else None
|
||||
out.append(d)
|
||||
return out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user