Skip to content

Round and align score means in the run summary, and show elapsed time - #32

Merged
rybosome merged 1 commit into
mainfrom
claude/run-summary-format
Oct 23, 2026
Merged

rybosome merged 1 commit into
mainfrom
claude/run-summary-format

Conversation

@rybosome

@rybosome rybosome commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Executive summary

The human summary from mic run is now easier to read. Score means are rounded to three decimals in an aligned Score table, and a new Elapsed line shows wall-clock time. Nothing else in the summary changes, and run.json and --json stay exact.

Before:

Status       completed
Trials       30 completed / 30 admitted
Failures     0 task, 0 scoring
necessity.exact: mean=0.976207729468599 count=30
necessity.false_unneeded: mean=0.0 count=30
necessity.unneeded_recall: mean=0.6666666666666666 count=12

After:

Status       completed
Elapsed      3:02
Trials       30 completed / 30 admitted
Failures     0 task, 0 scoring
Score        necessity.exact            mean 0.976  count 30
Score        necessity.false_unneeded   mean 0.000  count 30
Score        necessity.unneeded_recall  mean 0.667  count 12

Why

These summaries were hard to scan. Full float precision was shown, the metric lines were the only ones that didn't follow the labelled-column layout, and there was no indication of how long the run took. This is the third PR in the streaming-output work, agreed during the design discussion.

Design and implementation

  • Layout. Every line keeps a 12-column label, so the summary stays easy to grep (Score, Requirement, Source). Metric names and means are padded to their widest value so the columns line up.
  • Rounding (console._mean):
    • three decimal places by default;
    • exponent form for values that would round to 0.000 or are 1e6 or larger, e.g. 4.000e-04, so small and large values aren't flattened;
    • n/a when a metric has no recorded scores.
  • Requirement lines keep the exact actual value. Rounding there could print mean 0.900 next to FAIL …>=0.9. The test uses that exact case.
  • Elapsed time. The CLI measures wall-clock time around the run, including sink finishing, and passes it to format_summary(manifest, elapsed=...). It reuses the progress display's duration format (4.2s, 3:02). The manifest gets no new field, so there's no schema change. Python callers of format_summary without elapsed get no Elapsed line.
  • Docs. docs/cli.md now describes the human summary, its rounding and the exact requirement values. The README run example is updated.

Verification and confidence

  • New tests/reporting/test_console.py covers:
    • exact aligned output for the means from the original report (0.976, 0.667, 0.000);
    • exponent form for tiny and huge means, sign kept on negatives, n/a for empty metrics;
    • Elapsed placement and format, and its absence when no time is passed;
    • an exact requirement actual next to a rounded mean.
  • Updated assertions: the summary checks in test_html and the CLI acceptance test, including an end-to-end check of the Score line and the Elapsed line.
  • Manual previews: a suite run with a failing --require, a metric with no scores, and two sources all render as expected.
  • scripts/verify.py: 782 tests, 0 failures. Typing, lint, format and the coverage gates all pass. The Node report checks can't run locally (no Node); they passed in CI's full verification job, along with the Linux, macOS, Windows and distribution jobs.

Compatibility and risks

  • Human stdout output changes. Metric lines go from task.metric: mean=X count=N to Score task.metric mean X count N, and an Elapsed line is added after Status. Scripts that parse the human summary instead of --json would need updating; --json is the documented machine interface and is unchanged.
  • No changes to the Python API, artifact formats, exit codes or dependencies. format_summary gains an optional keyword-only argument.

Relationships and tracking

Builds on #30 (engine observer hooks) and #31 (live progress display), both merged; this PR targets main. It completes the planned stack.

Unverified or follow-up work

None.

🤖 Generated with Claude Code

The human summary printed raw floats such as mean=0.976207729468599 in ragged
"task.metric: mean=... count=..." lines. Score lines now follow the summary's
labelled-column style as an aligned "Score" table with means rounded to three
decimals (exponent form for values that would round to zero or are very large,
n/a when nothing was scored), and the CLI adds an "Elapsed" line measured
around the run.

Requirement lines keep the exact actual value so a rounded mean can never appear
to contradict PASS/FAIL. run.json and --json are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rybosome
rybosome changed the base branch from claude/run-progress-display to main October 23, 2026 22:53
@rybosome
rybosome merged commit 69f732d into main Oct 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant