Repository navigation
refactor(insights): remove productivity rollups - #1556
Conversation
Problem: the productivity_rollups insight was a synthetic aggregation over construct-invalid engaged-duration and work-event kind labels. The #1511 audit found no dedicated storage table or external Lynchpin consumer, so keeping it exposed made the read-pull surface look more meaningful than it was.\n\nWhat changed: delete the productivity rollup model, registry entry, archive/API/sync operations, CLI/MCP generated surfaces, runtime artifact path, scenario mapping, and dedicated tests. This deliberately does not touch day_session_summaries, provider analytics, session enrichments, or WorkEventKind because those have real consumers or need paired replacement work.\n\nVerification: ruff format --check polylogue tests; ruff check polylogue tests; focused pytest for API/operation/artifact/scenario/MCP contracts: 182 passed; MCP witness pytest: 26 passed; devtools render-all --check; devtools verify --json: exit 0, 812 pytest-testmon tests passed.\n\nRef #1511
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR removes the ChangesProductivity Rollups Feature Removal
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Removes the
productivity_rollupsinsight surface after the #1511 consumer audit showed it had no dedicated storage table and no Lynchpin consumer. The surface was an aggregation over already-suspect timing and work-event labels, so keeping it public made Polylogue look more semantically confident than the substrate supports.Problem
productivity_rollupsexposed first-class CLI/MCP/API operations while deriving its meaning fromengaged_duration_msandsession_work_events.kind, both of which are under active construct-validity cleanup. Unlikeday_session_summariesorWorkEventKind, the audit found no cross-repo consumer requiring a paired Lynchpin migration.Solution
Deleted
polylogue/insights/productivity.py, its tests, and every public registration path: insight registry, archive operations, async/sync API mixins, operation specs, runtime artifact path, scenario mapping, MCP schema witness, and generated CLI/verification/topology docs.Deliberately left these in place because they are not dead standalone surfaces:
day_session_summaries/ week summaries: consumed by Lynchpin readiness and reader code.provider_analytics: still backs CLI summary and validation lanes.session_enrichments: still feeds resume/read-pull paths.session_work_events.kind/WorkEventKind: requires feat(insights): workflow_shape classifier (CHAT/EXPLORATORY/AGENTIC_LOOP/SUBAGENT_DISPATCH/BATCH_REVIEW) from observable features #1527/feat(insights): per-session terminal_state {clean_finish | error_left | question_left | tool_left | agent_hanging} #1528 replacements plus a paired Lynchpin migration.Verification
ruff format --check polylogue tests-> pass.ruff check polylogue tests-> pass.devtools render-all --check-> pass.devtools verify --json-> exit 0; 812 pytest-testmon tests passed.devtools verify --quick-> exit 0.Ref #1511
Summary by CodeRabbit
Documentation
Chores
polylogue insights productivitycommand