diff --git a/src/rune/context_broker.py b/src/rune/context_broker.py index 61876f26..c16d4724 100644 --- a/src/rune/context_broker.py +++ b/src/rune/context_broker.py @@ -315,14 +315,10 @@ def compact_history( *new_older, ] summary_text = ( - summarizer(combined) - if summarizer is not None - else summarize_history(combined, num_ctx=window) + summarizer(combined) if summarizer is not None else summarize_history(combined, num_ctx=window) ) else: - summary_text = ( - summarizer(older) if summarizer is not None else summarize_history(older, num_ctx=window) - ) + summary_text = summarizer(older) if summarizer is not None else summarize_history(older, num_ctx=window) except Exception as exc: from rune.subsystem_health import record_failure @@ -479,13 +475,10 @@ class ContextBroker: # otherwise crash the measure step with a raw TypeError outside # the T1 degrade path. content_ok = isinstance(block.content, str) or ( - isinstance(block.content, list) - and all(isinstance(m, dict) and "content" in m for m in block.content) + isinstance(block.content, list) and all(isinstance(m, dict) and "content" in m for m in block.content) ) if not content_ok: - exc = TypeError( - f"contributor {name!r} returned malformed content: {type(block.content).__name__}" - ) + exc = TypeError(f"contributor {name!r} returned malformed content: {type(block.content).__name__}") record_failure(name, exc, tier=1) if name not in degraded: degraded.append(name)