MicroFish/backend
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
..
app fix(interviews): accept stringified ints in all 4 subagent validators 2026-05-23 14:03:34 +02:00
scripts feat(interviews): scenario subagent with 4 futures × 4 dimensions + polarity matrix 2026-05-23 12:21:21 +02:00
tests fix(interviews): accept stringified ints in all 4 subagent validators 2026-05-23 14:03:34 +02:00
pyproject.toml chore(interviews): add deps and pytest scaffold for interview subsystem 2026-05-23 12:00:09 +02:00
pytest.ini chore(interviews): add deps and pytest scaffold for interview subsystem 2026-05-23 12:00:09 +02:00
requirements.txt fix(file_parser): handle non-UTF-8 encoded text files with automatic encoding detection 2026-01-22 18:28:37 +08:00
run.py Add UTF-8 encoding support for Windows console in run.py and logger.py to prevent character encoding issues 2025-12-26 17:58:48 +08:00
uv.lock chore(interviews): add deps and pytest scaffold for interview subsystem 2026-05-23 12:00:09 +02:00