fix: add status_update to step_type CHECK constraint

The generate_status_update service inserted AISessionStep with
step_type='status_update' which violated the DB CHECK constraint,
causing a 500 error. Also fix incorrect field name confidence_score
(should be confidence_at_step) and remove nonexistent confidence_tier.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-29 06:35:11 +00:00
parent 2c8aca3951
commit d6d1002172
3 changed files with 33 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ class AISessionStep(Base):
__table_args__ = (
CheckConstraint(
"step_type IN ('question', 'action', 'script_generation', 'verification', "
"'info_request', 'note', 'intake_analysis', 'fork')",
"'info_request', 'note', 'intake_analysis', 'fork', 'status_update')",
name="ck_ai_session_steps_step_type",
),
)