{"record":{"id":"0c20d1c0b772a59b","repo":"deepseek-ai/deepseek-harness","slug":"sparse-arrays-are-not-json-data","errorCode":null,"errorMessage":"sparse arrays are not JSON data","messagePattern":"sparse arrays are not JSON data","errorType":"exception","errorClass":"MaterializeError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/realm.ts","lineNumber":113,"sourceCode":"    case 'object':\n      break\n  }\n  if (value === null) return null\n  const objectValue: object = value\n  if (seen.has(objectValue)) throw new MaterializeError(path, 'circular references are not JSON data')\n  seen.add(objectValue)\n  try {\n    if (Array.isArray(objectValue)) return materializeArray(objectValue, path, seen)\n    return materializeObject(objectValue, path, seen)\n  } finally {\n    seen.delete(objectValue)\n  }\n}\n\nfunction materializeArray(value: unknown[], path: string, seen: Set<object>): unknown[] {\n  const out: unknown[] = []\n  for (let index = 0; index < value.length; index++) {\n    if (!(index in value)) throw new MaterializeError(`${path}[${index}]`, 'sparse arrays are not JSON data')\n    out.push(materialize(value[index], `${path}[${index}]`, seen))\n  }\n  // Own enumerable props beyond the indices (e.g. `arr.total = 3`) would be\n  // silently dropped by JSON — reject them instead.\n  for (const key of Object.keys(value)) {\n    const index = Number(key)\n    if (!Number.isInteger(index) || index < 0 || index >= value.length) {\n      throw new MaterializeError(`${path}.${key}`, 'arrays with non-index properties are not JSON data')\n    }\n  }\n  if (Object.getOwnPropertySymbols(value).length > 0) {\n    throw new MaterializeError(path, 'symbol-keyed properties are not plain JSON data')\n  }\n  return out\n}\n\nfunction materializeObject(value: object, path: string, seen: Set<object>): Record<string, unknown> {\n  if (!hasPlainPrototype(value)) {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/realm.ts#L95-L131","documentation":"Error \"sparse arrays are not JSON data\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/realm.ts:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fill array holes with null or use a dense array before returning the value."],"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"}