{"record":{"id":"9a6c5391e9719df5","repo":"deepseek-ai/deepseek-harness","slug":"subprocess-e2b-pollms-must-be-a-positive-safe-int","errorCode":null,"errorMessage":"subprocess-e2b: pollMs must be a positive safe integer","messagePattern":"subprocess-e2b: pollMs must be a positive safe integer","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/e2b/subprocess-e2b/src/index.ts","lineNumber":71,"sourceCode":"  static inject = ['e2b']\n\n  static Config: z<Config> = z.object({\n    pollMs: z.number().default(20),\n  })\n\n  private readonly live = new Set<E2BSubprocessHandle>()\n  private readonly terminals = new Set<SubprocessTerminalHandle>()\n  private readonly terminalSetups = new Set<TerminalSetup>()\n  private readonly pollMs: number\n  private disposing = false\n\n  /** Create the E2B subprocess service and bind its disposal policy. */\n  constructor(ctx: Context, config: Config) {\n    super(ctx)\n    // Schemastery fills pollMs before construction; the type does not encode that step.\n    const { pollMs } = config as SchemaResolvedConfig\n    if (!Number.isSafeInteger(pollMs) || pollMs <= 0) {\n      throw new Error('subprocess-e2b: pollMs must be a positive safe integer')\n    }\n    this.pollMs = pollMs\n    ctx.effect(() => async () => {\n      this.disposing = true\n      for (const setup of this.terminalSetups) {\n        setup.controller.abort(new Error('subprocess-e2b: service disposed during terminal setup'))\n      }\n      await Promise.all([...this.terminalSetups].map(setup => setup.done))\n      const handles = [...this.live]\n      const terminals = [...this.terminals]\n      const pending: Promise<unknown>[] = []\n      for (const handle of handles) {\n        handle.terminate()\n        pending.push(handle.waitForExit().then(async () => {\n          await handle.done.catch(() => undefined)\n          this.live.delete(handle)\n        }))\n      }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/subprocess-e2b/src/index.ts#L53-L89","documentation":"Error \"subprocess-e2b: pollMs must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/subprocess-e2b/src/index.ts:71 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"}