Skip to content

Polish terminal reports and keep CI progress durable - #353

Merged
rng1995 merged 34 commits into
mainfrom
naren/reporting-cli-polish
Nov 6, 2026
Merged

rng1995 merged 34 commits into
mainfrom
naren/reporting-cli-polish

Conversation

@rng1995

@rng1995 rng1995 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Final terminal reports need readable scores, consistent NVIDIA colors, real artifact destinations, and durable CI progress. Share semantic styles and preserve each condition's label, score, and complete bar at 98, 80, and 60 columns.

  • Preserve grade mapping, neutral displayed zero lift, unavailable comparisons, and concise successful quality/lift evidence.
  • Use actual emitted paths and safe links only for capable interactive terminals; keep capture, redirected, plain, no-color, legacy, and invalid-Unicode paths readable.
  • Require a real capable TTY for Live, including when CI forces color. Keep final reports on stdout and durable events on stderr.
  • Reuse deduplicated stage/measured milestones and the 60-second idle heartbeat; preserve cleanup on completion, exceptions, interruption, and closed streams.
  • Reject malformed optional numeric evidence without changing recorded scores or canonical data.

Stacked on #351 (naren/reporting-status-accounting).

Scoring formulas, thresholds, publication policy, exit codes, command-line options, artifact filenames, canonical JSON, redaction, and report-size limits are preserved. No internal integrations or plugin-specific implementation were copied.

Verification

  • Familiar with the Contributing Guidelines; all commits signed off.
  • Added focused regressions and updated report documentation.
  • Root self-review and independent review; all confirmed findings fixed and re-reviewed.
  • Final assembled focused selection: 381 passed.
  • Ran make test on the final combined source; result below.
  • make lint and make build passed; wheel/source archives and package metadata verified.
  • Fern validation: zero errors and the existing unauthenticated redirects warning; OSS source/archive and public benchmark checks passed.
  • No credentials, private datasets, proprietary benchmark content, or internal integrations added.

Final assembled make test: 24,962 passed, 35 skipped, no failures, in 348.53 seconds on Python 3.14 with four workers and repository default marker exclusions. Exact clean integration: 25fd11aaf18033b5fdc287e83c0431a69acb34f3.

Actual installed-wheel verification covered 1440, 761, 760, 421 and 390px layouts in both themes, generous text spacing, paired provenance, mixed required/advisory summaries, section/agent links, print/no-JavaScript and keyboard behavior. The latest evidence delta passed 24 fixture observations; the final chart delta passed 14 browser/offline/native-CSP cases, including collapsed and missing-runtime data links, JSON downloads and 16 painted chart observations. No runtime/CSP errors, page-wide overflow or network attempts were observed. Shared navigation assets match the six-scenario verified source; broad earlier layout/evidence matrices were retained rather than needlessly repeated.

Current-head GitHub checks are not all complete; this PR remains draft. The PR checks tab shows live status.

Review

Reviewed numeric projection, terminal capabilities, native path escaping, capture/Live lifecycle, width fitting, progress deduplication, heartbeat timing, and cleanup. Confirmed findings are fixed and independently re-reviewed. The latest terminal/progress selection passed 239 tests. Native Windows checks passed on the current CLI head.

All five PR discussions and review threads were checked: there are no review comments or unresolved threads. The combined changes were validated in isolated integration 25fd11aaf18033b5fdc287e83c0431a69acb34f3 without merging any PR into main. Leave open for human review.

Release Impact

  • Updated CHANGELOG.md.

@rng1995
rng1995 marked this pull request as ready for review November 6, 2026 02:55
rng1995 and others added 5 commits November 5, 2026 19:00
The Windows CI job failed both footer-link tests because they used
"/tmp/actual [name].html". On Windows that path has no drive, and
_artifact_uri deliberately leaves drive-relative paths unlinked, so no
OSC 8 hyperlink was emitted. Build the path from the current drive's
anchor so the tests exercise a real absolute path on every platform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

# Conflicts:
#	tests/reporting/test_terminal_polish.py
Rich detects a legacy Windows console on CI runners without VT support,
and Style.render never emits OSC 8 hyperlinks in that mode. The two
footer-link tests simulate a capable terminal, so pin legacy_windows=False
on their consoles. Legacy conhost still correctly gets plain text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
@rng1995
rng1995 marked this pull request as draft November 6, 2026 03:27
rng1995 and others added 5 commits November 5, 2026 19:31
Signed-off-by: Narendran Raghavan <[email protected]>

# Conflicts:
#	tests/reporting/test_terminal_polish.py
Review follow-ups for the status and accounting changes:

- Trial coverage reads the payload-level skip markers. A --skip-baseline
  run (mode "with_skill_only") omits the baseline condition, and an
  advisory Tier 3 skip has execution_status "skipped" with no agents.
  Both previously reported "scored trials unavailable"; they now report
  the arm as skipped, and the terminal summary omits the coverage line
  for a skipped Tier 3.
- A standalone Tier 3 report has no gating metadata, so a failing or
  incomplete Tier 3 verdict now drives the header, which had turned green
  beside a "Changes required" tile.
- Terminal N/A rows show their recorded reason instead of "1 checks
  passed" or "Skipped (see warnings)", and tier/coverage lines soft-wrap
  so counts are not split at narrow CI widths.
