Skip to content

Rust #325: repair the remaining missing wait tasks - #901

Merged
rmcdaniel merged 1 commit into
mainfrom
rust-325-repair-waits
Nov 1, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
rust-325-repair-waits

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325.

Native's repair command and repair pass now create the missing task for the wait cases #887 still refused. Each case matches published Server 2.11.7 (TaskRepair::createMissingTask with WorkflowTaskPayload::forMissingWorkflowTask):

Case Task created
Received signal workflow task with forSignal's payload
Accepted update workflow task with forUpdate's payload; the update's open wait moves to it
Resolved child workflow task {workflow_wait_kind, open_wait_id, resume_source_kind: child_workflow_run, resume_source_id, child_call_id, child_workflow_run_id}
Pending condition or signal timeout the timer task again, available at the deadline; the wait moves to it
Fired condition or signal timeout the workflow task that applies the timeout, available when the timer fired

Every created task is ready with repair_count 1.

  • A run with a received signal and no open task is now projected as PHP projects it: a signal wait ("Waiting to apply signal …", signal-application:<id>) with liveness repair_needed. Before, native left it without a summary, so the repair command answered repair_not_needed.
  • No case is refused any more, so the development_workflow_task_repair_unqualified refusal and the pass's unported-recovery path are gone.

PHP findings. I recorded seven cases against the published image with each run's open task row deleted and maintenance stopped:

  • every case answered repair_dispatched, and the run was described as before;
  • native on this branch matches on task type, payload fields and the description afterwards;
  • native main refused the update, child and four timeout cases (422) and answered repair_not_needed for the signal.

The new checkpoint is docs/rust-server-port-checkpoints/2026-11-01-repair-missing-wait-tasks.md. It records two small native differences: the repaired timeout timer task keeps a condition occurrence id, and native's own accepted-update task payload is narrower than forUpdate.

Checks run locally

  • cargo test (all suites, SQLite): passed (368 lib, 649 execution, 2 upgrade_inspect).
  • workflow_repair tests on PostgreSQL 17 and MySQL: 4/4 passed on each.
  • Full execution suite on PostgreSQL: 644 passed, 5 failed. The failures are in completion_budget and worker_poll_fence, with stale_worker_registration. They ran while the host was overloaded and the MySQL suite ran alongside, and this change doesn't touch those paths.
  • Full MySQL execution suite: not completed locally (the host stalled), so CI's MySQL and MariaDB shards cover it.
  • Node unit suite, excluding ServerParityUpdateValidationTimingTest.mjs: 6459 passed, 1 failed. The failure is PhpImageContextTest, which needs a docker CLI the test container doesn't have.

🤖 Generated with Claude Code

Native's repair command and repair pass now create the missing task of a
run waiting on a received signal, an accepted update, a resolved child, or
a condition or signal wait's timeout, as published Server 2.11.7's
TaskRepair::createMissingTask does:

- a received signal, accepted update or resolved child gets a workflow
  task with forSignal's, forUpdate's or the child run's resume payload;
- a pending timeout gets its timer task again, available at the deadline;
- a fired timeout gets the workflow task that applies it.

A run with a received signal and no open task is now projected as PHP
projects it, waiting to apply the signal and needing repair, so the
command no longer answers repair_not_needed for it. The
development_workflow_task_repair_unqualified refusal is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel added this pull request to the merge queue Nov 1, 2026
@rmcdaniel

Copy link
Copy Markdown
Member Author

Sonar's one new issue is rust:S3776, cognitive complexity 39 against 30, on create_missing_timeout_task (task_repair.rs:346). It's a style finding, not a defect, and the quality gate passed. The function mirrors PHP's condition and signal timeout branches in one place. I'm accepting it for this slice; a later refactor can split the fired and pending paths. Enqueueing at 74c4ee7 with all 58 checks green and no review objection.

Merged via the queue into main with commit 39a3265 Nov 1, 2026
58 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-repair-waits branch November 1, 2026 09:37
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