feat: pin sessions to workspace revisions
This commit is contained in:
@@ -31,6 +31,19 @@ test("GET /settings returns effective defaults (env provider/model/thinking, fir
|
||||
}
|
||||
});
|
||||
|
||||
test("GET /settings uses the stored installation workspace default before the harness fallback", async () => {
|
||||
const { app, dir } = appWithTmpSettings({});
|
||||
try {
|
||||
writeFileSync(join(dir, "settings.json"), JSON.stringify({ workspace: "psd-clinical" }));
|
||||
|
||||
const response = await app.inject({ method: "GET", url: "/settings" });
|
||||
|
||||
expect(response.json()).toMatchObject({ workspace: "psd-clinical" });
|
||||
} finally {
|
||||
rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("PUT /settings does not persist personal workspace or LLM choices", async () => {
|
||||
const { app, dir } = appWithTmpSettings({ PI_PROVIDER: "zai", PI_MODEL: "glm-5.2", PI_THINKING: "medium" }, {
|
||||
listModels: async () => [{ provider: "zai", id: "glm-5.2", name: "GLM 5.2", reasoning: true }],
|
||||
|
||||
Reference in New Issue
Block a user