Skip to content

Commit a109938

Browse files
andriidudarclaude
andauthored
[NA] [BE] feat: add task tiling and chapter summaries to cipx_session_analysis (#8154)
* [NA] [BE] feat: add task tiling and chapter summaries to cipx_session_analysis The cost API's session analysis now emits two flat tilings per session — tasks and chapters — and a summary per chapter, task and session. Adds the columns for the three the create-table migration does not have. Numbered 000121: the table creation landed on main as 000120, so the number this was written against is taken. Co-Authored-By: Claude Code <noreply@anthropic.com> * chore(migrations): renumber the session-analysis migration to 000122 000121 was free when this branch opened; 000121_add_aiu_nano_to_cipx_tables has since merged to main. Different tables (cipx_spends / cipx_spend_blocks vs cipx_session_analysis), so the clash was the number alone. The changeset id moves with the filename. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent c271dde commit a109938

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--liquibase formatted sql
2+
--changeset andriid:000122_add_tasks_to_cipx_session_analysis
3+
--comment: Task tiling and chapter summaries for the cost API session analysis
4+
5+
ALTER TABLE ${ANALYTICS_DB_DATABASE_NAME}.cipx_session_analysis ON CLUSTER '{cluster}'
6+
ADD COLUMN IF NOT EXISTS `segments.summary` Array(String),
7+
ADD COLUMN IF NOT EXISTS `tasks.start_turn` Array(UInt32),
8+
ADD COLUMN IF NOT EXISTS `tasks.end_turn` Array(UInt32),
9+
ADD COLUMN IF NOT EXISTS `tasks.first_trace_id` Array(FixedString(36)),
10+
ADD COLUMN IF NOT EXISTS `tasks.last_trace_id` Array(FixedString(36)),
11+
ADD COLUMN IF NOT EXISTS `tasks.name` Array(String),
12+
ADD COLUMN IF NOT EXISTS `tasks.summary` Array(String),
13+
ADD COLUMN IF NOT EXISTS session_summary String DEFAULT '';
14+
15+
--rollback ALTER TABLE ${ANALYTICS_DB_DATABASE_NAME}.cipx_session_analysis ON CLUSTER '{cluster}' DROP COLUMN IF EXISTS `segments.summary`, DROP COLUMN IF EXISTS `tasks.start_turn`, DROP COLUMN IF EXISTS `tasks.end_turn`, DROP COLUMN IF EXISTS `tasks.first_trace_id`, DROP COLUMN IF EXISTS `tasks.last_trace_id`, DROP COLUMN IF EXISTS `tasks.name`, DROP COLUMN IF EXISTS `tasks.summary`, DROP COLUMN IF EXISTS session_summary;
16+

0 commit comments

Comments
 (0)