fix: resolve diagnostic paths under the base path prefix and tolerate health-style ping responses

This commit is contained in:
2026-08-13 20:58:10 +02:00
parent 3a3efc3285
commit 9d7e9a05b7
3 changed files with 22 additions and 4 deletions
+8 -1
View File
@@ -9,7 +9,7 @@ import {
type DiagnosticAdapters,
} from "../src/workspaces/diagnostics.js";
import type { RuntimeBindings } from "../src/workspaces/runtime-renderer.js";
import { parseWorkspaceYaml } from "../src/workspaces/schema.js";
import { parseWorkspaceYaml, resolveDiagnosticUrl } from "../src/workspaces/schema.js";
const workspace = parseWorkspaceYaml(`workspace:
schema_version: 3
@@ -486,3 +486,10 @@ test("classifies an observed non-cosine Qdrant distance as semantic incompatibil
code: "connector_unavailable",
}));
});
test("resolveDiagnosticUrl appends the path to a base URL with a path prefix", () => {
expect(resolveDiagnosticUrl("https://dwh.example.test/dwh/", "/rpc/ping").toString())
.toBe("https://dwh.example.test/dwh/rpc/ping");
expect(resolveDiagnosticUrl("https://dwh.example.test/dwh", "/rpc/ping").toString())
.toBe("https://dwh.example.test/dwh/rpc/ping");
});