Fix 'list' object has no attribute 'upper' error occurring in the learning pipeline's error analysis path. Two locations were affected:
error_analysis/extractors.py:209 — call.request.get("app") or call.request.get("toolkit") can return a list instead of a string. Added isinstance check with str() fallback (matching the existing guard at line 198).
database/repository.py:94 — plan.toolkits_required elements can be non-string (nested lists from LLM output). Added isinstance(tk, str) filter in the generator expression.
These defensive guards prevent the error analysis from crashing on sessions with unexpected data shapes, which was causing ~1 error analysis failure per cycle (17/day in keyword logs).
ruff check and ruff format --check on both changed files — all passed[ERROR] Error analysis failed: 'list' object has no attribute 'upper' in service:learning-pipelineOrigin: cron-5d55c321e47a / zen-cron-ff6e05e8f051