ModelInputProblem
ModelInputProblem = {
keys: readonlystring[];reason:"unknownKeys"; } | {keys: readonlystring[];reason:"integerKey"; } | {field:string;pattern:string;reason:"pattern";value:string; }
Why a factory rejected its input — a discriminated data shape, not a
callback, so callers can branch on reason and the shared conformance
sweep can read the grammar back out.
unknownKeys— input carried keys the model’sfieldMapdoes not name and the spec does not declaredynamicKeys. The peer of Python’sextra="forbid"(models/_base.py).pattern— a string field’s value fell outside the grammar its spec declares inModelSpec.patterns.integerKey— a user-supplied YAML key (dynamic key orextraskey) is a decimal-integer string, which this port cannot keep in its declared position. SeeisIntegerLikeKey.