Skip to content

Allow service workers to reopen recorded conditions inside parallel and selection groups #601

Description

@rmcdaniel

User-visible defect

A service worker cannot safely reopen a condition inside an existing parallel or durable selection group after a signal leaves its predicate false. The worker retains the group's original identity and logical occurrence, but its new physical open_condition_wait command is rejected as invalid_commands.

This was found while qualifying cooperative cancellation for durable-workflow/.github#136. It occurs before the cancellation request. The actual Server run reports nine passing cases and two failures. Raw retained evidence. The old connected pipeline masked Cargo's exit through tee; that separate gate is corrected in Rust #55, and the failure remains authoritative.

Exact observed tuple: source Rust c8abb391ed86ea6a5a6c4c86435ab621f89d17d8, source Server 3c15bfb0f98e038febb657412f1ca97bbdb23ad8, published Workflow 2.3.1 (fb3f3e59a4342fdebf8ced6160798906c3ee4387). Published SDK/Server reproduction is still required before claiming a released-tuple outcome.

Reproduction

  1. Start a workflow with a timer and an authored condition inside a parallel or keyed selection group. The predicate requires two vote signals.
  2. Run a real Worker until the first ConditionWaitOpened is recorded.
  3. Send one selected-run vote signal.
  4. The same logical condition remains false and the Worker emits a physical reopen with the original occurrence and group path.
  5. Completion returns HTTP 409, invalid_commands. The workflow does not reach a second recorded open.

DefaultWorkflowTaskBridge::parallelCommandsMatchSequences compares original group member identity to the new physical sequence and requires all initial group members in the current command batch. Both requirements are appropriate for a new group, but do not admit a proven reopen of an already recorded member.

Acceptance

  • Reproduce with exact published Server and SDK artifacts and retain the failing counterfactual.
  • Admit a grouped condition reopen only with durable proof of its original run, occurrence, predicate, timeout and full group/member path. Preserve strict validation of new or changed groups.
  • Repeated false wakes must retain one logical condition, append valid physical waits, and avoid prematurely recording a durable selection winner.
  • Verify cold Worker replay, final satisfaction/timeout, adjacent calls and complete histories. Reject changed identities, reordered/nested group paths, malformed partial new groups and expired/stale claims without recording work.
  • Run affected Native/Server tests and exact published PHP/Python/Rust group-condition conformance before closing the released-product outcome.
  • Keep the cancellation draft's reopened-group cases and qualify their original request/delivery ranges after the prerequisite fix. Cooperative capability publication still belongs to the complete shared gate in .github#136.

This owns a concrete product prerequisite, not a new architecture or benchmark project.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:defectA public product behavior is incorrectpriority:P1High-priority product or release risk

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions