mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-01 15:37:32 +08:00
ccb8d3b259
Replace `rules: list[dict[str, Any]]` with 18 typed Pydantic rule models keyed on a `type` discriminator (1:1 with the runtime rules_dsl rule set). Constrain RulesMapping.type to the known mapping Literals. Validate regex `expression` fields (AfterValidator). Fix add_filter_compare value int->float. RulesMapping/ RulesModel become BaseModel (extra ignored) so model_dump emits DSL-only fields. Give RulesParameterModel a workflow-aware pydantic_template mirroring the other inline params (optional in unlinked workflow_step, allow_connected_value when linked) so gx_rules validates across state representations. Adds gx_rules.xml framework tool + gx_rules parameter_specification.yml cases. Pairs with editor UI-metadata leak fix #22823 and IWC cleanup galaxyproject/iwc#1278. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>