{"record":{"id":"218dd37213a2f0b3","repo":"ruvnet/ruflo","slug":"pod-template-at-path-includedeventtypes-entrie","errorCode":null,"errorMessage":"pod-template at ${path}: includedEventTypes entries must be non-empty strings","messagePattern":"pod-template at (.+?): includedEventTypes entries must be non-empty strings","errorType":"validation","errorClass":"PodTemplateValidationError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/business-pods/pod-schema.ts","lineNumber":162,"sourceCode":"    return s;\n  });\n  if (successCriteria.length === 0) {\n    throw new PodTemplateValidationError('bench.successCriteria must have ≥1 entry', path);\n  }\n  const scheduleHours = requireNumber(item, 'scheduleHours', path);\n  if (scheduleHours < 1) {\n    throw new PodTemplateValidationError('bench.scheduleHours must be ≥1', path);\n  }\n  return { name, description, successCriteria, scheduleHours };\n}\n\nfunction validateAuditReadView(item: unknown, path: string): PodAuditReadView {\n  if (!isObject(item)) {\n    throw new PodTemplateValidationError('auditReadView must be an object', path);\n  }\n  const includedEventTypes = requireArray(item, 'includedEventTypes', path, (s, sp) => {\n    if (typeof s !== 'string' || s.length === 0) {\n      throw new PodTemplateValidationError('includedEventTypes entries must be non-empty strings', sp);\n    }\n    return s;\n  });\n  const retentionDays = requireNumber(item, 'retentionDays', path);\n  if (retentionDays < 1) {\n    throw new PodTemplateValidationError('auditReadView.retentionDays must be ≥1', path);\n  }\n  return { includedEventTypes, retentionDays };\n}\n\n// POSIX cron — five or six space-separated fields. Permissive on field\n// contents (digits, *, -, /, ,) — actual cron evaluation happens at schedule\n// time. We only catch obviously malformed values here.\nconst CRON_RE = /^([\\d*/,\\-]+\\s+){4,5}[\\d*/,\\-]+$/;\n\n/**\n * Validate `json` and return a typed `PodTemplate`. Throws\n * `PodTemplateValidationError` with a JSON-pointer-style path on failure.","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/business-pods/pod-schema.ts#L144-L180","documentation":"Thrown inside validateAuditReadView() while validating each element of the includedEventTypes array. Fires when an entry is not a string or is an empty string. includedEventTypes is the allow-list of audit event type names (e.g., 'reservation.committed') surfaced to the business-owner read view.","triggerScenarios":"validateAuditReadView() runs requireArray() on auditReadView.includedEventTypes, then maps each entry through a validator; an entry is not a string or is empty.","commonSituations":"An event-type entry is null, a number, an empty placeholder string, or a typo leaving an unfilled template variable (e.g., \"${EVENT_TYPE}\").","solutions":["Read the error path — it includes the index (e.g., /auditReadView/includedEventTypes[0]) of the bad entry","Ensure every entry is a non-empty event-type string matching the BudgetAuditSink emit event names (e.g., 'reservation.committed', 'reservation.released')"],"exampleFix":"// before:\n\"includedEventTypes\": [\"reservation.committed\", \"\"] // empty, throws\n\n// after:\n\"includedEventTypes\": [\"reservation.committed\", \"reservation.budget_exceeded\"]","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    // e.path includes the index, e.g. /auditReadView/includedEventTypes[0]\n    console.error(`includedEventTypes entry 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":["Ensure every includedEventTypes entry is a non-empty string matching a known BudgetAuditSink event type","Watch for unfilled template variables (e.g., ${EVENT_TYPE}) that produce invalid strings","Validate templates with validatePodTemplate() before deployment"],"tags":["validation","pod-template","schema","audit","strings"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}