Kida 0.2.7

Fail-fast filter errors, typeof, nested slot passthrough fixes, and clearer runtime suggestions

Status: Released March 12, 2026.

Kida 0.2.7 focuses on safer filter behavior, clearer runtime guidance, and a fix for nested slot passthrough in component-style templates.

Highlights

  • Fail-fast filter behaviorjoin and reversenow require iterable input instead of silently stringifying scalars.
  • Numeric coercion improvementsreplacecoerces string counts from YAML/config, and decimal / format_number support strict=truefor explicit failures.
  • typeof filter — Inspect incoming template values with normalized names like bool, int, float, path, list, dict, none, and str.
  • Macro collision diagnostics — Better runtime messages when imported macros shadow context variables and are accidentally used as iterables.
  • Nested slot passthrough fix — Empty or whitespace-only inner slots now delegate correctly to the outer caller.

Added

Type Inspection

  • typeoffilter — New debugging filter for mixed template/config data.

Diagnostics

  • Macro iteration error guidance — Imported macros now raise a targeted error with a naming recommendation such asrender_route_tabswhen a macro shadows a context variable.

Changed

  • join and reverse filters (breaking) — Non-iterable input now raises TypeErrorinstead of falling back to stringification.
  • pluralize — Non-numeric input now raises with a suggestion to coerce using | int.
  • replacecountnow accepts YAML/config strings that can be coerced to integers and raises on invalid values.
  • decimal and format_number — Both filters add strict=truefor explicit conversion failures.
  • Runtime suggestions — Error enhancement now recognizes macro iteration collisions,%vs {} format mistakes, invalid numeric literals, strftimeformatting issues, and sequence-only filters.

Fixed

  • Nested slot passthrough — In nested{% def %} / {% call %} / {% slot %}chains, empty or whitespace-only inner slot bodies now delegate to the outer caller instead of swallowing the outer slot content.

Upgrade Notes

  1. Check templates usingjoin or reverseon scalars — Convert values to iterables first.
  2. Prefer explicit numeric coercion for config-driven values| int and | floatmake intent clearer.
  3. Avoid macro/context name collisions — Use verb-prefixed macro names and noun-like context variable names.