Repository navigation
Rust #325: write only moved wait positions; answer prepared local-activity routes as PHP refuses them - #790
Merged
Conversation
Native ranked only open waits and rewrote every open wait's position on each transition, even when nothing moved. Resolved waits kept stale ordinals. Workflow #941's projector stores one chronological ordinal over every retained wait (opened milliseconds, then wait id) and applies the status ranking only when reading. Rank all of the run's waits in the database and return only rows whose stored position differs, then update those rows by primary key. Resolving a wait no longer moves any other wait, and a new wait is normally inserted at its final ordinal, so most transitions write no positions. Addresses #783. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…without the role Native advertises prepared_local_activities false, no groups and no cancellation policies, like a published PHP server whose installed bridge lacks the prepared role, so SDKs record local activities with record_local_activity. The eight prepared local-activity worker routes (prepare, recover, checkpoint, checkpoint-group, and the attempt's control, heartbeat, outcome and acknowledge-cancellation) now answer what that PHP server answers instead of 501: PreparedLocalActivityController::refused's 409 prepared_local_activity[_groups]_not_supported, listing request_protocol below 1.20 and installed_runtime_prepared_local_activity (plus the groups runtime for the group checkpoint), before any task is read. The cancellation-scope checkpoint stays unserved: PHP gates it on the same bridge role as the scope opening native serves, so refusing it would be a state PHP cannot be in. Serving the family is planned on #325. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns-prepared-local # Conflicts: # docs/rust-server-port.md # rust/tests/fixtures/unserved-php-routes.v2.11.1.txt
|
This was referenced Oct 26, 2026
Member
Author
|
Merged through the merge queue at 21:33Z as
Next for #325 is the combined Nexus PR (catalog administration, service-call execute/show/cancel, shared admission limits), already rebuilt on |
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Part of #325. Two small native-only changes, batched into one PR to save a CI cycle (each PR otherwise pays a PR cycle plus a merge-queue cycle). They don't touch each other, and each commit stands alone.
Review tier: advisory (pre-RC native). Both change only the native server. They touch no published PHP surface, credentials, production data or CI trust. Policy: #325 comment 6423232503.
1. Wait positions: write only the waits that moved (fixes #783)
Native ranked only a run's open waits and rewrote every open wait's
positionon each transition, even when nothing moved. Resolved waits kept stale ordinals. That is the write churn Workflow #941's projector removed from PHP.Native now stores one chronological ordinal over every retained wait (opened milliseconds, then wait id), as the projector does, and applies the status ranking only when reading:
position, wait_id. A database written by PHP, with or without the projector change, reads the same. No HTTP or protocol shape changes.2. Prepared local-activity routes answer PHP's refusal
Native advertises
prepared_local_activities: false, no groups and no cancellation policies, so SDKs userecord_local_activity. A worker that calls the prepared routes anyway now gets published 2.11.1's answer when its installed runtime lacks the prepared role, instead of 501:local-activities/{prepare,recover,checkpoint,checkpoint-group}andlocal-activities/{attemptId}/{control,heartbeat,outcome,acknowledge-cancellation}.reasonprepared_local_activity[_groups]_not_supported,required_capability,minimum_protocol_version"1.20",worker_id(PHP's string cast oflease_owner),remediation.unavailable: alwaysinstalled_runtime_prepared_local_activity, plusrequest_protocolbelow protocol 1.20 andinstalled_runtime_prepared_local_activity_groupsfor the group checkpoint.lease_owneris an array-to-string conversion in PHP (500). Native answers with an emptyworker_id.The eight routes leave
unserved-php-routes.v2.11.1.txt. The scope checkpoint stays unserved: PHP gates it on the same bridge role as scope open, which native serves, so it is real work, not a refusal.Qualification
Head
98f3597a, which merges maincaafa5b9(#773) into the two commits. The two changes merge without conflict; after the main merge,route_coverage,wait_positions,local_activitiesand the stream tests pass (14).wait_positionson SQLite, PostgreSQL 17, MySQL 8 and MariaDB 10.11: an unchanged set of waits writes no positions; a new or resolved wait writes only the waits whose ordinal moved.prepared_local_routes_are_refused_without_the_prepared_role(execution) and theprepared_localunit tests (3): every route, both capabilities, below and at protocol 1.20, andworker_idcasts.route_coveragepasses with the shortened list.cargo test --all-targets): lib 313, execution 535, upgrade_inspect 2.🤖 Generated with Claude Code