Repository navigation
Conversation
Introduce showFast on GET api/1.1/tasks/{id} when API_FAST_TASK is enabled,
keeping the same endpoint and response shape while reducing duplicate work on
large request payloads.
- Strip `data` from the include list so `requestData` is not built twice
- Load task via Eloquent and process request metadata via raw SQL without
the `data` column; hydrate relations with selective columns
- Add TaskResource::fromTokenWithIncludes() to avoid preprocessInclude re-query
- Resolve request data from DB when processRequest has no `data` attribute
(showFast path and Nayra empty datastore)
- Guard includeBpmnTagName when BPMN definition is missing
- Add TaskShowFastResponseTimeTest (parity + median timing vs legacy includes)
Config: API_FAST_TASK=false by default in config/app.php
Timing: TASK_SHOW_FAST_MAX_RATIO (default 0.53) for the benchmark test
https://processmaker.atlassian.net/browse/FOUR-30668
PR SummaryMedium Risk Overview
Feature tests assert Reviewed by Cursor Bugbot for commit d1b4ecb. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
QA server K8S was successfully deployed https://tenant-1.ci-023a748934.engk8s.processmaker.net |
|
QA server K8S was successfully deployed https://tenant-1.ci-023a748934.engk8s.processmaker.net |
- Load process_requests.data in TaskV11ShowFastRepository when showFast includes requestData, instead of extending DataManager. - Restore DataManager to develop behavior; drop resolveRequestDataFromToken. - Fix empty include after stripping data (remove query param, trim parts). - Guard includeBpmnTagName when BPMN definition is missing on fast path. - Add test for include=data-only on API_FAST_TASK; remove DataManager hydration unit test superseded by fast-path parity. https://processmaker.atlassian.net/browse/FOUR-30668
Re-add tests/Feature/Api/V1_1/ProcessVariableControllerTest.php from develop after it was removed by mistake. Keeps FOUR-30668 aligned with develop for unrelated V1.1 process-variables coverage. https://processmaker.atlassian.net/browse/FOUR-30668
Restore tests/Feature/DataManagerTest.php from develop to drop an unrelated import-only diff. Fast-path request data coverage remains in TaskShowFastResponseTimeTest. https://processmaker.atlassian.net/browse/FOUR-30668
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d1b4ecb. Configure here.
| if ($processRequest->user_id) { | ||
| $requestor = User::query()->select(self::REQUESTOR_COLUMNS)->find($processRequest->user_id); | ||
| $processRequest->setRelation('user', $requestor); | ||
| } |
There was a problem hiding this comment.
Requestor include loses user fields
Medium Severity
The fast path loads the requestor with only id, firstname, lastname, and email, then fromTokenWithIncludes skips further loading because processRequest.user is already set. Legacy show never applies that slim select: ProcessRequestToken has no requestor relation, so includeRequestor lazy-loads the full processRequest.user. With API_FAST_TASK enabled, requestor drops fields clients already rely on, such as username, avatar, status, and title.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d1b4ecb. Configure here.







Introduce showFast on GET api/1.1/tasks/{id} when API_FAST_TASK is enabled, keeping the same endpoint and response shape while reducing duplicate work on large request payloads.
datafrom the include list sorequestDatais not built twicedatacolumn; hydrate relations with selective columnsdataattribute (showFast path and Nayra empty datastore)Config: API_FAST_TASK=false by default in config/app.php
Timing: TASK_SHOW_FAST_MAX_RATIO (default 0.53) for the benchmark test
https://processmaker.atlassian.net/browse/FOUR-30668
Run:
./vendor/bin/phpunit tests/Feature/Api/V1_1/TaskShowFastResponseTimeTest.php
Tests:
datakey)Threshold env:
TASK_SHOW_FAST_MAX_RATIO=0.53 default (~47% faster)
TASK_SHOW_FAST_MAX_RATIO=0.40 ~60% faster
TASK_SHOW_FAST_MAX_RATIO=0.30 ~70% faster
Rule: fast_median <= legacy_median * ratio
Improvement % ≈ (1 - fast/legacy) * 100 (same machine/DB each time)
ci:deploy