render_result_table

Function render_result_table 

Source
pub fn render_result_table(records: &[VerifierCellRecord]) -> Option<String>
Expand description

Render the per-cell records into one PASS/FAIL/SKIP grid PER declared scheduler (BTreeSet-sorted). Each scheduler’s section is a tally line followed by a bordered grid whose rows are the topology presets that ran the scheduler (BTreeSet) and whose columns are the kernels that ran it (BTreeSet); the header row’s first column is topology. Each grid cell is the (topology, kernel) result FOR THAT SCHEDULER, rendered nextest-style:

  • ✓ (bold green) — every record for the triple passed,
  • ✗ (bold red) — any record for it failed; this also absorbs the defensive duplicate-record case where one triple somehow carries both a pass and a fail — any failure means failure,
  • - (plain) — every record for it skipped, or no record (the scheduler’s constraints rejected the preset on that kernel).

Cells are single-width glyphs (U+2713 / U+2717), not emoji: emoji are not exactly two monospace cells in GitHub’s log viewer / code blocks, so they drift the box-drawing columns. The glyph styling comes from [comfy_table::Cell::fg] + Attribute::Bold, with emission governed by crate::cli::new_bordered_table’s color policy (styled on a TTY and in color-forcing CI, plain otherwise). The tally line keeps the emoji — {sched}: {n_pass} ✅ {n_fail} ❌ — because it is prose with nothing to column-align. The counts tally the grid CELLS (a - cell counts toward neither; a cell with any failing record counts toward n_fail). The kernel is a grid axis rather than folded into the cell, so a ✗ cell already names the exact kernel that failed — the old flat failing combinations (scheduler / kernel / topology) list it used to need is gone.

Returns None for an empty record set (the caller prints nothing). Schedulers, rows, and columns are BTreeSet-sorted so the same run renders the same output (shell-pipeline stable). Uses crate::cli::new_bordered_table (box-drawing borders) so each scheduler’s grid is visually delimited from its tally line and from the next scheduler’s section.