ruvnet/ruflo · error · PodTemplateValidationError
includedEventTypes entries must be non-empty strings
Error message
includedEventTypes entries must be non-empty strings
What it means
Thrown by the per-entry validator inside requireArray() for auditReadView.includedEventTypes. Every entry must be a string of length > 0; anything else — number, null, boolean, empty string — is rejected at the entry's own path (/auditReadView/includedEventTypes/<index>).
Source
Thrown at v3/@claude-flow/cli/src/business-pods/pod-schema.ts:162
return s;
});
if (successCriteria.length === 0) {
throw new PodTemplateValidationError('bench.successCriteria must have ≥1 entry', path);
}
const scheduleHours = requireNumber(item, 'scheduleHours', path);
if (scheduleHours < 1) {
throw new PodTemplateValidationError('bench.scheduleHours must be ≥1', path);
}
return { name, description, successCriteria, scheduleHours };
}
function validateAuditReadView(item: unknown, path: string): PodAuditReadView {
if (!isObject(item)) {
throw new PodTemplateValidationError('auditReadView must be an object', path);
}
const includedEventTypes = requireArray(item, 'includedEventTypes', path, (s, sp) => {
if (typeof s !== 'string' || s.length === 0) {
throw new PodTemplateValidationError('includedEventTypes entries must be non-empty strings', sp);
}
return s;
});
const retentionDays = requireNumber(item, 'retentionDays', path);
if (retentionDays < 1) {
throw new PodTemplateValidationError('auditReadView.retentionDays must be ≥1', path);
}
return { includedEventTypes, retentionDays };
}
// POSIX cron — five or six space-separated fields. Permissive on field
// contents (digits, *, -, /, ,) — actual cron evaluation happens at schedule
// time. We only catch obviously malformed values here.
const CRON_RE = /^([\d*/,\-]+\s+){4,5}[\d*/,\-]+$/;
/**
* Validate `json` and return a typed `PodTemplate`. Throws
* `PodTemplateValidationError` with a JSON-pointer-style path on failure.View on GitHub (pinned to fa13ee4ad6)
Solutions
- Replace non-string entries with their string event-type names (e.g. 1 -> "pod.started")
- Remove empty-string and null entries from the array
- Add a lint/test step that asserts every includedEventTypes entry matches /^\S+$/ before shipping the template
Example fix
// before "includedEventTypes": ["pod.started", 42, null] // after "includedEventTypes": ["pod.started", "budget.exceeded"]
Defensive patterns
Strategy: validation
Validate before calling
const evts = av.includedEventTypes;
const ok = Array.isArray(evts) && evts.every(e => typeof e === 'string' && e.length > 0);
if (!ok) throw new Error('includedEventTypes must be non-empty strings'); Type guard
function isNonEmptyStringArray(v: unknown): v is string[] {
return Array.isArray(v) && v.every(e => typeof e === 'string' && e.length > 0);
} Try / catch
try { validatePodTemplate(json); } catch (err) {
if (err instanceof PodTemplateValidationError && err.path.startsWith('/auditReadView/includedEventTypes/')) {
const idx = Number(err.path.split('/').pop()); // offending entry index
}
} Prevention
- Filter generated lists: arr.filter((e): e is string => typeof e === 'string' && e.length > 0)
- Map numeric event IDs to names at the boundary of your template pipeline
When it happens
Trigger: A template with includedEventTypes containing numeric event codes (e.g. [1, 2]), null entries, or "" (e.g. from programmatic generation or a hand-edited file with an empty slot).
Common situations: Mapping numeric event IDs from another telemetry system into the pod template, or scripts that join a possibly-empty list into JSON leaving "" placeholders.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- auditReadView must be an object
- auditReadView.retentionDays must be ≥1
- bench.scheduleHours must be ≥1
- roomId may only contain [A-Za-z0-9_.\-:/@#]
- agents must have ≥1 entry
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/f27a3a9766e96d32.
Report an issue: GitHub.