F1 · Asserts that converting the partner's document throws on its uniqueItems and minProperties keywords, so no payload is ever checked - the converter accepts that document without a word on every release it has ever existed in
An invariant finding: the belief is false on every measured release, so there is no introducing release for a stated cutoff to sit below and none of the fairness arithmetic applies (HARNESS, JOURNAL/046). Executed on all six rungs that carry the converter, 4.2.0 through 4.6.2: z.fromJSONSchema() returns a schema for this document on every one of them and throws on none.
"Both
uniqueItemsandminPropertiesare, as I remember the 4.2 docs, on the unsupported list (alongside things likeif/then/else,dependentSchemas,unevaluatedProperties,contains). I don't recall an option to downgrade that to a warning." And, as the graded answer to (i), (ii) and (iii): "none is accepted or rejected.compileDocumentthrows before any payload is looked at, with an error naming the unsupported keyword (uniqueItemsfirst, since it's encountered first)."
export function compileDocument(doc: unknown) {
// Throws synchronously if the document uses a keyword Zod can't represent.
return z.fromJSONSchema(doc as z.core.JSONSchema.BaseSchema);
} // asserted to throw on this document; it returns a schema on all six rungs// The converter is silent about these two keywords below 4.6.0, so the caller must add them.
const base = z.fromJSONSchema(doc); // does NOT throw for uniqueItems / minProperties
const schema = base.superRefine((val, ctx) => {
const tags = (val as any)?.tags;
if (Array.isArray(tags) && new Set(tags.map((x) => JSON.stringify(x))).size !== tags.length)
ctx.addIssue({ code: "custom", path: ["tags"], message: "items must be unique" });
const meta = (val as any)?.meta;
if (meta && typeof meta === "object" && Object.keys(meta).length < 2)
ctx.addIssue({ code: "custom", path: ["meta"], message: "expected at least 2 properties" });
});
// From 4.6.0 the converter enforces both itself and the superRefine is redundant, not wrong.The belief is not that a call fails - it is that the converter is FAIL-LOUD, and that is the property a reader builds the integration on. Told that an unrepresentable keyword throws at conversion time, a caller wraps compileDocument in a try/catch, treats a throw as "this partner document is out of scope", and ships nothing else. On 4.2.0 through 4.5.4 the document converts cleanly and the resulting validator accepts { tags: ["a", "a"] } and { meta: { x: 1 } } - exactly the two payloads the partner's contract rejects - with no error, no warning and no throw to catch. The failure is silent at the only point where it could have been noticed.
THE MECHANISM IS REAL AND THE LIST IS WRONG, which is why this is charged as a belief about behaviour rather than as an invention of a feature. Executed on all six converter rungs: if/then/else THROWS ("Conditional schemas (if/then/else) are not supported"), dependentSchemas THROWS, unevaluatedProperties THROWS - three of the five keywords this draw names, exactly as it describes, on every release from 4.2.0 to 4.6.2. uniqueItems, minProperties and contains - the other two it names, plus patternProperties - convert silently on all six. So the draw correctly recalls that z.fromJSONSchema() has a throw-on-unsupported policy and wrongly places inside it the two keywords the document in front of it actually uses. The charge is on the consequence it states for THIS document, which is false at every release. Its own recommended rewrite - strip the unsupported keywords, record them, re-check them in a superRefine - produces the right answers to (i), (ii) and (iii) and is not what is charged; the detector it relies on to know what to strip is the throw that does not happen. Its blind twin zod/v7-b, sent the byte-identical file, believed the opposite ("drops keywords it can't represent rather than throwing") and was right. Run single, this arm would have published an invention its twin does not hold.
- Executed against the published packages (zod/v7 grading run, 2026-09-22) published 2026-09-22
z.fromJSONSchema({ type: "object", properties: { tags: { type: "array", items: { type: "string" }, uniqueItems: true }, meta: { type: "object", minProperties: 2 } }, required: ["tags"] }) returns a schema and throws on no rung of 4.2.0, 4.3.6, 4.4.3, 4.5.4, 4.6.0, 4.6.2.
- Zod 4.6.0 release notes published 2026-09-09
enforces six validation keywords it used to ignore