cohorta/backend/app/services
Vadym Samoilenko 4c70bc8aa6 fix: PDF layout, credit idempotency, more active discussion
- PDF: meta_row redesigned to same-line two-column layout so values
  don't overflow the right edge; explicit cursor reset before each
  multi_cell body() call fixes key themes appearing to the right of
  titles; page numbers now use len(pdf.pages) + pdf.h-12 positioning
- Credits: replace fragile 4h credit_transactions lookup with atomic
  findOneAndUpdate stamp on the focus group doc itself (24h window),
  with rollback on insufficient balance — eliminates double-charging
  on crash/restart; CreditTransaction.record failure is now non-fatal
- Key themes: cap input at 80 messages + max_output_tokens=4096 to
  fix truncated JSON (Unterminated string at char 1580)
- Decision engine: require ≥4 participant responses per question before
  moving on; mandate debate/contrarian seeking after 2 agreements;
  call all participants to each question before anyone speaks 3rd time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 21:09:14 +01:00
..
ai_moderator_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
ai_persona_service.py feat: commit all app changes — billing API, new auth, design overhaul 2026-05-23 19:04:43 +01:00
ai_runner_service.py changed permissions 2025-12-19 19:26:16 +00:00
autonomous_conversation_controller.py fix(ai): silent participants + call_out sent as message + contrarian fix 2026-05-25 20:50:50 +01:00
bulk_persona_export_service.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00
conversation_context_service.py fix(backend): 4 fixes — await add_message, MODEL_ALIASES, language rule, PDF + silent participants 2026-05-25 20:46:39 +01:00
conversation_decision_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
conversation_state_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
customer_data_service.py feat: commit all app changes — billing API, new auth, design overhaul 2026-05-23 19:04:43 +01:00
email_service.py feat: compass/crosshair SVG decorations across landing page, fix email from noreply→hello 2026-05-23 23:06:42 +01:00
focus_group_response_service.py feat(personas): structural improvements for realistic focus group dialogue 2026-05-25 17:00:01 +01:00
focus_group_service.py feat: commit all app changes — billing API, new auth, design overhaul 2026-05-23 19:04:43 +01:00
focus_group_summary_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
image_description_service.py Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +00:00
key_theme_service.py fix: PDF layout, credit idempotency, more active discussion 2026-05-25 21:09:14 +01:00
llm_service.py fix: PDF layout, credit idempotency, more active discussion 2026-05-25 21:09:14 +01:00
llm_usage_context.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
persona_export_service.py feat: commit all app changes — billing API, new auth, design overhaul 2026-05-23 19:04:43 +01:00
persona_modification_service.py feat: commit all app changes — billing API, new auth, design overhaul 2026-05-23 19:04:43 +01:00
stripe_service.py fix(usage): hide real costs from users — show credit balance, MTD spend, transaction history 2026-05-25 13:32:28 +01:00
task_manager.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00