fix: normalise reported claim evidence kind

This commit is contained in:
2026-08-03 08:50:37 +01:00
parent 3c0f7f5a45
commit ef04b9e494
2 changed files with 95 additions and 0 deletions
+12
View File
@@ -16,6 +16,18 @@ export function normaliseAnalysisResponse(input) {
normalised.evidence = normalised.evidence.map((record, index) => {
if (!record || typeof record !== "object") return record;
if (record.evidenceType === "reported_claim") {
changesApplied.push({
path: ["evidence", index, "evidenceType"],
change: "Converted reported_claim to reported_statement",
});
record = {
...record,
evidenceType: "reported_statement",
};
}
if (record.source === null) {
changesApplied.push({
path: ["evidence", index, "source"],