Rolling it out
Move an instance to enforce, and the known limitations
Rolling it out
enforce is the default. On an instance with scripts or other systems that launch forms over REST, reach it in steps, watching the log before refusing anything:
- Set
LAUNCH_VALIDATION=logfor the whole instance (before upgrading, on an upgrade). - Run in this mode for a while and review the log:
would refusewarnings indicate launches that break the rules;extravars differwarnings indicate forms that compute something differently on the server (a timestamp, outside data). Decide for each form whether that matters. - Switch those forms to
launchValidation: enforce. Callers that sent invalid values or made-up extravars now get a422with the reason. - When every form behaves as expected, remove
LAUNCH_VALIDATION(or set it toenforce) for the whole instance.
Limitations
Launch validation does not cover everything yet:
- Wizard forms cannot be relaunched with changes, and a wizard job launched before 7.0 cannot be relaunched under
enforce(it did not store its step values). The MCP server cannot launch wizard forms. - Placeholder resolution in the browser still uses its own copy of the server’s code; in rare edge cases (
__undefined__, quotes inside expressions) the two could resolve a placeholder differently.logreveals such differences. runLocalexpressions run in the browser’s JavaScript engine in the browser and in a sandbox on the server; the same code produces the same result, except where it depends on the browser’s timezone or locale.
Wizard forms
A wizard is checked step by step: the browser sends the values of each step, and the server checks every step the user would submit against its own subform.
- A step is left out when it is
optionaland the user skipped it, or when itswhenis false. - A step reads the earlier steps through
$(__parent__.<step>.<field>), with their checked values. - Errors name the step and the field, as
<step>.<field>. - Under
enforce, the extravars are built on the server, each step under itsdefaultModel. - File fields are not supported in a wizard.