Skip to content

Return a query worker's plain result like PHP - #636

Merged
rmcdaniel merged 2 commits into
mainfrom
rust-325-query-worker-result
Oct 22, 2026
Merged

rmcdaniel merged 2 commits into
mainfrom
rust-325-query-worker-result

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325.

After #626, main's Shared Server fixtures still failed in mysql-execution and postgres-storage, in the SDK query directions profile (main run 39704552600). In the PHP-worker cases, the published Python client's hydrated response carried the query state in control_plane.result, while native's wire response had null.

Cause

  • Published PHP SDK workers complete a query task with both the plain result and its result_envelope.
  • Published PHP Server's completeQueryTask accepts both and returns the plain result beside the envelope; its control-plane envelope copies it.
  • Native required the envelope, ignored the plain result, and always answered result: null.

What changes

  • A completed query task keeps the worker's plain result.
  • The answer returns it, and its control-plane envelope copies it.
  • A plain result with no envelope is accepted, as PHP's rules allow. A completion with neither is still refused.
  • The plain result counts toward the query result budget.

Verification

  • A new integration test completes one query with a plain result and an envelope, and one with only a plain result. Both answers carry the plain result at the top level and in control_plane.
  • The full SQLite suite passes (351 integration, 204 library).
  • The query tests pass on PostgreSQL and MySQL (26 each).
  • The fixture job itself runs on this PR. execution-and-codec also failed on main, but its step log isn't reachable from my network path, so I can't yet confirm it shares this cause.

Checkpoint: docs/rust-server-port-checkpoints/2026-10-22-query-worker-result.md.

Published PHP SDK workers complete a query task with the plain result and
its envelope, and published PHP Server returns that plain result to the
caller and in the control-plane envelope. Native required the envelope,
dropped the plain result and answered result: null, so main's SDK query
direction profile saw the published Python client's hydrated result differ
from the wire response.
@rmcdaniel
rmcdaniel enabled auto-merge October 22, 2026 04:17
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 3d5e142 into main Oct 22, 2026
21 of 27 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-query-worker-result branch October 22, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants