{"record":{"id":"deb90b30d43ebd7e","repo":"deepseek-ai/deepseek-harness","slug":"seed-event-at-index-index-has-an-invalid-event","errorCode":null,"errorMessage":"seed event at index ${index} has an invalid event envelope","messagePattern":"seed event at index (.+?) has an invalid event envelope","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":229,"sourceCode":"\n/** Validate the fixed event envelope after one-pass JSON materialization. */\nfunction assertSessionEventEnvelope(value: Record<string, unknown>, index: number): asserts value is SessionEvent {\n  const event = value\n  if (event['type'] === 'request/header-delta') {\n    throw new Error(`seed event at index ${index} uses unsupported legacy request/header-delta format`)\n  }\n  for (const key in event) {\n    switch (key) {\n      case 'type':\n      case 'seq':\n      case 'time':\n      case 'data':\n      case 'surfaceOp':\n      case 'sourceEventSeqs':\n      case 'ignorable':\n        break\n      default:\n        throw new Error(`seed event at index ${index} has an invalid event envelope`)\n    }\n  }\n  const type = event['type']\n  const seq = event['seq']\n  const time = event['time']\n  if (typeof type !== 'string'\n    || typeof seq !== 'number' || !Number.isSafeInteger(seq) || seq < 0\n    || typeof time !== 'number' || !Number.isSafeInteger(time)\n    || event['data'] === undefined\n    || (event['ignorable'] !== undefined && event['ignorable'] !== true)) {\n    throw new Error(`seed event at index ${index} has an invalid event envelope`)\n  }\n  switch (type) {\n    case 'request/header':\n    case 'user/message':\n    case 'assistant/message':\n    case 'tool/result':\n      assertCurrentLlmShape(event, index)","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L211-L247","documentation":"Error \"seed event at index ${index} has an invalid event envelope\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the event envelope of the seed event at the reported index."],"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"}