MCPcopy Create free account
hub / github.com/idank/explainshell / _suspicious_aggregate

Function _suspicious_aggregate

tests/evals/llm/llm_eval.py:343–358  ·  view source on GitHub ↗
(
    base_agg: dict[str, Any], curr_agg: dict[str, Any]
)

Source from the content-addressed store, hash-verified

341
342
343def _suspicious_aggregate(
344 base_agg: dict[str, Any], curr_agg: dict[str, Any]
345) -> list[str]:
346 reasons: list[str] = []
347 for key, label, direction in _AGGREGATE_CHECKS:
348 before = base_agg.get(key, 0)
349 after = curr_agg.get(key, 0)
350 if before == after:
351 continue
352 delta = after - before
353 if direction == "down" and delta >= 0:
354 continue
355 if direction == "up" and delta <= 0:
356 continue
357 reasons.append(f"aggregate.{key} ({label}): {before} -> {after} ({delta:+})")
358 return reasons
359
360
361def _changed_page_metric_lines(old: dict[str, Any], new: dict[str, Any]) -> list[str]:

Callers 1

compare_runsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected