{"record":{"id":"415fb59b5dc0eb08","repo":"deepseek-ai/deepseek-harness","slug":"time-context-refreshintervalms-must-be-a-non-nega","errorCode":null,"errorMessage":"time-context: refreshIntervalMs must be a non-negative safe integer, got ${String(refreshIntervalMs)}","messagePattern":"time-context: refreshIntervalMs must be a non-negative safe integer, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/context/time-context/src/index.ts","lineNumber":133,"sourceCode":"  formatter: Intl.DateTimeFormat,\n  timeZone: string,\n  browserContext: BrowserTimeZoneContext,\n): string {\n  const elapsed = previous === undefined ? 'unavailable' : formatDuration(now - previous)\n  const baseline = step === 1 ? 'model-visible message' : 'step context'\n  const browserText = renderBrowserTimeZoneContext(browserContext)\n  return `Time sampled while preparing turn ${turn}, step ${step}: ${formatTimestamp(now, formatter, timeZone)}\\n`\n    + `${browserText}\\n`\n    + `Elapsed since the preceding ${baseline}: ${elapsed}.`\n}\n\n/** Reject refresh intervals that cannot represent an exact elapsed-millisecond threshold. */\nfunction validateRefreshInterval(refreshIntervalMs: number | undefined): void {\n  if (refreshIntervalMs !== undefined && (\n    !Number.isSafeInteger(refreshIntervalMs)\n    || refreshIntervalMs < 0\n  )) {\n    throw new TypeError(\n      `time-context: refreshIntervalMs must be a non-negative safe integer, got ${String(refreshIntervalMs)}`,\n    )\n  }\n}\n\n/**\n * Register a prepended pre-step listener for the lifetime of `ctx`.\n * @param ctx - plugin context; the listener is disposed with it.\n * @param config - time zone and durable refresh scheduling configuration.\n * @throws when the refresh interval is invalid or the configured or process time zone cannot be resolved.\n */\nexport function apply(ctx: Context, config: Config): void {\n  const timeZone = config.timeZone\n  const refreshIntervalMs = config.refreshIntervalMs\n  validateRefreshInterval(refreshIntervalMs)\n  let fallbackFormatter: Intl.DateTimeFormat\n  try {\n    fallbackFormatter = createTimestampFormatter(timeZone)","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/context/time-context/src/index.ts#L115-L151","documentation":"Error \"time-context: refreshIntervalMs must be a non-negative safe integer, got ${String(refreshIntervalMs)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/context/time-context/src/index.ts:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set refreshIntervalMs to a non-negative safe integer."],"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"}