From e646cad59343edeb2b61c4f0382df2f6becfaef6 Mon Sep 17 00:00:00 2001 From: kokokoXUY <13682395396@163.com> Date: Sun, 27 Sep 2026 00:27:49 +0800 Subject: [PATCH] fix(fixture): keep applied machine namespaces across browser requests `fixture.mjs` builds the machine namespace map inside the per-request `**/api/chat/**` route handler, so the map is recreated for every request. The apply route writes `machineNamespaces[body.namespace] = ...` into that throwaway object, so the write never reaches the next GET: the dashboard's reload after an apply returned the previous configuration. That made the `steward-model-settings` scenario timing-dependent. Measured on the scenario's own readback, with the apply request already carrying the right payload and the product rendering its applied notice: - before: `executor_model=""`, `executor_reasoning_effort=""` - after: `executor_model="gpt-6-sol"`, `executor_reasoning_effort="xhigh"` The assertion failed whenever the reload won the race, which is how two `Release Artifacts` runs failed while sibling branches passed. Keep the map on the shared `state` object, the same way the neighbouring mutable fixture data (`machineInspectionStatus`, `invalidMachineNamespaces`, `machineConfigurationRequests`) is kept. Validation: `LOOPX_PERSONAL_WORKSPACE_SCENARIO=steward-model-settings node ../../../examples/personal-workspace-browser-smoke.mjs` from the dashboard package -> `ok`, with the readback values above. Each scenario gets a fresh page and a fresh `installApi` state, so per-scenario isolation is unchanged. Signed-off-by: kokokoXUY <13682395396@163.com> --- examples/personal-workspace-browser/fixture.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/personal-workspace-browser/fixture.mjs b/examples/personal-workspace-browser/fixture.mjs index c6f4036c6c..75d68a3793 100644 --- a/examples/personal-workspace-browser/fixture.mjs +++ b/examples/personal-workspace-browser/fixture.mjs @@ -424,6 +424,11 @@ export async function installApi(page, { goalSubagentConfigurationEnabled = true interrupts: [], goalConfigurationRequests: [], machineConfigurationRequests: [], + // Machine namespaces outlive a single request: the apply route writes the + // applied configuration here, and the next GET has to serve it back. A + // per-request literal made apply write-blind, so a reload after apply + // returned the previous configuration. + machineNamespaces: null, machineInspectionStatus: "configured", failNextMachineInspection: false, invalidMachineNamespaces: [], @@ -897,7 +902,7 @@ export async function installApi(page, { goalSubagentConfigurationEnabled = true executor_model: null, executor_reasoning_effort: null, }; - const machineNamespaces = { + const machineNamespaces = state.machineNamespaces ??= { change_quality_qualification: changeQualityConfiguration, manager_runtime: managerRuntimeConfiguration, periodic_report: periodicConfiguration,