fix: fail closed v3 legacy semantic fallbacks
This commit is contained in:
@@ -128,6 +128,18 @@ test("rejects unknown fields in schema v3 semantic identity", () => {
|
||||
expect(() => parseWorkspaceYaml(withUnknownField)).toThrow(/unrecognized key/i);
|
||||
});
|
||||
|
||||
test("rejects legacy semantic connector fields and diagnostics in schema v3", () => {
|
||||
expect(() => parseWorkspaceYaml(validYaml.replace(
|
||||
" collection: psd-clinical\n",
|
||||
" collection: psd-clinical\n database: postgres\n",
|
||||
))).toThrow(/unrecognized key|database/i);
|
||||
|
||||
expect(() => parseWorkspaceYaml(validYaml.replace(
|
||||
"llm_policy:\n",
|
||||
"diagnostics:\n vector_rest:\n metadata:\n method: GET\n path: /metadata\n auth: bearer\n response:\n collection: collection\n dimensions: dimensions\n distance: distance\nllm_policy:\n",
|
||||
))).toThrow(/unrecognized key|vector_rest/i);
|
||||
});
|
||||
|
||||
test("keeps v1 and v2 descriptors parseable but non-operational", () => {
|
||||
const v1Yaml = `workspace:
|
||||
schema_version: 1
|
||||
|
||||
Reference in New Issue
Block a user