fix: preserve evidence revision staleness semantics
This commit is contained in:
@@ -321,6 +321,25 @@ test("returns a 409 field conflict instead of overwriting a changed workspace",
|
||||
});
|
||||
});
|
||||
|
||||
test("maps a stale registry commit to HTTP 409 without conflict payloads", async () => {
|
||||
const registry = registryFake({
|
||||
publish: vi.fn(async () => {
|
||||
throw new WorkspaceRegistryError("workspace_stale", "Workspace revision is stale");
|
||||
}),
|
||||
});
|
||||
const app = appFor(registry);
|
||||
|
||||
const res = await app.inject({ method: "POST", url: "/workspaces/publish", payload: {
|
||||
action: "update",
|
||||
workspace,
|
||||
baseCommit: "c".repeat(40),
|
||||
baseBlob: "d".repeat(40),
|
||||
} });
|
||||
|
||||
expect(res.statusCode).toBe(409);
|
||||
expect(res.json()).toEqual({ code: "workspace_stale", message: "Workspace revision is stale." });
|
||||
});
|
||||
|
||||
test("exports generated public artifacts without secret values", async () => {
|
||||
const app = appFor(registryFake());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user