@dogfood-lab/schemas 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogfood-lab/schemas",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "JSON schemas for the testing-os contract spine — record, finding, pattern, recommendation, doctrine, policy, scenario, submission.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "scripts": {
16
16
  "build": "tsc",
17
- "test": "vitest run --passWithNoTests"
17
+ "test": "vitest run"
18
18
  },
19
19
  "files": [
20
20
  "dist",
@@ -312,7 +312,7 @@
312
312
  "description": "Closed operator set. exists/not_exists are truthiness (not strict key-presence) and take no value."
313
313
  },
314
314
  "value": {
315
- "description": "Comparand. Omitted for exists/not_exists. An array for in/not_in. A scalar otherwise. Numeric for gt/gte/lt/lte (a non-numeric resolved field is an eval-time policy-config: fault)."
315
+ "description": "Comparand. Omitted for exists/not_exists. An array of scalars for in/not_in. A number for gt/gte/lt/lte. A scalar (string/number/boolean/null) for equals/not_equals/contains/not_contains. These type constraints are schema-enforced (F-3ed78d6f): the comparand lives in the policy file, so a mistyped one — e.g. the quoted-number YAML footgun value: \"95\" — is a data-independent fault caught structurally at author time, not a rule that silently never fires. A non-numeric resolved FIELD for a numeric op remains an eval-time policy-config: fault."
316
316
  }
317
317
  },
318
318
  "allOf": [
@@ -326,7 +326,15 @@
326
326
  },
327
327
  {
328
328
  "if": { "required": ["op"], "properties": { "op": { "enum": ["in", "not_in"] } } },
329
- "then": { "properties": { "value": { "type": "array" } } }
329
+ "then": { "properties": { "value": { "type": "array", "items": { "type": ["string", "number", "boolean", "null"] } } } }
330
+ },
331
+ {
332
+ "if": { "required": ["op"], "properties": { "op": { "enum": ["gt", "gte", "lt", "lte"] } } },
333
+ "then": { "properties": { "value": { "type": "number" } } }
334
+ },
335
+ {
336
+ "if": { "required": ["op"], "properties": { "op": { "enum": ["equals", "not_equals", "contains", "not_contains"] } } },
337
+ "then": { "properties": { "value": { "type": ["string", "number", "boolean", "null"] } } }
330
338
  }
331
339
  ]
332
340
  },