Skip to content

Accept condition waits without a key or fingerprint like PHP - #713

Open
rmcdaniel wants to merge 1 commit into
mainfrom
rust-325-condition-fingerprint
Open

rmcdaniel wants to merge 1 commit into
mainfrom
rust-325-condition-fingerprint

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325.

Problem

Native refused an open_condition_wait command without a condition_key, or without a condition_definition_fingerprint of the form sha256: plus 64 hex digits. Published Server 2.11.1 accepts both.

Change

PHP's normalizeOpenConditionWaitCommand treats the key and fingerprint as optional strings of any form, trims them, and leaves them out when empty. Native now does the same:

  • ConditionWaitOpened and a condition timeout's TimerScheduled record only the fields that remain.
  • The open-wait projection stores no target name for a keyless wait.
  • The run summary reads a keyless wait as "Waiting for condition", as PHP's conditionLabel does.
  • A key or fingerprint that is not a string is still refused by the completion transport rules.

Observed live against the published image: a bare open_condition_wait records neither field. " ready " with fingerprint "any form" records ready and any form. Blank values are dropped.

Record: docs/rust-server-port-checkpoints/2026-10-23-condition-wait-fields.md.

Checks

  • New integration test keyless_condition_waits covers a bare wait, a padded key with an arbitrary fingerprint, blank values with a timeout, and a non-string key.
  • Full native SQLite suite passes locally (700 tests, no failures).

Published PHP treats an open_condition_wait's condition_key and
condition_definition_fingerprint as optional strings of any form, trimmed
and left out when empty. Native required both and a sha256 fingerprint. The
wait projection and run summary now read a keyless wait as PHP does.
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security review of exact 1414996fab53155cf324fa6300f1875c69e53c20: no tenant, authorization or data-boundary blocker found. The optional condition key and fingerprint still pass through completion_rules, where each is nullable-string only; the later normalization trims valid strings and drops only null/empty values. Keyless wait projection remains scoped by run and wait id. This is source disposition only: codec-deadline-health (mysql-8.4) is failed in run 40021032346 and its logs are unavailable while the run remains active, so the branch is not release-qualified and that original must remain failed/classified. No merge or ownership takeover requested.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Security qualification update for unchanged exact 1414996fab53155cf324fa6300f1875c69e53c20: the workflow is now terminal with four failed required jobs, not the single pending MySQL 8.4 cell visible during source review.

  • execution-and-codec failed the published-PHP / Python late-handler-sync query-authority control: the task was claimed and returned once, but the expected expired authority-loss evidence was empty (AssertionError: []).
  • codec-deadline-health (mysql-8.4) failed its original cell.
  • Both MySQL 8.0 execution jobs failed their main three-runtime/recovery step. Their later query-authority, worker-fencing and declared database-pressure steps passed, but that does not rescue the failed main steps.

The nullable condition-wait source boundary remains security-accepted as previously recorded; these failures are currently unclassified and mean the head is not merge- or train-qualified. Preserve all originals and classify/fix or rerun only with a concrete nondeterminism hypothesis. No Security rerun or source takeover.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Rust Server: classification of run 40021032346 attempt 2, before rerunning its failed jobs.

  • execution-and-codec (job 120694835452): the published PHP reference failed, not native. Output: Query client failed: target=php language=python mode=late-handler-sync protocol=1.20, with an empty authority_losses assertion. This is the query-authority client cohort that Rust #325: query-authority clients wait for the acknowledgement before stopping #720 is correcting, and it is unrelated to condition waits.
  • mysql-execution (mysql-8.0) (job 120694835559): one native difference, query-sdk-python-rust: 0 !== 200. A query request got no HTTP response, on one pairing and on MySQL 8.0 only. MariaDB and the existing-PHP MySQL matrix passed, as did every other query, signal and update pairing. I am treating it as transient. It may be the MySQL statement-close stall that Rust #325: send MySQL statement closes with the next command (#714) #717 removes.

I have rerun the failed jobs only.

rmcdaniel added a commit that referenced this pull request Oct 24, 2026
In late-handler-sync mode the client stopped as soon as the handler
returned, but the installed SDK logs the lost authority after that, so
the expired-authority assertion could see none (#713 attempt 2, PHP
target). worker.php waits for its Worker's refusal; every non-timely
Python mode now also waits, inside the 30 s original budget, for the
expired-authority evidence before stopping. Assertions are unchanged.
@rmcdaniel

Copy link
Copy Markdown
Member Author

Classification of the four attempt-2 failures at 1414996fab (run 40021032346, failed-step logs only). The queued attempt-3 rerun is cancelled; no rerun on this head.

Job Failure Classification
execution-and-codec 120694835452 published PHP reference, Python late-handler-sync, protocol 1.20: AssertionError: [], authority_losses: [] with returned: 1 Harness race fixed by #720 (source-accepted at 911b89a67): the client stopped the worker before the SDK logged the lost authority. Not a native defect: the failing target is PHP.
mysql-execution (mysql-8.0) 120694835559 native query-sdk-python-rust: 0 !== 200; the observer recorded a request with no response. Embedded and PHP recordings of the same cohort pass MySQL-family latency (#714)
mysql-execution (existing-php-mysql-matrix) 120694835556 native operator-metrics stage activity_retrying: extra task_transport and routing_health warnings MySQL-family latency (#714): those warnings mean a ready task waited past native's 3 s redispatch threshold
codec-deadline-health (mysql-8.4) 120694835574 Ordinary control operation deadline health false MySQL-family latency (#714), the same cell family #714 reproduced

Basis for the three MySQL rows:

Plan: after #717 merges, merge main into this branch and run fresh hosted checks. Any of these that recurs with #717 in place will be investigated as a separate defect, not rerun.

This branch has not been deployed

No deployments
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.

1 participant