MicroFish/backend/app
Christian Moellmann 895a5fbaee fix(interviews): accept stringified ints in all 4 subagent validators
Real LLMs (observed with anthropic/claude-haiku-4-5 on a 23-agent run)
sometimes return Likert values as JSON strings ('3' not 3). The 4 subagent
validators rejected this with isinstance(v, int), losing ~30% of agents at
N=23. Added a shared coerce_int helper in base.py that accepts ints and
numeric strings, rejects bools/floats/garbage, and is now used by:

- Longitudinal: response values 1-5
- Diversity: Q-sort placements -3..+3 and 6 Likert axes 1-7
- Delphi: R2 and R3 importance/plausibility 1-5
- Scenario: 4 dimensions 1-7

Validators now coerce in place so downstream code sees ints regardless of
the wire format. Added 8 tests (4 unit on coerce_int + 4 per-subagent
contract tests showing stringified values are accepted).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 14:03:34 +02:00
..
api fix(interviews): wire Zep updater/memory/hooks correctly for production runs (C1-C5) 2026-05-23 13:27:47 +02:00
models feat(interviews): add pydantic models for instruments and responses 2026-05-23 12:04:45 +02:00
services fix(interviews): accept stringified ints in all 4 subagent validators 2026-05-23 14:03:34 +02:00
utils test(interviews): end-to-end pipeline test + content-aware LLM stubs for all 4 subagents 2026-05-23 12:40:53 +02:00
__init__.py fix(interviews): wire Zep updater/memory/hooks correctly for production runs (C1-C5) 2026-05-23 13:27:47 +02:00
config.py feat(interviews): Flask blueprint /api/interview with task-based async + CSV export 2026-05-23 12:37:04 +02:00