Repository navigation
fix(insights): scope async targeted rebuilds - #3701
Conversation
Keep async session-insight refreshes bounded to affected thread roots and provider-day aggregates. Preserve untouched rollups and threads while committing completed chunked work consistently with the synchronous path.
…4-scope-async-targeted-insight-rebuild
|
Warning Review limit reached
Next review available in: 10 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
…4-scope-async-targeted-insight-rebuild
Summary\nRecord the two recovered bootstrap lanes as closed in Beads after their code PRs landed.\n\nProblem\nThe durable task records remained open after PR #3699 and PR #3701 merged.\n\nSolution\nClose polylogue-eizc with the v63 threads_fts removal evidence and polylogue-lyv4 with the async targeted rebuild evidence.\n\nVerification\nThe Beads pre-push hook validated the JSONL and dependency graph with zero unhandled findings.
Summary
Keep asynchronous targeted session-insight rebuilds scoped to the requested sessions' affected thread roots and provider-day aggregates.
Problem
rebuild_session_insights_async(..., session_ids=[...])still entered the full-rebuild aggregate path. It deleted and rebuilt every thread and tag rollup even when the caller requested one session, and its final aggregate work was not committed consistently with the synchronous path. Refpolylogue-lyv4.Solution
Capture old and refreshed profile groups for the target subset, track degraded sessions, rebuild only affected non-degraded thread roots, refresh only the union of affected provider-day groups, and commit the targeted aggregate phase when chunk commits are enabled. Full rebuild behavior remains on its existing archive-wide path.
Verification
devtools test tests/unit/storage/test_session_insight_refresh.py -k 'targeted_session_insight_rebuild_async or async_large_session_rebuild_uses_bounded_degraded_profile': 2 passed, 31 deselected.devtools verify --quick: exit 0, 22 checks passed.test_targeted_session_insight_rebuild_moves_tag_rollup_between_daysfailed with current-master bucket semantics (2026-04-03actual versus2026-04-01expected); this branch does not alter that synchronous path.