{"record":{"id":"28f2619acc9773ca","repo":"ruvnet/ruflo","slug":"pod-template-at-path-field-key-must-be-a-28f261","errorCode":null,"errorMessage":"pod-template at ${path}: field \"${key}\" must be a boolean","messagePattern":"pod-template at (.+?): field \"(.+?)\" must be a boolean","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":112,"sourceCode":"  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  }\n  return v.map((item, idx) => itemValidator(item, `${path}/${key}[${idx}]`));\n}\n\nfunction validatePodAgent(item: unknown, path: string): PodAgent {\n  if (!isObject(item)) throw new PodTemplateValidationError('agent must be an object', path);\n  return {\n    role: requireString(item, 'role', path),\n    agentType: requireString(item, 'agentType', path),","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L94-L130","documentation":"Thrown by the requireBoolean() helper inside the pod-template schema validator. Fires when a required boolean field is present but not the boolean type (e.g., the string \"true\", a number 1, or undefined). Used for preferLocalExecution (top-level) and preferLocal (per-agent).","triggerScenarios":"validatePodTemplate() encounters preferLocalExecution or an agent's preferLocal whose value is a string, number, undefined, or null.","commonSituations":"YAML parsers producing quoted strings (\"true\") instead of booleans; a template authored with 1/0 integer flags; a field accidentally omitted from a hand-written template.","solutions":["Read the error path to find which boolean field is malformed (top-level preferLocalExecution or a nested agent.preferLocal)","Use literal true/false in YAML and JSON — avoid quotes around boolean values","If using a YAML parser, ensure it applies YAML 1.1 boolean coercion or pre-coerce the values"],"exampleFix":"// before (YAML):\npreferLocalExecution: \"true\"  # string, throws\n\n// after:\npreferLocalExecution: true   # boolean","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(`Boolean field 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);\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Use literal true/false in JSON and YAML for boolean fields — avoid quotes","If using a YAML parser, confirm it applies boolean coercion (YAML 1.1 vs 1.2 differ)","Validate templates with validatePodTemplate() before deployment"],"tags":["validation","pod-template","schema","type-coercion","booleans"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}