{"record":{"id":"b317872e9e338e6f","repo":"ruvnet/ruflo","slug":"pod-template-at-reservationexpiryms-must-be-wit","errorCode":null,"errorMessage":"pod-template at /: reservationExpiryMs must be within [5000, 300000] ms (ADR-164.1 §3.2)","messagePattern":"pod-template at /: 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/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L238-L274","documentation":"reservationExpiryMs is an optional field; when present it is bounded to [5000, 300000] ms (5 s to 5 min) per ADR-164.1 §3.2 — the reservation/lease window must be long enough to be usable but short enough that a crashed holder cannot stall a pod for long. Values below 5 s or above 300000 ms are rejected at path '/'. The 'pod-template at /:' prefix is the caller's path formatting of the thrown message.","triggerScenarios":"A template with reservationExpiryMs: 1000 (1 s — too short) or 3600000 (1 h — too long). Omitting the field entirely is fine and falls back to the default; only explicitly supplied out-of-range values throw.","commonSituations":"Porting lease timeouts tuned for other systems; unit confusion — expressing seconds instead of milliseconds (10 meaning '10 seconds' reads as 10 ms); attempting to 'disable' expiry with a huge value like Number.MAX_SAFE_INTEGER.","solutions":["Pick a value in [5000, 300000], e.g. 30000 (30 s) or 60000 (60 s)","If you wanted 'no expiry', that is not supported — use the 300000 ms ceiling instead","Double-check the unit is milliseconds (30 seconds = 30000, not 30)"],"exampleFix":"// before\n\"reservationExpiryMs\": 10\n// after\n\"reservationExpiryMs\": 30000","handlingStrategy":"validation","validationCode":"if (json.reservationExpiryMs !== undefined) {\n  const v = json.reservationExpiryMs;\n  if (typeof v !== 'number' || v < 5000 || v > 300000) {\n    json.reservationExpiryMs = 30000; // safe default inside ADR-164.1 §3.2 bounds\n  }\n}","typeGuard":"function isValidReservationExpiry(v: unknown): boolean {\n  return v === undefined || (typeof v === 'number' && v >= 5000 && v <= 300000);\n}","tryCatchPattern":"try { validatePodTemplate(json); } catch (err) {\n  if (err instanceof PodTemplateValidationError && /reservationExpiryMs/.test(err.message)) {\n    // clamp into [5000, 300000] ms or delete the field to use the default\n  }\n}","preventionTips":["Express the value in milliseconds and sanity-check against 5 s / 5 min bounds","Omit the field when the default lease window is acceptable"],"tags":["schema-validation","business-pods","reservation","lease-timeout","adr-164","configuration"],"backgroundTag":"schema-validation-failed","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}