{"record":{"id":"9b672140befca65a","repo":"ruvnet/ruflo","slug":"reservationexpiryms-must-be-within-5000-300000","errorCode":null,"errorMessage":"reservationExpiryMs must be within [5000, 300000] ms (ADR-164.1 §3.2)","messagePattern":"reservationExpiryMs must be within \\[5000, 300000\\] ms \\(ADR-164\\.1 §3\\.2\\)","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":256,"sourceCode":"      '/',\n    );\n  }\n  const preferLocalExecution = requireBoolean(json, 'preferLocalExecution', '/');\n  const cronSchedule = requireString(json, 'cronSchedule', '/');\n  if (!CRON_RE.test(cronSchedule)) {\n    throw new PodTemplateValidationError(\n      'cronSchedule must be a POSIX cron expression (5 or 6 fields)',\n      '/',\n    );\n  }\n  const auditReadView = validateAuditReadView(json.auditReadView, '/auditReadView');\n\n  let reservationExpiryMs: number | undefined;\n  if (json.reservationExpiryMs !== undefined) {\n    const v = requireNumber(json, 'reservationExpiryMs', '/');\n    // ADR-164.1 §3.2 — bounded to [5_000, 300_000] ms.\n    if (v < 5_000 || v > 300_000) {\n      throw new PodTemplateValidationError(\n        'reservationExpiryMs must be within [5000, 300000] ms (ADR-164.1 §3.2)',\n        '/',\n      );\n    }\n    reservationExpiryMs = v;\n  }\n\n  return {\n    name,\n    displayName,\n    roomId,\n    agents,\n    allowedMcpTools,\n    bench,\n    piiPolicy: piiPolicy as PiiPolicy,\n    budgetUsdMonthly,\n    budgetUsdPerRun,\n    preferLocalExecution,","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L238-L274","documentation":"Thrown by validatePodTemplate() when the optional 'reservationExpiryMs' field is present but outside the bounded range [5000, 300000] milliseconds (5 seconds to 5 minutes), per ADR-164.1 §3.2. This value controls the atomic budget tracker's reservation expiry. If the field is absent entirely, no error is thrown and a default of 60000 ms is used.","triggerScenarios":"The pod-template JSON includes \"reservationExpiryMs\" with a value less than 5000 (e.g. 1000) or greater than 300000 (e.g. 600000). If the field is omitted entirely, this check is never reached.","commonSituations":"A value was set in milliseconds but intended as seconds (e.g. 60 meaning 60 seconds but interpreted as 60ms — below the 5000 floor); a value was copied from a different system with a different expiry window.","solutions":["Set reservationExpiryMs to a value between 5000 and 300000 (inclusive)","Or remove the field entirely to use the default 60000 ms (60 seconds)","Double-check the unit is milliseconds, not seconds"],"exampleFix":"// before\n{ \"reservationExpiryMs\": 60 }\n\n// after\n{ \"reservationExpiryMs\": 60000 }","handlingStrategy":"validation","validationCode":"const MIN_EXPIRY = 5000;\nconst MAX_EXPIRY = 300000;\n\nif (template.reservationExpiryMs !== undefined) {\n  if (template.reservationExpiryMs < MIN_EXPIRY || template.reservationExpiryMs > MAX_EXPIRY) {\n    throw new Error(`reservationExpiryMs must be within [${MIN_EXPIRY}, ${MAX_EXPIRY}] ms`);\n  }\n}","typeGuard":"function isValidReservationExpiry(v: unknown): boolean {\n  return v === undefined || (typeof v === 'number' && Number.isFinite(v) && v >= 5000 && v <= 300000);\n}","tryCatchPattern":"try {\n  validatePodTemplate(json);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError && e.message.includes('reservationExpiryMs')) {\n    // Remove the field to use default 60000ms, or set to [5000, 300000]\n  }\n}","preventionTips":["Remember the unit is milliseconds, not seconds","Omit the field entirely to use the default 60000ms (60s)","The valid range is 5 seconds (5000ms) to 5 minutes (300000ms) per ADR-164.1 §3.2"],"tags":["pod-template","validation","schema","budget","reservation","adr-164"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}