Fix abort, missing goto, offline schedules and the cron 500 #66

Merged
jared merged 1 commits from fix-known-bugs into main 2026-11-23 00:26:34 -05:00
Owner

Closes #8, closes #20, closes #9. The four known-bug tests from #59 now pass as normal tests, so no test.failing is left.

#8: Abort really stops a workflow

Each workflow execution now gets an AbortController, and the abort route fires it:

  • the engine checks it before every step and stops;
  • wait steps, retry delays and waits for a worker's result all end as soon as it fires.

There's also a new test: aborting during a 20-second command stops the workflow within seconds and runs no further step.

A command already running on the worker still finishes there. Killing the process on the worker (cancel_command) would be a follow-up.

#20: A goto to a missing step

  • At run time: the execution now fails; before, it reported completed.
  • On save: a goto, route goto or prompt route pointing at a step id that doesn't exist gets a 400 (end is always valid).
  • Older workflows: one saved before this check still fails at runtime. The test writes one directly into the database to cover that.

#9: Schedules whose worker is offline

Instead of skipping silently, the scheduler records a failed run with the message "Worker offline: the scheduled command was not sent", which shows in Executions.

Bad schedules

An invalid cron expression, or any other bad schedule value, now gets a 400 with the parser's message instead of a 500.

Locally: integration 41/41, unit 135/135, lint is clean.

🤖 Generated with Claude Code

Closes #8, closes #20, closes #9. The four known-bug tests from #59 now pass as normal tests, so no `test.failing` is left. ## #8: Abort really stops a workflow Each workflow execution now gets an `AbortController`, and the abort route fires it: - the engine checks it before every step and stops; - `wait` steps, retry delays and waits for a worker's result all end as soon as it fires. There's also a new test: aborting during a 20-second command stops the workflow within seconds and runs no further step. A command already running on the worker still finishes there. Killing the process on the worker (`cancel_command`) would be a follow-up. ## #20: A goto to a missing step - **At run time:** the execution now **fails**; before, it reported `completed`. - **On save:** a `goto`, route `goto` or prompt route pointing at a step id that doesn't exist gets a 400 (`end` is always valid). - **Older workflows:** one saved before this check still fails at runtime. The test writes one directly into the database to cover that. ## #9: Schedules whose worker is offline Instead of skipping silently, the scheduler records a **failed run** with the message "Worker offline: the scheduled command was not sent", which shows in Executions. ## Bad schedules An invalid cron expression, or any other bad schedule value, now gets a 400 with the parser's message instead of a 500. Locally: integration 41/41, unit 135/135, lint is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-22 23:54:44 -05:00
Fix abort, missing goto, offline schedules and the cron 500 (#8, #20, #9)
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 32s
CI / Security (npm audit) (push) Successful in 15s
CI / Integration (api) (push) Successful in 4m4s
CI / Scan (secrets, workflows, shell) (push) Successful in 3m26s
CI / Lint (eslint) (pull_request) Successful in 1m12s
CI / Test (jest) (pull_request) Successful in 1m11s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 7m1s
CI / Integration (api) (pull_request) Successful in 7m41s
CI / UI screenshots (before/after) (pull_request) Successful in 28s
CI / UI (playwright) (pull_request) Successful in 4m41s
CI / Lint (eslint) (push) Successful in 24s
CI / Security (npm audit) (pull_request) Successful in 23s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI (playwright) (push) Successful in 3m41s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
dc732a1ec5
The four known-bug tests from #59 now pass as normal tests.

- #8 abort: each workflow execution gets an AbortController. The abort
  route fires it; the engine checks it before every step and stops; wait
  steps, retry delays and waits for a worker's result end as soon as it
  fires. New test: aborting during a 20 s command stops the workflow
  within seconds and runs no further step.
- #20 goto to a missing step: the execution now fails (it reported
  completed). Workflows are also checked on save: a goto, route or prompt
  route to a step id that doesn't exist is a 400 ('end' is always valid).
  A workflow saved before the check still fails at runtime (tested by
  writing one directly).
- #9 schedules whose worker is offline: instead of skipping silently, the
  scheduler records a failed run ('Worker offline: the scheduled command
  was not sent'), visible in Executions.
- An invalid cron expression (or any bad schedule) is a 400 with the
  parser's message instead of a 500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared merged commit 1a031515e7 into main 2026-11-23 00:26:34 -05:00
jared deleted branch fix-known-bugs 2026-11-23 00:26:55 -05:00
Sign in to join this conversation.