diff --git a/resources/logic_ratings.js b/resources/logic_ratings.js index 67ec1ec..8cc3eac 100644 --- a/resources/logic_ratings.js +++ b/resources/logic_ratings.js @@ -23,7 +23,9 @@ var CMP_EXCLUDED_KEYS = new Set([ 'image_path', 'preview_path', 'video_path', 'hash', 'hires_denoise', // per-image outcomes / bookkeeping, not settings 'config_fp', 'base_fp', 'metrics', 'preview_of', 'source_relpath', - 'florence2_bbox', 'florence2_detection_count', 'florence2_no_detection' + 'florence2_bbox', 'florence2_detection_count', 'florence2_no_detection', + // workflow-sweep per-job bookkeeping (wf_params are the settings and stay in) + 'wf_fingerprint', 'wf_sweep_id', 'wf_job_index', 'poster' ]); var CMP_EXCLUDED_RE = /^upscale_|^hires_prompt_|_hash$|^worker|^_/; diff --git a/tests/js/ratings.test.js b/tests/js/ratings.test.js index 6f2b8c3..da75454 100644 --- a/tests/js/ratings.test.js +++ b/tests/js/ratings.test.js @@ -296,3 +296,8 @@ test('cmpSwipeSide decisions', () => { assert.strictEqual(R.cmpSwipeSide(-200, 0, 200, 1600), null); // width 1600 needs 240 px assert.strictEqual(R.cmpSwipeSide(-250, 0, 200, 1600), 'a'); }); + +test('sweep per-job bookkeeping is excluded from the compare ctx (wf_params stay in)', () => { + for (const k of ['wf_fingerprint', 'wf_sweep_id', 'wf_job_index', 'poster']) assert.ok(R.CMP_EXCLUDED_KEYS.has(k), k); + assert.ok(!R.CMP_EXCLUDED_KEYS.has('wf_params')); +});