Part of #45 (phase 3). The integration suite grows from 21 to 37 tests.
Workflow engine (workflows.int.js, 11 tests)
An execute step on all workers runs on all 3 workers.
A failing step fails the execution and stops the workflow.
parse reads KEY=VALUE output, and route jumps on it.
A false condition skips the step.
A prompt waits, refuses invalid options and routes on the answer (who answered is recorded).
Params: required ones are checked, values are substituted, and unsafe values (x; reboot) are refused before anything runs.
A dry run logs commands without running them.
An endless goto loop is detected and fails the execution.
An aborted execution stays failed.
Scheduler (scheduler.int.js, 5 tests)
A due schedule runs on its worker, completes, and moves next_run about 60 minutes ahead.
A disabled schedule doesn't run.
Only admins can create schedules (403 otherwise), and bad input gets a 400.
The test makes a schedule due by setting next_run in the database, the only place these tests reach past the API. The new PULSE_SCHEDULER_TICK_MS setting (default 60 s, minimum 1 s) lets the test stack tick the scheduler every second.
Known bugs, as test.failing
I checked that each one fails on exactly its own assertion:
Part of #45 (phase 3). The integration suite grows from 21 to **37** tests.
## Workflow engine (`workflows.int.js`, 11 tests)
- An execute step on all workers runs on all 3 workers.
- A failing step fails the execution and stops the workflow.
- `parse` reads `KEY=VALUE` output, and `route` jumps on it.
- A false `condition` skips the step.
- A `prompt` waits, refuses invalid options and routes on the answer (who answered is recorded).
- Params: required ones are checked, values are substituted, and unsafe values (`x; reboot`) are refused before anything runs.
- A dry run logs commands without running them.
- An endless `goto` loop is detected and fails the execution.
- An aborted execution stays failed.
## Scheduler (`scheduler.int.js`, 5 tests)
- A due schedule runs on its worker, completes, and moves `next_run` about 60 minutes ahead.
- A disabled schedule doesn't run.
- Only admins can create schedules (403 otherwise), and bad input gets a 400.
The test makes a schedule due by setting `next_run` in the database, the only place these tests reach past the API. The new `PULSE_SCHEDULER_TICK_MS` setting (default 60 s, minimum 1 s) lets the test stack tick the scheduler every second.
## Known bugs, as `test.failing`
I checked that each one fails on exactly its own assertion:
| Bug | What happens |
|---|---|
| #8 | Abort marks the execution failed, but the engine still runs the next step |
| #20 | A goto to a missing step ends as `completed` |
| #9 | A schedule whose worker is offline leaves no record at all |
| New | An invalid cron expression returns 500 instead of 400 |
When one of these is fixed, its test starts failing until the marker is removed, so the fixes come with tests already written.
Locally: integration 37/37, lint is clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- workflows.int.js (11): all-worker execute, failure stops the workflow,
parse to route, false conditions skip, prompts (invalid option refused,
routes on the answer), params (required, substituted, unsafe refused),
dry run, endless goto detection, abort stays failed.
- scheduler.int.js (5): a due schedule runs on its worker and advances
next_run; disabled schedules don't run; admin-only and input checks.
- Known bugs as test.failing (each verified to fail on its assertion):
abort doesn't stop the engine (#8), goto to a missing step completes
(#20), an offline worker's schedule leaves no trace (#9), and an invalid
cron expression returns 500 instead of 400.
- PULSE_SCHEDULER_TICK_MS (default 60 s, minimum 1 s) so the test stack
ticks the scheduler every second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared
merged commit f5a4333a8e into main2026-11-22 21:58:56 -05:00
jared
deleted branch engine-tests2026-11-22 21:59:00 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #45 (phase 3). The integration suite grows from 21 to 37 tests.
Workflow engine (
workflows.int.js, 11 tests)parsereadsKEY=VALUEoutput, androutejumps on it.conditionskips the step.promptwaits, refuses invalid options and routes on the answer (who answered is recorded).x; reboot) are refused before anything runs.gotoloop is detected and fails the execution.Scheduler (
scheduler.int.js, 5 tests)next_runabout 60 minutes ahead.The test makes a schedule due by setting
next_runin the database, the only place these tests reach past the API. The newPULSE_SCHEDULER_TICK_MSsetting (default 60 s, minimum 1 s) lets the test stack tick the scheduler every second.Known bugs, as
test.failingI checked that each one fails on exactly its own assertion:
completedWhen one of these is fixed, its test starts failing until the marker is removed, so the fixes come with tests already written.
Locally: integration 37/37, lint is clean.
🤖 Generated with Claude Code