fix(history): isolate consolidation sessions - #9036
Conversation
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- src/kiro_crew/history_consolidation.py:1957 -- in-method |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of All design questions are answered. One real gap remains: Design-Verdict: CONCERNS Sound split along an existing precedent, but the owning session spec still documents the old Watch
Suggestions
[DESIGN-REVIEWED] f7e44aa |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of All mechanisms verified. I have what I need: the defect's provenance, the existing First-Principles-Verdict: CONCERNS The "consolidation" telemetry label re-implements Not justified as shipped
What this change shipsIntent: stop long history-consolidation turns and short background micro-jobs from queueing on one shared session — a FIX.
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] f7e44aa |
bcb40fa to
7ae8904
Compare
Long consolidation turns must not block shared background micro-jobs. Use a stateless persistent session with its own admission queue and recycle it under the same context policy.
7ae8904 to
f7e44aa
Compare
|
Rebased onto main Clean rebase — no conflicts. The diff is unchanged (9 files, +102/-30); the only drift main introduced was the removal of the Gates run locally on changed files only: Please review the rebase. A maintainer push makes the maintainer the last pusher, so a second approver is needed under the repo's last-push rule. Reply if anything looks wrong. |
Problem / Motivation
History consolidation uses the shared
_bgsession, coupling long memory extraction to latency-sensitive background micro-jobs.Why it matters
Lightweight maintenance queues behind consolidation even though it neither needs its context nor its admission path.
What changed
Use a persistent stateless
_consolidatesession with its own lifecycle and telemetry classification, while preserving current_bgbehavior.Pattern harvest
Rule candidate: long-running maintenance needs a distinct admission identity from latency-sensitive background work.
Tests
python -m pytest -q test/metrics/test_startup_channel_attrs.py test/test_background_turn_accounting.py test/test_history.py— 389 passed.What changed (motivation → approach → change)
N/A — covered by the existing
## What changedsection.Manual verification
N/A — focused automated coverage is sufficient.
Related Issues
N/A.
Checklist
Contribution License Agreement
N/A — template placeholder; no CLA wording is supplied.