feat(form-builder): apply_deadline_seconds config key (default 5)
Per RFC-WS-6 §Q1 v1.3 addition 4. Configurable deadline for FormBindingApplicator::apply(). Default 5 seconds catches the long tail of slow applies before they hang the public flow. Tunable per environment via FORM_BUILDER_APPLY_DEADLINE_SECONDS. Consumed by ApplyBindingsOnFormSubmit::handle's withDeadline() call (landed in Phase B). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -84,4 +84,28 @@ return [
|
|||||||
*/
|
*/
|
||||||
'section_apply_enabled' => env('FORM_BUILDER_SECTION_APPLY', false),
|
'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),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user