Repository navigation
ref: handle zero-work window-union reports - #663
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: Both report divisions handle zero denominators, and the regression assertions distinguish undefined measurements from zero work.
Checked
Duplicates: 0 new functions, types or constants; manual search found no new duplicate owner.
Complexity: report gains two guards for independent denominators.
Silent failure: 2 guarded divisions followed to printed columns; undefined values print nan, while measured zero work remains zero.
Tests: the new report assertions pass with in-memory router sets and fail on the base with ZeroDivisionError. Removing either guard at tools/ref/window-union.py:246 and tools/ref/window-union.py:247 raises ZeroDivisionError; replacing either nan fallback with zero fails an assertion.
Boundaries: full-card and selected-only residency, empty windows and mixed-set pooling checked; three positive-work reports match the base output.
Gates: no existing pins or assertions relaxed; the PR reports FAIL-first evidence for the regression.
Escape catalog: no patterns matched.
Notes
No Rust file changed; dryer and crapper did not run.
Validation used in-memory router sets; the full self-test was not rerun.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
@Burntgogi Thanks for the contribution. The review is done, so I'm merging this. |
Problem
A valid placement with no selected host experts reaches
0 / 0in the predicted-ratio column. A valid window size that fits no chunk also divides by zero in slots/window, even with positive predicted host work.Change
nan, not a fabricated ratio of zero.0.0; report undefined measured means asnanwhen no complete window exists.No placement/parser changes; this is independent of #659.
Verification
ZeroDivisionError;python3 tools/ref/window-union.py --self-testpasses afterward.LC_ALL=C bash tools/contrib-check.sh --tier t0 --only '^(fmt|check-recipes|check-comments|check-arch|check-levers)$': 5 checks, 0 red (160 s).CPU tooling only; no GPU/model validation claimed. Local
just pre-reviewis unavailable because the Claude CLI is not installed.Closes #656.