- Read the projection report as UTF-8 for the Windows job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Review follow-ups for the terminal polish changes:

- ValidateView uses Live only on a real, capable TTY, matching Harbor
  progress. FORCE_COLOR and TTY_COMPATIBLE make Rich treat a CI pipe as a
  terminal, which sent cursor-control frames to stdout and left stderr
  with no durable progress or heartbeat. The tests that assumed a
  non-terminal console now pass under forced colour too.
- Durable Tier 3 progress lines log "3/8 attempts" without the Live bar
  cells, which became escape noise on a cp1252 Windows stderr.
- Build Windows file URIs without PurePath.as_uri(), deprecated in
  Python 3.14 and due for removal in 3.19; the URI is unchanged.
- Compact dimension tables keep multi-agent header rows free of empty
  "With Skill / No Skill / Lift" lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

@chrisknvidia chrisknvidia 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 the terminal report changes and the CI progress heartbeat, including its start/stop lifecycle and redaction. Nothing blocking: the heartbeat stops on every exit path in the tests, and progress lines don't carry secrets.

chrisknvidia and others added 3 commits November 6, 2026 07:36
Resolve the CHANGELOG.md conflict: main and this PR each started a
"### Changed" list under Unreleased after 0.8.0. Keep one heading, with
main's CI redaction entry (#348) first and this PR's entries after it.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve CHANGELOG.md by keeping both Unreleased entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Base automatically changed from naren/reporting-status-accounting to main November 6, 2026 19:04

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review findings and fixes

An independent review of this PR found 5 issues: 2 P2 and 3 P3. All five are fixed in 72ba2a1. Each new test fails on the previous head and passes now.

# Severity Finding Fix
F1 P2 Durable stderr progress turned on only when console.is_terminal was False. Rich reports True for a CI pipe under FORCE_COLOR/TTY_COMPATIBLE, and for TERM=dumb. In those cases Live redraw frames went to stdout and nothing durable reached stderr. A new _live_capable() check uses Live only when the console is a terminal, is not dumb, and its file is a TTY. Otherwise output falls back to durable progress, the same rule Harbor progress uses. _flush_static uses the same check.
F2 P2 Three new tests assumed a non-terminal console, so they failed whenever colour was forced. Fixed by F1. They now pass with and without FORCE_COLOR.
F3 P3 The durable Tier 3 progress line included the 10-cell bar, which turns into escape noise on a cp1252 Windows stderr. The progress row logs only the count (for example 3/8 attempts).
F4 P3 PureWindowsPath.as_uri() is deprecated in Python 3.14 and due for removal in 3.19. The Windows file URI is built directly and comes out the same.
F5 P3 Compact dimension tables put "With Skill / No Skill / Lift" labels on multi-agent header rows whose cells are empty. Rows whose cells after the first are all empty get no condition labels.

CI: Windows footer-link tests

Tier 2 (windows-latest) failed both footer-link tests. There were two causes:

  • ab129b1: the tests used /tmp/..., which has no drive on Windows. _artifact_uri deliberately leaves drive-relative paths unlinked. The tests now build the path from the current drive.
  • b56db0d: the runner has no VT console, so Rich runs in legacy Windows mode, where Style.render never emits OSC 8 links. The tests model a capable terminal with legacy_windows=False. A real legacy console still gets plain text.

With both commits, Tier 2 (windows-latest) passes.

New tests in tests/reporting/test_terminal_polish.py:

  • test_forced_terminal_pipe_keeps_durable_progress_instead_of_live
  • test_durable_tier3_progress_logs_the_count_without_bar_cells
  • test_windows_artifact_uri_avoids_deprecated_pure_path_as_uri
  • test_compact_dimension_table_keeps_agent_headers_free_of_condition_labels

Bring in main up to 0205909, the commit before #351 was squash-merged.
No conflicts.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rng1995
rng1995 marked this pull request as ready for review November 6, 2026 19:10
#351 was squash-merged as dd27412. This branch already contains #351's
final head 9e092ff, and the squash commit's tree is identical to merging
9e092ff into its parent 0205909, which this branch now also contains.
Recording the squash as merged with -s ours therefore adds no content and
drops none; it only stops main's copy of #351 from conflicting with the
copy this branch already has.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rng1995
rng1995 enabled auto-merge (squash) November 6, 2026 19:20
@rng1995
rng1995 merged commit f440bbd into main Nov 6, 2026
22 checks passed
@rng1995
rng1995 deleted the naren/reporting-cli-polish branch November 6, 2026 19:48
rng1995 added a commit that referenced this pull request Nov 7, 2026
Resolve conflicts with #350, #353 and #371:

- CHANGELOG.md: take main's Unreleased layout and add this branch's
  Tier 2 evidence, reading-room and navigation entries under Changed.
  The PII digest and outcome-alignment entries are already on main.
- docs/reports.mdx: keep the navigation, theme and spacing paragraphs
  and main's offline chart paragraph.
- reporting/cli.py: keep the per-job Harbor artifacts helper. Main's
  only change there replaced cyan URLs, which the helper never uses.
- tier3/result_display.py: keep both the Harbor viewer and terminal
  style imports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
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