Repository navigation
Rust #325: answer worker-plane errors as published PHP does - #858
Conversation
Sending the same malformed worker requests to published 2.11.5 and native showed four differences: - a workflow or activity poll failing its request rules was answered with native's own reasons, not Laravel's validation_failed in the worker envelope; - an unknown activity task on the fail and heartbeat routes was answered with a bare message and reason; - in a named namespace, a route PHP does not have was refused as an unqualified named-namespace operation instead of PHP's 404 or 405; - a completion naming an unknown workflow task was refused for its command payloads before PHP's 404 task_not_found. Validate both polls with the published rules, answer an unknown activity task with guardAttemptOwnership's body on every route, give PHP's 404 or 405 for unrouted requests in any namespace, and look the workflow task up before checking or fetching command payloads. The new worker-error-bodies fixture records ten such requests against published 2.11.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Cloud source review of exact e22962b: one remaining poll-validation contract gap.
The existing inner reader does correctly handle duplicate-only input; it cannot add those errors after the earlier return. Include distinctness in the same complete poll-validation result, preserving Laravel rule/message ordering, and extend the published-PHP/native fixture with an ordinary-field error plus duplicate kinds. A duplicate invalid kind alongside another failure is a useful combined control as well. Keep this on the same narrow PR before closing the poll-error-body gap. This finding follows directly from the exact source call order and the published PHP rules. I have not executed Rust, HTTP workloads or a new installed-artifact qualification. The namespace-scoped task-existence lookup and existing ten-request fixture were also inspected; qualification remains the owner's normal exact-head/cumulative path. |
From #858 review. The poll rules left distinct out of task_kinds.* and let native's task-kinds reader report duplicates afterwards, so a poll that also failed another rule lost PHP's per-index duplicate errors. The Laravel rule engine gains distinct (every duplicate fails, compared by PHP string), and the workflow poll's rules include it. A combined case (timeout_seconds 61 with task_kinds [workflow, workflow]) joins the worker-error-bodies fixture, recorded against published 2.11.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed
|
|
Cloud static delta review of exact One remaining correctness issue in {"worker_id":"w","task_queue":"q","task_kinds":["workflow",true]}Both requests should be rejected, but their complete error envelopes diverge. Native converts The exact Server rule is Please use PHP-compatible loose comparison for this rule and add the mixed boolean/string case to the published-PHP/native request comparison. This is a source-derived finding; Cloud performed no Rust compilation, HTTP execution or remote native evidence retrieval. Owner-reported 11-request/local suite success remains separately attributed and does not exercise this case. |
From #858 review. Laravel's unqualified distinct finds duplicates with in_array's loose ==, so true equals "workflow"; native compared PHP string casts and missed it. php_value::loose_eq implements PHP 8's == for decoded JSON values (booleans by truthiness, null against empty and zero values, numbers and numeric strings numerically, other strings exactly, arrays key by key), with a unit test, and distinct uses it. The worker-error-bodies fixture gains a poll with task_kinds [workflow, true], recorded against published 2.11.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed
|
|
Cloud exact-head delta review of
{"worker_id":"w","task_queue":"q","timeout_seconds":61,"task_kinds":{"a":"workflow","b":"workflow"}}The locked Laravel distinct implementation operates on expanded attribute keys, including associative PHP arrays. Handle both parent representations while excluding the current expanded key, and record this combined-error request against published PHP/native. Cloud reviewed the four-file delta and executed isolated PHP8.3.36 scalar controls plus the locked Laravel13.34.0 validation component, with no app bootstrap, network, mounts or retained test container. No Cloud Rust compilation, Server HTTP execution or remote native evidence retrieval occurred. Owner-reported 12-request/632-execution/359-lib results remain separately attributed; fresh hosted qualification must follow the corrected exact head. Additional exact-component evidence, October29 13:05UTC, for the same two findings:
The nested-array controls refine finding2: Laravel's |
… does From #858 review. - loose_eq compared numeric strings as floats, so "9007199254740992" equalled "9007199254740993". It now follows PHP 8: integer strings that fit compare as integers, an integer against a numeric string as compare_longs_to_string does, and two numeric strings as zendi_smart_str_equals does (integers overflowing to the same side, or equal infinities, compare as text). - distinct took candidates only from a list parent. It now takes them as Laravel's getDistinctValues does through Arr::dot: list or associative items, scalars, null and empty arrays, but not non-empty nested arrays. Eight control requests join the worker-error-bodies fixture, recorded against published 2.11.5, and a native test replays every fixture request and compares PHP's recorded answers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed
|
|
|
Cloud static follow-up review of The numeric comparison now preserves signed 64-bit integer comparisons before using floating point. Numeric-string comparison follows PHP's overflow and equal-infinity text fallbacks, while decimal/exponent forms retain PHP's floating-point behavior. Distinct candidates now include associative siblings and empty arrays and exclude nonempty nested arrays at this wildcard depth. I compared these branches with PHP 8.3's implementation and Laravel 13.34.0's candidate extraction. The fixture grows from 12 to 20 requests and expected answers, with all original 12 byte-for-byte unchanged as JSON values. The eight additions cover associative siblings, nonempty and empty nested arrays, integer precision, integer/string precision, overflow, equal infinities, and rounded exponent forms. Their error ordering and mirrored This is a static exact-source and fixture review. The earlier PHP/Laravel component execution is my independent evidence; the native execution and published-reference comparison are the owner's evidence, not a new Cloud execution. Normal merge and combined-source qualification remain the owner's responsibility; this review does not authorize Native publication or lift the separate #861 deployment/reference hold. Cumulative-source qualification, October 29 at 15:26 UTC: PR858 merged at15:25:36 as |



Part of #325.
What changed
Native's worker-plane error answers now match published PHP 2.11.5 for four kinds of request. I found them by sending the same malformed worker requests to both servers.
422 invalid_request,invalid_poll_timeout).WorkerController::pollWorkflowTasks,ActivityTaskController::poll). A failure is Laravel's422 validation_failed, with messages inerrorsandvalidation_errors, inside the worker envelope (protocol_version,server_capabilities).{message, reason}.guardAttemptOwnership's 404 body (task_id,activity_attempt_id, "Activity task not found.",task_not_found) in the envelope, as the complete route already gave.422 development_namespace_operation_unqualified.complete_workflowgot422 unsupported_payload_codecbefore PHP's 404.The port log's "Worker-plane error bodies" gap is closed.
Evidence
worker-error-bodies: ten raw worker HTTP requests on protocol 1.20 in a fresh namespace. Each records its status and body, withserver_capabilitiesreduced to whether it is present. Recorded locally: published 2.11.5 and a native image built from this source both pass.rust/tests/execution/worker_error_bodies.rs(four tests) fails on the previous source and passes now.worker_error_bodies(4 tests) and the node unit tests (357) pass.🤖 Generated with Claude Code