Commit fad6462
committed
fix(scripts,review): gate skipped-cell rendering on status != "ok"
Addresses both Copilot inline comments on PR #235.
The previous fix used `if head_status or base_status:` to detect skipped
matrix cells, but `benchmarks/benchmark.py::MatrixCell.status` defaults
to `"ok"` for every real cell — making `"ok"` truthy and causing the
delta script to render `_skipped_ (ok)` for every backend/size cell.
The benchmark-delta bot comment on this PR caught the bug live: all 9
real cells (bm25/fuzzy/tfidf × 100/500/1000) were marked as skipped.
The gate is now `status != "ok"`, mirroring the existing convention in
`scripts/render_scorecard.py:150-151`. Cells with no `status` field are
treated as "ok" for backwards compat.
Test updates:
- `test_matrix_delta_ok_cells_render_metrics` (renamed from
`test_matrix_delta_real_cells_still_render_metrics`) now explicitly
sets `status: "ok"` on the fixtures and asserts metrics render — this
is the regression test that would have caught the original bug.
- `test_matrix_delta_missing_status_treated_as_ok` added for backwards
compatibility on cells that omit `status` entirely.
Verification:
- ruff format/lint/mypy clean
- pytest -q: 1012 passed, 5 skipped (one more test than before the fix)1 parent ce9d146 commit fad6462
2 files changed
Lines changed: 52 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
| 85 | + | |
76 | 86 | | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
80 | | - | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
85 | 124 | | |
86 | 125 | | |
87 | 126 | | |
0 commit comments