diff --git a/api/config/form_builder.php b/api/config/form_builder.php index a1b99e0f..ae31ebb6 100644 --- a/api/config/form_builder.php +++ b/api/config/form_builder.php @@ -84,4 +84,28 @@ return [ */ 'section_apply_enabled' => env('FORM_BUILDER_SECTION_APPLY', false), + /** + * FormBindingApplicator deadline in seconds. + * + * The wrapper around FormBindingApplicator::apply() throws + * FormBindingApplicatorTimeoutException if the call takes longer + * than this value. The exception is caught by + * ApplyBindingsOnFormSubmit's outer transaction handler and recorded + * as a form_submission_action_failures row with apply_status=FAILED, + * failure_response_code='temporary_error'. + * + * Default 5 seconds — typical apply() takes <100ms; the deadline + * catches the long tail (slow query against a massive person pool, + * lock-for-update wait that should have been resolved at the + * database level, etc.) before it hangs the public flow. + * + * Tune upward if a legitimate use-case surfaces (very large schemas + * with many bindings against multi-million-row entity tables). Tune + * downward if SLO requirements demand stricter response-time + * guarantees. + * + * Per RFC-WS-6 §Q1 v1.3 addition 4. + */ + 'apply_deadline_seconds' => env('FORM_BUILDER_APPLY_DEADLINE_SECONDS', 5), + ];