Skip to content

fix(reporting): stop validate from repeating its header in short terminals - #368

Merged
chrisknvidia merged 16 commits into
mainfrom
fix/christopherk/validate-repeated-header
Nov 13, 2026
Merged

chrisknvidia merged 16 commits into
mainfrom
fix/christopherk/validate-repeated-header

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #367; review that one first.

validate repeated its header box during a run in two cases:

  1. Short windows: the Rich Live region held the whole view with vertical_overflow="visible". Once it grew taller than the terminal, Rich could not erase it, so every redraw left another copy behind (5 headers in a 24-row window on main; reported as about 30 on a laptop terminal).
  2. Log warnings mid-run: log records printed through a second Rich console, which wrote past Live's stdout proxy and left stale frame lines.

Fix:

  • The header prints once before Live starts, and only tiers that are still running stay in the live region. _flush_static() prints each finished tier once and drops it from the live region before it prints.
  • While the view is live, logging_config.route_logs_to() sends log records through the view's console; stop() resets it.
  • The tier progress line now prints once at the end, above the verdict, instead of updating live.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (test_live_view_draws_the_header_and_finished_tiers_once fails on main with 11 headers)
  • Updated documentation for user-visible changes
  • Ran make lint (Ruff check on changed files)
  • Ran make test (tests/reporting, tests/golden, banner, skip and OSS-boundary tests: 1959 passed)
  • Ran make build (python -m build: sdist and wheel built)
  • Did not add credentials, private datasets, or proprietary benchmark content

Real terminal runs (tmux), header copies per run:

run window main this PR
full validate (Tiers 1-3, real agent) 24 rows 5 1
full validate 15 rows - 1
full validate 80 rows 1 1
--llm with a warning mid-run 24 rows 2 1

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

When only the LLM stage of a check could not run, what to fix now prints the export lines for the missing provider or key, the scanners row keeps the scanner version, and the summary counts the named checks plus sub-checks instead of validators.

Signed-off-by: Christopher Kevin <[email protected]>
…inals

Only the running tier stays in the Rich Live region; the header and finished tiers print once, and log records route through the live console, so redraws taller than the window or a mid-run warning no longer leave copies of the header behind.

Signed-off-by: Christopher Kevin <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: 2 findings (0 P1, 1 P2, 1 P3); 2 posted inline.

devin-ai-integration[bot]

This comment was marked as resolved.

… ran

A missing SkillSpector or rejected baseline under --llm records
skillspector-llm before any scan runs, so it was treated as an LLM-only
failure and asked for a provider instead of the scanner. Treat the stage as
LLM-only only when the static scan recorded its version.

Also:
- name SKILLSPECTOR_PROVIDER's own key when it picks an adapter directly,
  instead of advising on the public provider
- give export lines for OPENAI_API_KEY / SKILL_EVAL_LLM_API_KEY when both
  are unset
- count a --skip inside a check that still ran (secrets in code-integrity)
  as skipped
- after --fail-fast stops the run, count the lineup checks it never reached
  as not run, so the denominator matches the ticker
- keep the changelog entry under the existing Fixed heading

Signed-off-by: Christopher Kevin <[email protected]>
…ate-repeated-header

Combine the live-region change with the progress handling that arrived from
main through the parent branch:

- Keep the header printed once and only unfinished tiers in the live region
  when the terminal can redraw; other streams keep the plain progress
  reporter and print finished tiers once, as before.
- Close the progress reporter in stop(), which finish() now calls before it
  prints the verdict.
- Give the live-view tests a stream that reports itself as a terminal.
- Move the changelog entry to the top of the existing Fixed section.

Signed-off-by: Christopher Kevin <[email protected]>
The two live-view tests build a forced-terminal Rich console with no colour
system. Without COLORTERM/TERM set (as in CI) it detects the standard palette,
and rendering the tier titles caches that colour code on a Style object that
the banner colour test later reuses, so test_banner_respects_terminal_color_capabilities
got the 16-colour code. Build these consoles with color_system=None; Live still
runs because the terminal is forced.

Signed-off-by: Christopher Kevin <[email protected]>
…verdict line

The summary row counted named checks while the verdict line under it (and
the HTML Tier 1 chip) count validators, so a plain run showed 9/9 above and
"11 of 11" below. With --skip and --fail-fast the two also drifted, and the
named-check count needed special cases for partial skips and for checks that
are not applicable.

Count validators with the verdict's own classification instead, keep the
sub-check count, and drop the lineup-based not-run count. The ticker above
still lists the named checks. Add tests that compare the row with
TierPresentation, and real-validator tests for --llm without a usable
SkillSpector (not installed, bad path override, bad baseline) and for
SKILLSPECTOR_PROVIDER=bedrock.

Signed-off-by: Christopher Kevin <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 74bec2b22f53 against its stacked #367 base, covering Live lifecycle, completed-tier flushing, log routing/reset, and the non-TTY progress branch. All 30 tests in the changed reporting test file passed locally. The previous TTY/color and main-integration fixes are present; no new actionable finding in this diff.

Keep this PR's changelog bullet and tests next to main's new ones. The
hook-gate test added on main expects the summary wording this PR changes
("checks passed"), so update its expected text.

Signed-off-by: Christopher Kevin <[email protected]>
Base automatically changed from fix/christopherk/validate-fix-lines to main November 13, 2026 17:42
#367 landed on main as a squash, so take main's changelog and keep only this
PR's entry, and keep this PR's live-view tests next to main's.

Signed-off-by: Christopher Kevin <[email protected]>
@chrisknvidia
chrisknvidia merged commit e40abf2 into main Nov 13, 2026
27 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/validate-repeated-header branch November 13, 2026 18:28
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.

2 participants