{"record":{"id":"3605c8fe030fe05e","repo":"ruvnet/ruflo","slug":"pod-template-at-path-field-key-must-be-a-3605c8","errorCode":null,"errorMessage":"pod-template at ${path}: field \"${key}\" must be a finite number","messagePattern":"pod-template at (.+?): field \"(.+?)\" must be a finite number","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":104,"sourceCode":"\nconst PII_POLICIES: PiiPolicy[] = ['soc2', 'gdpr', 'hipaa', 'permissive'];\n\nfunction isObject(v: unknown): v is Record<string, unknown> {\n  return typeof v === 'object' && v !== null && !Array.isArray(v);\n}\n\nfunction requireString(parent: Record<string, unknown>, key: string, path: string): string {\n  const v = parent[key];\n  if (typeof v !== 'string' || v.length === 0) {\n    throw new PodTemplateValidationError(`field \"${key}\" must be a non-empty string`, path);\n  }\n  return v;\n}\n\nfunction requireNumber(parent: Record<string, unknown>, key: string, path: string): number {\n  const v = parent[key];\n  if (typeof v !== 'number' || !Number.isFinite(v)) {\n    throw new PodTemplateValidationError(`field \"${key}\" must be a finite number`, path);\n  }\n  return v;\n}\n\nfunction requireBoolean(parent: Record<string, unknown>, key: string, path: string): boolean {\n  const v = parent[key];\n  if (typeof v !== 'boolean') {\n    throw new PodTemplateValidationError(`field \"${key}\" must be a boolean`, path);\n  }\n  return v;\n}\n\nfunction requireArray<T>(parent: Record<string, unknown>, key: string, path: string,\n                          itemValidator: (item: unknown, ipath: string) => T): T[] {\n  const v = parent[key];\n  if (!Array.isArray(v)) {\n    throw new PodTemplateValidationError(`field \"${key}\" must be an array`, path);\n  }","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L86-L122","documentation":"Thrown by the requireNumber() helper inside the pod-template schema validator. Fires when a required numeric field is missing, not the number type, or is NaN/±Infinity. Used for budgetUsdMonthly, budgetUsdPerRun, bench.scheduleHours, auditReadView.retentionDays, and the optional reservationExpiryMs.","triggerScenarios":"validatePodTemplate() encounters a field that requireNumber() reads and the value is undefined, a string (e.g., \"50\" from un-coerced YAML/JSON), a boolean, NaN, or Infinity.","commonSituations":"Budget written as a quoted string in JSON/YAML (\"budgetUsdMonthly\": \"50\"); a missing numeric field; a value computed from bad arithmetic producing NaN; a config that uses null as a placeholder.","solutions":["Read the error path and field name to identify which numeric field is malformed","Ensure numeric fields are written as bare JSON numbers, not quoted strings","Run validatePodTemplate() during CI on every pod template file"],"exampleFix":"// before:\n{ \"budgetUsdMonthly\": \"50\", ... } // string, throws\n\n// after:\n{ \"budgetUsdMonthly\": 50, ... } // bare number","handlingStrategy":"validation","validationCode":"import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';\n\ntry {\n  const pod = validatePodTemplate(parsedJson);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError) {\n    console.error(`Field type error at ${e.path}: ${e.message}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"import { validatePodTemplate, PodTemplateValidationError } from '@claude-flow/cli/business-pods/pod-schema';\n\ntry {\n  const pod = validatePodTemplate(raw);\n} catch (e) {\n  if (e instanceof PodTemplateValidationError) {\n    console.error(e.message); // names the field and its expected type\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Write numeric fields as bare JSON numbers, never quoted strings","Validate pod templates in CI with validatePodTemplate()","Guard against NaN from Number() coercion before constructing template objects"],"tags":["validation","pod-template","schema","numbers"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}