{"record":{"id":"c73949d69f2dfcf6","repo":"deepseek-ai/deepseek-harness","slug":"at-must-be-lossless-json-data-objects-arrays","errorCode":null,"errorMessage":"${at} must be lossless JSON data (objects, arrays, strings, numbers, booleans, null) — not a class instance, function, Map/Set, Date, or undefined. Return a plain object built from the values you need, or `return null` when the caller needs no value back.","messagePattern":"(.+?) must be lossless JSON data \\(objects, arrays, strings, numbers, booleans, null\\) — not a class instance, function, Map/Set, Date, or undefined\\. Return a plain object built from the values you need, or `return null` when the caller needs no value back\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":122,"sourceCode":"      root = item\n      return\n    }\n    if (destination.kind === 'array') {\n      destination.target[destination.index] = item\n      return\n    }\n    Object.defineProperty(destination.target, destination.key, {\n      value: item,\n      enumerable: true,\n      configurable: true,\n      writable: true,\n    })\n  }\n  const reject = (at: string): never => {\n    // Naming the executable next step matters more than naming the rule: the\n    // usual cause is a handler that returns whatever its last call produced,\n    // and the fix is one keyword.\n    throw new Error(`${at} must be lossless JSON data (objects, arrays, strings, numbers, booleans, null) — `\n      + 'not a class instance, function, Map/Set, Date, or undefined. Return a plain object built from the '\n      + 'values you need, or `return null` when the caller needs no value back.')\n  }\n\n  const tasks: CloneTask[] = [{ kind: 'visit', value, path, destination: { kind: 'root' } }]\n  for (let task = tasks.pop(); task !== undefined; task = tasks.pop()) {\n    if (task.kind === 'leave') {\n      ancestors.delete(task.source)\n      continue\n    }\n    if (task.kind === 'array-item') {\n      if (!Object.hasOwn(task.source, task.index)) reject(task.path)\n      tasks.push({\n        kind: 'visit',\n        value: task.source[task.index],\n        path: `${task.path}[${task.index}]`,\n        destination: { kind: 'array', target: task.target, index: task.index },\n      })","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L104-L140","documentation":"Error \"${at} must be lossless JSON data (objects, arrays, strings, numbers, booleans, null) — not a class instance, function, Map/Set, Date, or undefined. Return a plain object built from the values you need, or `return null` when the caller needs no value back.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}