fix automation run inputs, hitl routing, and detail UI polish

This commit is contained in:
CREDO23 2026-05-28 02:48:47 +02:00
parent ed8d56aa16
commit 91962ba879
8 changed files with 258 additions and 86 deletions

View file

@ -67,8 +67,15 @@ async def dispatch_run(
def _validate_inputs(
definition: AutomationDefinition, inputs: dict[str, Any]
) -> dict[str, Any]:
"""Validate merged inputs against the optional declared schema.
No declared schema pass through (runtime inputs like ``fired_at`` /
``last_fired_at`` and trigger ``static_inputs`` must still reach the
template context). Returning ``{}`` here strips them and makes Jinja
blow up on any ``{{ inputs.* }}`` reference.
"""
if definition.inputs is None or not definition.inputs.schema_:
return {}
return inputs
try:
jsonschema.validate(instance=inputs, schema=definition.inputs.schema_)
except jsonschema.ValidationError as exc: