faircode/profiler.py computes a flags field per column - small_group (driven by --min-group-size, #124), plus imbalance/missing warnings - as part of its output dict. assets/profiler-engine.js (the browser-side reimplementation the web profiler runs) has no equivalent: grepped the whole file for every plausible naming of the concept (small_group, smallGroup, MIN_GROUP_SIZE, minGroupSize, MIN_SHARE, minShare) - zero matches.
This is a known, not accidental, divergence: tests/test_js_parity.py's parity tests (test_python_js_profile_parity and the JSON/XLSX variants) each do
python_result.pop("flags", None)
javascript_result.pop("flags", None)
right before asserting the two engines agree - i.e. the parity test works around the gap instead of testing it, so a real regression in either engine's flags logic (or the JS engine simply never having had it) would never be caught by "parity."
Two ways to close this, either is a reasonable PR:
- Port the
flags logic to assets/profiler-engine.js and delete the two pop("flags", ...) lines so parity is actually verified end-to-end.
- If
flags is meant to stay CLI-only (maybe deliberately, since the web profiler's UI surfaces things differently), document that explicitly in README/CONTRIBUTING and leave a comment at each pop("flags", ...) explaining why it's excluded, instead of the exclusion being silent.
faircode/profiler.pycomputes aflagsfield per column -small_group(driven by--min-group-size, #124), plus imbalance/missing warnings - as part of its output dict.assets/profiler-engine.js(the browser-side reimplementation the web profiler runs) has no equivalent: grepped the whole file for every plausible naming of the concept (small_group,smallGroup,MIN_GROUP_SIZE,minGroupSize,MIN_SHARE,minShare) - zero matches.This is a known, not accidental, divergence:
tests/test_js_parity.py's parity tests (test_python_js_profile_parityand the JSON/XLSX variants) each doright before asserting the two engines agree - i.e. the parity test works around the gap instead of testing it, so a real regression in either engine's
flagslogic (or the JS engine simply never having had it) would never be caught by "parity."Two ways to close this, either is a reasonable PR:
flagslogic toassets/profiler-engine.jsand delete the twopop("flags", ...)lines so parity is actually verified end-to-end.flagsis meant to stay CLI-only (maybe deliberately, since the web profiler's UI surfaces things differently), document that explicitly in README/CONTRIBUTING and leave a comment at eachpop("flags", ...)explaining why it's excluded, instead of the exclusion being silent.