filter synthesis: compile named non-table value types structurally

A property typed as a named value type (a schema-only config object like
an operating-hours schedule) previously got a dangling {type}.filter
reference — no filter is ever synthesized for a non-table-backed schema,
so the whole parent filter failed downstream (PROXY_TYPE_RESOLUTION_FAILED;
the punc generator emitted an empty filter type).

Naming a value type is a reuse choice, not a semantics choice: it now
compiles structurally into the parent filter, exactly like an inline
object, recursively (including array items). Table-backed boundaries keep
the lazy {type}.filter reference. A named type with no compilable
structure is omitted instead of dangling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 19:22:57 -04:00
parent 581fc8e0c0
commit 0d282cc930
3 changed files with 116 additions and 5 deletions

View File

@ -87,6 +87,34 @@
"type": "string"
}
}
},
"schedule": {
"type": [
"opening_hours",
"null"
]
}
}
},
"season": {
"type": "object",
"properties": {
"label": {
"type": "string"
}
}
},
"opening_hours": {
"type": "object",
"properties": {
"open": {
"type": "string"
},
"seasons": {
"type": "array",
"items": {
"type": "season"
}
}
}
}
@ -262,6 +290,7 @@
"uuid_field",
"tags",
"ad_hoc",
"schedule",
"$and",
"$or"
],
@ -277,6 +306,7 @@
"uuid_field",
"tags",
"ad_hoc",
"schedule",
"$and",
"$or"
],
@ -298,6 +328,7 @@
"uuid_field",
"tags",
"ad_hoc",
"schedule",
"$and",
"$or"
],
@ -366,6 +397,41 @@
"string.condition",
"null"
]
},
"schedule": {
"type": [
"filter",
"null"
],
"compiledPropertyNames": [
"open",
"seasons"
],
"properties": {
"open": {
"type": [
"string.condition",
"null"
]
},
"seasons": {
"type": [
"filter",
"null"
],
"compiledPropertyNames": [
"label"
],
"properties": {
"label": {
"type": [
"string.condition",
"null"
]
}
}
}
}
}
},
"type": "filter"
@ -483,10 +549,12 @@
]
}
}
}
},
"opening_hours": {},
"season": {}
}
}
}
]
}
]
]