From 6f68cb172ab6c7a126450fe9c76166dfd7ae5b47 Mon Sep 17 00:00:00 2001
From: Daniele21
Date: Sat, 5 Sep 2026 20:15:45 +0200
Subject: [PATCH 1/3] VALUE-03C1: expose declared domains in optimization
---
.../find-best-setup/FindBestSetupPage.tsx | 43 ++++++++++++++++++-
1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
index fa592ed2..79e6abbf 100644
--- a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
+++ b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
@@ -7,6 +7,7 @@ import type {
CampaignPlanningContextReadModel,
CampaignSearchStrategy,
CampaignTargetPlanningReadModel,
+ GenerationParameterDomainReadModel,
} from "../../api";
import {
AppShell,
@@ -60,6 +61,14 @@ function formatDuration(seconds: number | null, reason: string) {
return `~${Math.max(1, Math.round(seconds / 60))} min`;
}
+function formatDeclaredDomain(domain: GenerationParameterDomainReadModel) {
+ if (domain.kind === "boolean") {
+ return domain.values.length ? domain.values.map(String).join(" / ") : "Values unavailable";
+ }
+ if (domain.minimum === null || domain.maximum === null) return "Bounds unavailable";
+ return `${domain.minimum} → ${domain.maximum}${domain.step === null ? "" : ` · step ${domain.step}`}`;
+}
+
export function FindBestSetupView({
context,
onManualTest,
@@ -207,6 +216,8 @@ export function FindBestSetupView({
const customOption = target?.configuration_search_options.find(
(option) => option.strategy === "custom",
);
+ const selectedCandidates =
+ target?.candidates.filter((candidate) => candidateIds.includes(candidate.candidate_id)) ?? [];
const showFixedFallback = Boolean(
fixedOption?.available && primaryOptions.every((option) => !option.available),
);
@@ -467,12 +478,40 @@ export function FindBestSetupView({
: "No request-level parameter capability list was reported for this target."}
- Bounded search ranges:{" "}
+ Combined target-level search ranges:{" "}
{target.bounded_generation_parameter_ranges.length
? target.bounded_generation_parameter_ranges.join(", ")
- : "None reported"}
+ : "Not derived from model-specific domains"}
+
+
Declared request domains by model
+
+ Read-only backend evidence for the selected models. Performance Lab does not
+ combine model-specific domains or enable a sweep until the search strategy
+ defines an exact deterministic configuration matrix.
+
+ {selectedCandidates.map((candidate) => (
+
+
{candidate.model_id}
+ {candidate.generation_parameter_domains.length ? (
+
+ {candidate.generation_parameter_domains.map((domain) => (
+
+
- {domain.name}
+ -
+ {formatDeclaredDomain(domain)} · {domain.scope} · {domain.source} /{" "}
+ {domain.provenance}
+
+
+ ))}
+
+ ) : (
+
No canonical bounded request-generation domains are available.
+ )}
+
+ ))}
+
From 67df51a04113306194d7f58797538e1a8c8ea9df Mon Sep 17 00:00:00 2001
From: Daniele21
Date: Sat, 5 Sep 2026 20:16:44 +0200
Subject: [PATCH 2/3] test: cover declared domains in J0 optimization
---
frontend/e2e/best-setup-ux.spec.ts | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/frontend/e2e/best-setup-ux.spec.ts b/frontend/e2e/best-setup-ux.spec.ts
index 1a0c6c51..beb541ee 100644
--- a/frontend/e2e/best-setup-ux.spec.ts
+++ b/frontend/e2e/best-setup-ux.spec.ts
@@ -41,6 +41,20 @@ function candidate(candidateId: string, modelId: string) {
runtime_name: null,
runtime_version: null,
runtime_config_digest: null,
+ generation_parameter_domains: [
+ {
+ ...API_IDENTITY,
+ name: modelId === "model-a" ? "temperature" : "top_p",
+ kind: "float",
+ scope: "request_generation",
+ source: "local_llm_server",
+ provenance: "registry_declared",
+ minimum: modelId === "model-a" ? 0 : 0.1,
+ maximum: modelId === "model-a" ? 2 : 1,
+ step: 0.1,
+ values: [],
+ },
+ ],
source: "configured",
};
}
@@ -357,6 +371,16 @@ test("J0 campaign: four-stage setup executes and produces policy-backed results"
page.getByText("will not invent sweep domains", { exact: false }).first(),
).toBeVisible();
await expect(page.getByRole("radio", { name: /Single configuration/ })).toBeChecked();
+ await page.getByText("Customize parameters (advanced)", { exact: true }).click();
+ await expect(page.getByText("Declared request domains by model", { exact: true })).toBeVisible();
+ await expect(page.getByText("temperature", { exact: true })).toBeVisible();
+ await expect(page.getByText("0 → 2 · step 0.1", { exact: false })).toBeVisible();
+ await expect(page.getByText("top_p", { exact: true })).toBeVisible();
+ await expect(page.getByText("0.1 → 1 · step 0.1", { exact: false })).toBeVisible();
+ await expect(
+ page.getByText("does not combine model-specific domains", { exact: false }),
+ ).toBeVisible();
+ await expect(page.getByRole("radio", { name: /Quick/ })).toBeDisabled();
await page.getByRole("button", { name: "Continue" }).click();
await expect(page.getByRole("heading", { name: "Review your evaluation" })).toBeVisible();
From fd289872916ed8280efe1fa9355f2f7956789b81 Mon Sep 17 00:00:00 2001
From: Daniele21
Date: Sat, 5 Sep 2026 20:20:49 +0200
Subject: [PATCH 3/3] style: stabilize declared-domain formatting
---
.../pages/find-best-setup/FindBestSetupPage.tsx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
index 79e6abbf..0cc221da 100644
--- a/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
+++ b/frontend/src/pages/find-best-setup/FindBestSetupPage.tsx
@@ -63,10 +63,12 @@ function formatDuration(seconds: number | null, reason: string) {
function formatDeclaredDomain(domain: GenerationParameterDomainReadModel) {
if (domain.kind === "boolean") {
- return domain.values.length ? domain.values.map(String).join(" / ") : "Values unavailable";
+ if (!domain.values.length) return "Values unavailable";
+ return domain.values.map(String).join(" / ");
}
if (domain.minimum === null || domain.maximum === null) return "Bounds unavailable";
- return `${domain.minimum} → ${domain.maximum}${domain.step === null ? "" : ` · step ${domain.step}`}`;
+ const step = domain.step === null ? "" : ` · step ${domain.step}`;
+ return `${domain.minimum} → ${domain.maximum}${step}`;
}
export function FindBestSetupView({
@@ -217,7 +219,9 @@ export function FindBestSetupView({
(option) => option.strategy === "custom",
);
const selectedCandidates =
- target?.candidates.filter((candidate) => candidateIds.includes(candidate.candidate_id)) ?? [];
+ target?.candidates.filter((candidate) =>
+ candidateIds.includes(candidate.candidate_id),
+ ) ?? [];
const showFixedFallback = Boolean(
fixedOption?.available && primaryOptions.every((option) => !option.available),
);
@@ -500,7 +504,12 @@ export function FindBestSetupView({
{domain.name}
- {formatDeclaredDomain(domain)} · {domain.scope} · {domain.source} /{" "}
+ {formatDeclaredDomain(domain)}
+ {" · "}
+ {domain.scope}
+ {" · "}
+ {domain.source}
+ {" / "}
{domain.provenance}