Files
windmill/backend/windmill-worker
Ruben FiszelandClaude Opus 4.8 402d8bf148 fix: match WAC waitForApproval resume to its own step (WIN-2240)
Sequential waitForApproval() calls in a workflow-as-code job all share the
same parent job_id. prepare_checkpoint_for_resume read the resume_job with
`WHERE job = $1 ORDER BY created_at ASC LIMIT 1`, so every approval after the
first re-injected the first approval's {value, approver, approved}. A canceled
or timed-out step also inherited the first approval's result.

Each approval already has a unique resume_id derived from its step key (used in
its resume/cancel URL and stored in resume_job.resume_id). Match on that so
each step consumes only its own resume event; a canceled step keeps
approved=false on its own row and a timed-out step matches no row and falls
back to the approved=false default. The key->resume_id hash is extracted into a
shared approval_resume_id() so URL generation and resume matching stay in sync.

Fixes WIN-2240

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 15:32:24 +00:00
..

Windmill Worker

The worker. Used to process and execute flows & jobs.

This crate exposes both a library as well as a binary target.