kin/tests
johnfrum1234 c129cf9d95 Fix output truncation bug, add language support for agent responses
Bug 1 — Output truncation:
  _run_claude() was replacing raw stdout with parsed sub-field which
  could be a dict (not string). run_agent() then saved dict.__repr__
  to DB instead of full JSON. Fixed: _run_claude() always returns
  string output; run_agent() ensures string before DB write.
  Added tests: full_output_saved_to_db, dict_output_saved_as_json_string.

Bug 2 — Language support:
  Added projects.language column (TEXT DEFAULT 'ru').
  Auto-migration for existing DBs (ALTER TABLE ADD COLUMN).
  context_builder passes language in project context.
  format_prompt() appends "## Language\nALWAYS respond in {language}"
  at the end of every prompt.
  CLI: kin project add --language ru (default: ru).
  Tests: language in prompt for ru/en, project creation, context.

112 tests, all passing. ~/.kin/kin.db migrated (vdol: language=ru).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 14:39:33 +02:00
..
__init__.py Add core/models.py — data access functions for all 9 tables 2026-03-15 13:16:12 +02:00
test_api.py Add task detail view, pipeline visualization, approve/reject workflow 2026-03-15 14:32:29 +02:00
test_bootstrap.py Fix bootstrap: deep scan, CLAUDE.md fallback, noise filtering 2026-03-15 13:37:42 +02:00
test_cli.py Add CLI (cli/main.py) — click-based interface for all core operations 2026-03-15 13:20:57 +02:00
test_context_builder.py Fix output truncation bug, add language support for agent responses 2026-03-15 14:39:33 +02:00
test_models.py Add core/models.py — data access functions for all 9 tables 2026-03-15 13:16:12 +02:00
test_runner.py Fix output truncation bug, add language support for agent responses 2026-03-15 14:39:33 +02:00