feat(lab): separate evidence catalogs and record methods

This commit is contained in:
DCCONSTRUCTIONS
2026-07-26 17:56:23 +03:00
parent e9ff29297b
commit 4db00b53f7
17 changed files with 670 additions and 24 deletions
@@ -197,6 +197,25 @@ test("data recordings keep the compact session dropdown and laboratory results s
assert.match(workspaceSource, /e29-camera-geometry/);
});
test("source and laboratory catalogs are requested as disjoint backend projections", async () => {
const calls = [];
const fetcher = async (input) => {
calls.push(String(input));
return new Response(JSON.stringify({ items: [] }), {
status: 200,
headers: { "Content-Type": "application/json" },
});
};
await fetchObservationSessionCatalog({ limit: 100, scope: "source", fetcher });
await fetchObservationSessionCatalog({ limit: 100, scope: "laboratory", fetcher });
assert.deepEqual(calls, [
"/api/v1/observation-sessions?limit=100&scope=source",
"/api/v1/observation-sessions?limit=100&scope=laboratory",
]);
});
test("session catalog exposes authoritative background preparation state", () => {
const catalog = decodeObservationSessionCatalog({
items: [session({