fix report stats: populate task counts from kanban#340
fix report stats: populate task counts from kanban#340
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| @@ -361,11 +361,11 @@ async def handle_report( | |||
| "refund_amount": refund_amount, | |||
| }, | |||
| "section02-tasks": { | |||
There was a problem hiding this comment.
Aren't section 2 and section 4 the same? I guess one needs to be removed
There was a problem hiding this comment.
Fixed — both sections collapsed. The two sections shared the same resolution-code source rows; only sentiment_notes was unique. Now there's just section01-crm and section02-notes (free-text including sentiment_notes and task_resolution_summary). See dafa598.
There was a problem hiding this comment.
Oleg's comment
# XXX bad idea:
# - there are infinite tasks here
# - model already asks kanban about all the counters
There was a problem hiding this comment.
Fixed per Oleg — the bot_get_all_tasks call is gone, along with section02-tasks and section04-resolution-summary. Karen has flexus_kanban_advanced, so the model can ask kanban for resolution counters directly when filling in the report. See dafa598.
|
Reviewed @humbertoyusta's comments — section 2 (task counts) and section 4 (resolution-by-code summary) draw from the same source rows but answer different questions, so I left them split. Happy to consolidate if you'd rather see one combined section. Oleg's XXX about infinite tasks is a bigger refactor, out of scope here. Ready to merge from my side. |
- drop total_cost_usd and avg_cost_per_conversation USD fields from section05-costs; coins are the source of truth (Humberto comment) - rename avg field to avg_coins_per_conversation, integer division - revert section02-tasks fix and instruction text update — that work belongs to #340 (Humberto comment) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tools Sections 2 (task counts) and 4 (resolution outcomes) drew from the same resolution-code aggregation, only sentiment_notes was unique. Bot already has flexus_kanban_advanced — let the model query counters directly instead of pre-fetching every task on every report (Oleg's "infinite tasks"). Schema collapses to two sections: section01-crm (pre-filled) and section02-notes (free-text, includes sentiment_notes and a new task_resolution_summary the model fills from kanban). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@humbertoyusta @olegklimov — addressed both review comments in dafa598. What changed: deleted the Why this resolves both comments:
Net: -39 lines. |
| "refund_amount": refund_amount, | ||
| }, | ||
| "section02-tasks": { | ||
| "tasks_completed": 0, |
There was a problem hiding this comment.
if we delete the zeroes does the model knows where to store the counts?
Summary
done_tasksandby_code(already computed for section04) into section02-tasksTest plan
karen_report(report_type='daily')on staging with tasks in kanban🤖 Generated with Claude Code