commit e9ea0e58cd3b1e65d46558ac90118247be810be3
parent 0f3a0dc7b5cc577cd2c20604614c4fb43ba381c7
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 03:30:24 -0400
common: flip topics, thread labels and YouTube text check a Title Case line as onscreen and teaser do
Found in the release 28 live smoke: qwen's thread labels ("Growth", "Health") were refused as names.
checkLine() checks a Title Case line in its sentence case and makes a capital the report lacks soft.
The threads run fixture's invented-name label is sentence case, so it still shows the hard refusal.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/common/lib/report/draft/tasks/clipEvidence.ts b/common/lib/report/draft/tasks/clipEvidence.ts
@@ -14,6 +14,7 @@ import { extractJsonObject } from "../../../parseStdoutJson";
import { checkNarration, type GroundingInput, type GroundingResult } from "../grounding";
import type { ManifestEntry, VideoManifest } from "../videoOps";
import type { MediaReport } from "./media";
+import { isTitleCase, titleAsSentence } from "./onscreen";
import type { CorpusToolsLike } from "./types";
export type ClipClaim = { id?: string; text: string; verdict?: string };
@@ -151,6 +152,20 @@ const QUOTED = /“([^”]+)”|"([^"]+)"/g;
* or a run of a quote's words is refused, as in narration.
*/
export function checkLine(text: string, g: GroundingInput, { quotes = false }: { quotes?: boolean } = {}): GroundingResult {
+ // A Title Case line is checked in its sentence case, and a capital left over
+ // that the report lacks is soft (./onscreen.ts titleLineGrounding says why).
+ if (isTitleCase(text)) {
+ const r = checkLineAsIs(titleAsSentence(text, g.reference), g, quotes);
+ const names = r.hard.filter((h) => h.startsWith("name “"));
+ return {
+ hard: r.hard.filter((h) => !h.startsWith("name “")),
+ soft: [...r.soft, ...names.map((h) => `${h} (a Title Case word — check it is not a name)`)],
+ };
+ }
+ return checkLineAsIs(text, g, quotes);
+}
+
+function checkLineAsIs(text: string, g: GroundingInput, quotes: boolean): GroundingResult {
if (!quotes) return checkNarration(text, g);
const hard: string[] = [];
const said = g.quotes.map((q) => ` ${strictNormalize(q)} `);
diff --git a/common/testing/draft/runs/threads.json b/common/testing/draft/runs/threads.json
@@ -6,7 +6,7 @@
{
"message": {
"role": "assistant",
- "content": "{\"threads\": [{\"id\": \"bakery\", \"label\": \"The bakery\"}, {\"id\": \"contest\", \"label\": \"The contest\"}, {\"id\": \"gordon\", \"label\": \"Talks with Gordon\"}], \"clips\": [{\"clip\": \"c01\", \"thread\": \"bakery\"}, {\"clip\": \"c02\", \"thread\": \"bakery\"}, {\"clip\": \"c03\", \"thread\": \"bakery\"}, {\"clip\": \"c04\", \"thread\": \"contest\"}, {\"clip\": \"c05\", \"thread\": \"contest\"}, {\"clip\": \"c06\", \"thread\": \"\"}, {\"clip\": \"c07\", \"thread\": \"bakery\"}]}"
+ "content": "{\"threads\": [{\"id\": \"bakery\", \"label\": \"The bakery\"}, {\"id\": \"contest\", \"label\": \"The contest\"}, {\"id\": \"gordon\", \"label\": \"A talk with Gordon\"}], \"clips\": [{\"clip\": \"c01\", \"thread\": \"bakery\"}, {\"clip\": \"c02\", \"thread\": \"bakery\"}, {\"clip\": \"c03\", \"thread\": \"bakery\"}, {\"clip\": \"c04\", \"thread\": \"contest\"}, {\"clip\": \"c05\", \"thread\": \"contest\"}, {\"clip\": \"c06\", \"thread\": \"\"}, {\"clip\": \"c07\", \"thread\": \"bakery\"}]}"
},
"done": true
},