style(context): ruff-format context_broker.py (CI format gate on added files)

This commit is contained in:
Nick committed 2026-09-05 07:00:33 +01:00
1 parent a7f4f779d5
commit 311c052d43
1 file changed
+4 -11
+4 -11
View File
@@ -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)