fix: capture job baseline before POST to avoid race condition #60
Reference in New Issue
Block a user
Delete Branch "feat/jobs-system"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The previous version snapshotted last_run_id after the 201 response,
but jobs fire immediately server-side — by the time the client fetched
/api/jobs the runs were already complete, so the baseline matched the
new state and the poll loop never detected completion.
Baseline is now captured before the creation POST so it always
reflects pre-run state regardless of job speed.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com