fix: web profiler export records resolved params, not sparse currentOpts - #535
Merged
yakew7 merged 1 commit intoSep 9, 2026
Merged
Conversation
Contributor
|
@propcgamer20-png is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
propcgamer20-png
force-pushed
the
fix/web-export-resolved-params
branch
from
September 9, 2026 15:28
6773760 to
e7b5a66
Compare
Owner
|
@propcgamer20-png fix the conflicts |
propcgamer20-png
force-pushed
the
fix/web-export-resolved-params
branch
2 times, most recently
from
September 9, 2026 16:13
c1132a7 to
64fa6c3
Compare
profiler-ui.js and profiler-compare.js built provenance.params as
Object.assign({}, currentOpts). currentOpts starts {} on every upload and
only gains a key when the user edits a threshold input, so for the common
case (no threshold touched) the exported params was {} - not the 7
resolved defaults SPEC.md section 10 requires, and which the Python
CLI/MCP path already records.
Added E.publicParams(opts) to the engine, mirroring
faircode.provenance.public_params(faircode.profiler._resolve_opts(opts)):
resolveOpts merge, drop the opaque `reference` structure, key-sorted.
Both export sites now use it.
Closes yakew7#490
propcgamer20-png
force-pushed
the
fix/web-export-resolved-params
branch
from
September 9, 2026 16:16
64fa6c3 to
b447287
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
assets/profiler-ui.jsandassets/profiler-compare.jsboth build the export's provenance as:currentOptsstarts as{}on every upload and only gains a key when the user manually edits a threshold input. So for any plain run where no threshold is touched (the common case),provenance.paramsis exported as{}- not the 7 resolved defaults thatSPEC.mdsection 10 requires ("the knobs of section 7 as resolved, defaults included") and that the Python CLI/MCP path already records viaprovenance.public_params.An export that omits every default threshold can't answer "was this produced from these thresholds" after the fact.
Fix
New
E.publicParams(opts)inprofiler-engine.js, mirroringfaircode.provenance.public_params(faircode.profiler._resolve_opts(opts)):Exported from the engine, and used at both
params:sites. A user-set threshold still shows through (publicParams({min_share: 0.2})->min_share: 0.2, rest defaulted).Test
test_python_js_public_params_parity_for_a_defaulted_run- assertsE.publicParams({})(run under Node) equalspublic_params(_resolve_opts(None))and carries exactly the 7 expected keys,referencenot among them.pytest tests/test_js_parity.py-> 22 passed, 1 failed (test_python_js_profiler_parity_sniffs_quoted_newlines, pre-existing onmainon this platform, unrelated).Closes #490
🤖 Generated with Claude Code