Where: assets/profiler-engine.js's profile() (cross-handling, via its pickCross-equivalent) vs faircode/profiler.py:412-416.
The gap: the same class of divergence as the reference-validation gap (see companion issue) but for cross. Python's profile() raises when a requested cross pair doesn't match two real dimensions; the JS engine silently falls back to the first two detected dimensions instead, with no error.
Repro:
# Python
>>> profile(df, opts={"cross": ["sex", "nonexistent_col"]})
ValueError: cross column(s) don't match any profiled dimension: nonexistent_col
// JS - same input, no error, silently uses whichever two dimensions come first
const r = E.profile(table, {}, {cross: ['sex', 'nonexistent_col']});
r.intersections[0].dims // ['sex', 'race'] - not what was asked for, no error
Why it matters: CONTRIBUTING.md explicitly requires the JS and Python engines to "keep... producing identical results" for the shared profiling logic - this is a real behavioral divergence in that shared API surface. Not reachable through profiler.html's UI today (the cross <select> dropdowns only ever offer real detected dimension names), but the divergence exists in the engine itself and would surface for any future caller that passes cross programmatically (a browser extension, a script embedding the engine, a future UI feature).
Suggested fix: port the same validation into the JS engine's cross-handling, matching the Python error message.
Where:
assets/profiler-engine.js'sprofile()(cross-handling, via itspickCross-equivalent) vsfaircode/profiler.py:412-416.The gap: the same class of divergence as the reference-validation gap (see companion issue) but for
cross. Python'sprofile()raises when a requestedcrosspair doesn't match two real dimensions; the JS engine silently falls back to the first two detected dimensions instead, with no error.Repro:
Why it matters:
CONTRIBUTING.mdexplicitly requires the JS and Python engines to "keep... producing identical results" for the shared profiling logic - this is a real behavioral divergence in that shared API surface. Not reachable throughprofiler.html's UI today (the cross<select>dropdowns only ever offer real detected dimension names), but the divergence exists in the engine itself and would surface for any future caller that passescrossprogrammatically (a browser extension, a script embedding the engine, a future UI feature).Suggested fix: port the same validation into the JS engine's cross-handling, matching the Python error message.