Add CompressionFailurePolicy so a summarizer error no longer aborts the run#39
Conversation
…he run ContextCompressionMiddleware propagated a Summarizer error through before_model, failing the whole run exactly on the longest transcripts that reached the compaction threshold. Add a CompressionFailurePolicy (Abort | FallbackTrim | PassThrough) on the middleware, defaulting to a deterministic front-drop trim to the policy's trigger budget (system messages preserved) and emitting a MiddlewareFailed diagnostic on fallback. Add tests covering all three policies with a failing summarizer.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Comment |
collapsible_if in StreamAccumulator::push_tool_chunk and a duplicated #[cfg(test)] on the stream test module both fail CI's cargo clippy --all-targets -- -D warnings under rust 1.96. Behavior-neutral.
|
CI guardian: the |
ContextCompressionMiddlewarepropagated aSummarizererror throughbefore_model, aborting the whole run — precisely on the longest transcripts that reached the compaction threshold. The defaultConcatSummarizercan't fail, so the gap was invisible in tests, but the trait allowsErr.This adds a
CompressionFailurePolicy(Abort | FallbackTrim | PassThrough) on the middleware, defaulting to a deterministic front-drop trim to the policy's trigger budget (system messages preserved) and emitting aMiddlewareFaileddiagnostic on fallback. Tests cover all three policies with a failing summarizer.Commands run:
cargo fmt,cargo test --lib(998 passed),cargo clippy --lib --tests -- -D warnings(clean for this change). Note: there is one pre-existing, unrelated clippycollapsible_ifdenial insrc/harness/model/mod.rsfrom the current HEAD (#34), surfaced only by newer clippy; left untouched to keep this change focused.Closes tinyhumansai/openhuman#4640