A model reviewer for found links, with every determination kept

server/links/review.ts asks the configured model to judge the scanner's candidates
as a careful Wikipedia editor would: up to 60 a call, grouped by document and
section, each with its sentence, its section's path, the target's title and
description (and first sentence when cached) and, for a library target, how it
stands to the section. No tools; structured verdicts with a one-line reason. The
prompt names the scanner's known blind spots.

The pending store keeps verdicts, a person's decisions and when an approved link
was handed out, keyed by phrase and target, so a candidate found again is never
judged twice and a rejected phrase is not looked for again. Its file keeps the
old shape; old entries read as pending.

The scan route reviews what it found when asked (at most 2 calls) and hands the
approved links back to be made; jobs review as they go within IE_REVIEW_CALLS
(default 50) calls, with the count in their state. No model, a failed call or
the cap leaves the rest pending, with the reason. The mock reviewer links names
and terms, not single lower-case words, and fails on 'mockfail'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-16 16:39:15 -05:00
1 parent 428f7290ee
commit 46b48d3497
10 files changed
+889 -93

No files matched your search

+9
View File
@@ -8,4 +8,13 @@ export const schemas: Record<SchemaName, z.ZodType> = {
contradictions: z.object({
contradictions: z.array(z.object({ node: z.string(), other: z.string(), explanation: z.string(), text: z.string() })),
}),
review: z.object({
verdicts: z.array(
z.object({
id: z.string().describe("The proposal's id, as given."),
link: z.boolean().describe("true: make the link; false: leave the words unlinked."),
reason: z.string().describe("Why, in at most twelve words, for a person reading a list."),
}),
),
}),
};