From c6e1b9423433b034e3bf4f6ab8bc32ff73c44924 Mon Sep 17 00:00:00 2001 From: Jason Hoku Date: Wed, 4 Nov 2026 03:10:44 -0800 Subject: [PATCH] fix(compare): sweep per-job bookkeeping (wf_fingerprint, wf_sweep_id, wf_job_index, poster) no longer counts as a setting Matched and one-axis pairing on a sweep session found zero pairs because every item differed in these per-image fields (same class as the wave-2 config_fp bug). Co-Authored-By: Claude Fable 5.1 --- resources/logic_ratings.js | 4 +++- tests/js/ratings.test.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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')); +});