Fix stalled Tune state without params

Resolve pending Tune controls when the completed variant set contains no tunable parameters, while preserving deferred parameter publications.

AI assistance: implemented and validated by OpenAI Codex under maintainer authorization.
This commit is contained in:
Paul Bakaus
2026-08-20 09:18:33 -07:00
parent f88b2837a7
commit 478325a2dd
2 changed files with 20 additions and 3 deletions
+9
View File
@@ -1032,6 +1032,15 @@ describe('live-browser.js regression guards', () => {
/case 'variant_progress':[\s\S]{0,120}?if \(msg\.publicationKind === 'params'\) parameterGenerationState = 'loading';/,
'a params-only publication must mark Tune controls loading even though the variant count is unchanged',
);
assert.match(
SOURCE,
/function completeParameterGenerationIfReady\(\) \{[\s\S]{0,240}?arrivedVariants < expectedVariants[\s\S]{0,160}?parameterGenerationState === 'pending'[\s\S]{0,120}?completeParameterPublication\(\);/,
'the completed variants publication must resolve pending Tune controls even when no params publication follows',
);
assert.ok(
(SOURCE.match(/completeParameterGenerationIfReady\(\);/g) || []).length >= 4,
'every DOM, source, and component-preview completion path must resolve pending Tune controls',
);
assert.match(SOURCE, /revisionDomain: 'browser'/, 'browser checkpoints must use their own revision domain');
});