fix: align workspace diagnostic contracts
This commit is contained in:
@@ -98,6 +98,7 @@ test("requires explicit vector database and schema identities with strict diagno
|
||||
+ " method: POST\n"
|
||||
+ " path: /rpc/diagnostic_vector_probe\n"
|
||||
+ " auth: bearer\n"
|
||||
+ " response: { operation: operation }\n"
|
||||
+ " embedding:\n"
|
||||
+ " method: GET\n"
|
||||
+ " path: /models\n"
|
||||
@@ -134,6 +135,24 @@ test("requires explicit vector database and schema identities with strict diagno
|
||||
.toThrow(/response field/i);
|
||||
});
|
||||
|
||||
test("requires a reversible writer probe to declare the response operation it verifies", () => {
|
||||
const writerProbe = validYaml.replace("llm_policy:\n", `diagnostics:
|
||||
vector_rest:
|
||||
metadata:
|
||||
method: GET
|
||||
path: /metadata
|
||||
auth: bearer
|
||||
response: { collection: collection, dimensions: dimensions, distance: distance }
|
||||
reversible_probe:
|
||||
method: POST
|
||||
path: /diagnostic-probe
|
||||
auth: bearer
|
||||
llm_policy:
|
||||
`);
|
||||
|
||||
expect(() => parseWorkspaceYaml(writerProbe)).toThrow(/response|operation/i);
|
||||
});
|
||||
|
||||
test("keeps v1 descriptors readable but requires explicit migration before v2 operations", () => {
|
||||
const v1WithoutVectorIdentity = validYaml.replace("schema_version: 2", "schema_version: 1").replace(
|
||||
" database: postgres\n schema: vectors\n", "",
|
||||
|
||||
Reference in New Issue
Block a user