Skip to content

Native: ignore a caller's trace context where PHP Server admits it - #566

Merged
rmcdaniel merged 2 commits into
mainfrom
rust-325-observability-carrier
Oct 21, 2026
Merged

rmcdaniel merged 2 commits into
mainfrom
rust-325-observability-carrier

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325. Native now ignores a caller's optional trace context where PHP Server admits it, so the context can no longer cause a business request to be refused.

Why

PHP Server's optional tracing (#558, Workflow #773) admits a top-level observability_context on start, signal, update, cancel and request-cancellation requests when it is enabled. Published PHP 2.5.14 ignores that field, and so does PHP with tracing disabled. Native refused it with 422 unsupported_request_field. A caller that sent the field without checking discovery would therefore have its start, signal, update or cancellation refused by native.

Change

  • The nine native handlers for those operations (current-run and selected-run forms) drop exactly that top-level field before reading the request.
  • Native does not validate, store, log or compare the field. A retried start with a different trace context is therefore the same request.
  • Native never advertises worker_protocol.server_capabilities.observability_context.
  • Terminate, every other route, the same name anywhere else in a body, and any other unknown field keep their existing handling.

Tests

  • trace_carriers sends each of the nine routes, with and without a carrier, to two identical workflows. It checks four things:
    • equal outcomes;
    • equal history event types;
    • no stored trace identifier in the description, observation or history;
    • a refused carrier on terminate, and a refused unknown field beside the carrier.
  • I removed the change from each of the nine handlers in turn. The test failed every time.
  • The test passes on SQLite, PostgreSQL 17 and MySQL 8.0. The full SQLite execution suite passes.

The takeover decision for PHP 2.10 databases that have Core 2.9's carrier columns is recorded on #325. It is not part of this change.

🤖 Generated with Claude Code

PHP Server's optional tracing admits a top-level observability_context on
start, signal, update, cancel and request-cancellation requests. Published
PHP 2.5.14 and PHP with tracing disabled ignore it; native refused it with
unsupported_request_field, so a caller that sent it without checking
discovery would have its business request refused. Those nine native
handlers now drop exactly that field unread. Native never advertises the
capability, and other routes, nested fields and unknown fields keep their
handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y-carrier

# Conflicts:
#	docs/rust-server-port.md
@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit bbaf7f7 into main Oct 21, 2026
17 of 22 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-observability-carrier branch October 21, 2026 08:54
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