fix(research): flatten source_dossier schema to correx's flat JsonSchema

The schema declared sources as an array of objects, which correx's flat
JsonSchema model can't represent (JsonSchemaProperty has no nested
properties). The strict config loader rejected it at startup, silently
disabling the source_dossier artifact kind. Flatten sources to an array
of strings (URL-prefixed per-source notes), update the gather prompt to
match, and add ResearchSchemaLoadTest to guard every shipped research
schema against the strict loader.
This commit is contained in:
2026-06-14 03:13:22 +04:00
parent 378ee39b19
commit 1de3e94990
3 changed files with 52 additions and 19 deletions
+2 -18
View File
@@ -3,25 +3,9 @@
"properties": {
"sources": {
"type": "array",
"description": "one entry per fetched source — each summarized on its own (per-source synthesis). This is the compression step: raw page text must never be copied here, only what the source contributes.",
"description": "one entry per fetched source — each a self-contained note in your own words (per-source synthesis; the compression step). Start each entry with the source URL, then summarize what it contributes and which sub-question(s) it bears on. Never copy raw page text. Example: 'https://example.com/x — explains Y; bears on sub-question 2'.",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"url": { "type": "string", "description": "the fetched source URL (a citation handle)" },
"title": { "type": "string" },
"summary": {
"type": "string",
"description": "what this source contributes to the question, in your own words — not a copy of the page"
},
"relevance": {
"type": "string",
"description": "which sub-question(s) this source bears on, and how strongly"
}
},
"required": ["url", "summary"],
"additionalProperties": true
}
"items": { "type": "string" }
}
},
"required": ["sources"],