From 89f950d8a01054ffbf518583b71693dc42d1f74f Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Thu, 10 Sep 2026 11:06:41 +0000 Subject: [PATCH] Narration lines uniformly uncolored (phase prints drop cyan, rich number auto-highlight off); color reserved for results/errors only Co-Authored-By: Claude --- evalharness/cli.py | 9 ++++----- evalharness/progress/rich_terminal.py | 6 ++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/evalharness/cli.py b/evalharness/cli.py index ef60337..606f654 100644 --- a/evalharness/cli.py +++ b/evalharness/cli.py @@ -199,13 +199,12 @@ def _print_run_plan(console, args, model_spec): def _print_phase(console, index, total, name, message): - # single-benchmark runs: the [1/1] tag is noise, drop it + # single-benchmark runs: the [1/1] tag is noise, drop it. + # narration lines stay UNCOLORED everywhere (matches reporter.log and + # the runner's plain prints): color is reserved for ✓/✗/errors only prefix = f'[{index}/{total}] ' if total > 1 else '' text = f'{prefix}{name}: {message}' - if console is not None: - console.print(f'[cyan]{text}[/cyan]') - else: - print(text, flush=True) + print(text, flush=True) def _print_benchmark_result(console, index, total, name, status, elapsed): diff --git a/evalharness/progress/rich_terminal.py b/evalharness/progress/rich_terminal.py index fcb40a1..d84144e 100644 --- a/evalharness/progress/rich_terminal.py +++ b/evalharness/progress/rich_terminal.py @@ -157,10 +157,12 @@ class RichTerminalProgress: interleaved/repainted output; Progress.print routes through the live region correctly. """ + # highlight=False: rich auto-colorizes numbers, which made narration + # lines look inconsistent (some numbers cyan, some plain) if self.task_id is not None: - self.progress.print(message) + self.progress.print(message, highlight=False) else: - self.console.print(message) + self.console.print(message, highlight=False) def pause(self): """Temporarily stop the live display (e.g. while hub downloads print