424309e3c3e26fce86485064817a8cf983b7698f
17
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e5d640dc1a |
Say what is wrong with a rejected workflow definition (#25)
CI / Lint (eslint) (pull_request) Successful in 20s
CI / Test (jest) (pull_request) Successful in 22s
CI / Security (npm audit) (pull_request) Successful in 13s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m32s
CI / Integration (api) (pull_request) Successful in 3m24s
CI / UI screenshots (before/after) (pull_request) Successful in 6s
CI / UI (playwright) (pull_request) Successful in 1m53s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
The server answered a bad goto or condition with "Invalid workflow definition" and put the details in a problems array, which the UI never shows (lt.api keeps only `error`). The error now names them, e.g. "Invalid workflow definition: step check: no step with id "notify"" (up to five, then "and N more"); problems stays for API clients. The rest of #25 was already fixed by the UI rewrite; regression tests now cover the server's reason in the form and Escape closing the Run dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
eda319e16a |
Executions list: show what a command ran and on which worker (#15)
CI / Test (jest) (pull_request) Successful in 27s
CI / Lint (eslint) (pull_request) Successful in 31s
CI / Security (npm audit) (pull_request) Successful in 11s
CI / Integration (api) (pull_request) Canceled after 1m56s
CI / Scan (secrets, workflows, shell) (pull_request) Canceled after 1m48s
CI / UI (playwright) (pull_request) Canceled after 0s
CI / UI screenshots (before/after) (pull_request) Canceled after 0s
CI / Deploy (pull_request) Canceled after 0s
CI / Deploy worker (pull_request) Canceled after 0s
CI / Notify (pull_request) Canceled after 0s
Every command execution was listed as "[Quick Command]". The list API now returns, for command executions, the first command (up to 120 characters) and the worker's name (from the first log entry, joined to workers), and the row shows them as `command @ worker`. Workflows keep their name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a945cd80d3 |
Merge pull request 'Run multi-target commands in parallel' (#75) from parallel-targets into main
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 20s
CI / Lint (eslint) (push) Successful in 29s
CI / Security (npm audit) (push) Successful in 15s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m1s
CI / Integration (api) (push) Successful in 2m50s
CI / UI (playwright) (push) Successful in 1m56s
CI / Deploy (push) Successful in 14s
CI / Deploy worker (push) Successful in 8s
CI / Notify (push) Successful in 3s
|
||
|
|
abb4b9326f |
Run multi-target commands in parallel (#26)
CI / Lint (eslint) (pull_request) Successful in 27s
CI / Test (jest) (pull_request) Successful in 19s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m58s
CI / Integration (api) (pull_request) Successful in 2m49s
CI / UI (playwright) (pull_request) Successful in 2m15s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 2m6s
- Workflow execute steps send to all targets at once and wait for every result (Promise.all), so one slow or hung worker no longer holds up the rest; any failed target fails the step. parallel: false keeps the old one-at-a-time order, stopping at the first failure, for rolling changes. (Log appends are atomic in SQL, so concurrent targets can't lose entries.) - Quick Command's multi-worker mode sends to every selected worker at once. - Integration tests: 3 workers x 2 s finish in about 2 s; parallel: false takes 6 s or more; one failing target fails the step after all report. - README: the parallel field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4cf3c084a9 |
Executions: Re-run Workflow, and search that finds commands (#18, #16)
CI / Test (jest) (pull_request) Successful in 23s
CI / Lint (eslint) (pull_request) Successful in 26s
CI / Security (npm audit) (pull_request) Successful in 15s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m42s
CI / Integration (api) (pull_request) Successful in 2m37s
CI / UI (playwright) (pull_request) Successful in 2m45s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 2m41s
- #18: a workflow execution's detail now offers Re-run Workflow, which starts the same workflow with the parameters from its params log entry (after a confirm listing them) and opens the new run. Quick commands keep Re-run Command. - #16: search runs on the server: workflow name, who started it, the id, or any command the execution ran (JSON_SEARCH over the logs). The page sends it as you type (debounced 300 ms, from the first page); the status filter stays local. - Regression tests for #12 (Create Workflow starts with the example) and #13 (dry run works for workflows without parameters), which the UI rewrite had already fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
39d28fb9e7 |
Executions: show runs waiting on a prompt; Automated tab filters on the server (#3, #4)
CI / Lint (eslint) (pull_request) Successful in 29s
CI / Test (jest) (pull_request) Successful in 24s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m48s
CI / Integration (api) (pull_request) Successful in 2m32s
CI / UI (playwright) (pull_request) Successful in 2m6s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 2m28s
- #3: the list response includes waiting_for_input for each execution (a running execution blocked on a prompt). The row shows it as 'waiting' (the design system's purple status) and the Waiting status filter, which could never match, now finds it. - #4: new only_internal=true filter (Gandalf and scheduler runs), used by the Automated tab, so it pages and counts on the server like the Manual tab; the client-side filter over one shared page is gone. - Tests: integration for waiting_for_input and both server filters; UI for the waiting status and the filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
93b1422300 |
Merge pull request 'Tests: fix two CI flakes seen on main' (#68) from test-flakes into main
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 32s
CI / Lint (eslint) (push) Successful in 36s
CI / Security (npm audit) (push) Successful in 17s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m40s
CI / Integration (api) (push) Successful in 3m18s
CI / UI (playwright) (push) Successful in 3m6s
CI / Deploy (push) Successful in 15s
CI / Deploy worker (push) Successful in 7s
CI / Notify (push) Successful in 4s
|
||
|
|
6d289a3bce |
Tests: fix two CI flakes seen on main
CI / Lint (eslint) (pull_request) Successful in 27s
CI / Test (jest) (pull_request) Successful in 1m4s
CI / Security (npm audit) (pull_request) Successful in 39s
CI / Integration (api) (pull_request) Successful in 4m18s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 3m50s
CI / UI screenshots (before/after) (pull_request) Successful in 10s
CI / UI (playwright) (pull_request) Successful in 2m39s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 1m15s
CI / Lint (eslint) (push) Successful in 1m20s
CI / Security (npm audit) (push) Successful in 27s
CI / Integration (api) (push) Successful in 3m42s
CI / Scan (secrets, workflows, shell) (push) Successful in 3m11s
CI / UI (playwright) (push) Successful in 2m38s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
- calculateNextRun interval: bounded by the clock before and after the call (its first use loads cron-parser, which took 30 s once on a loaded runner and broke the fixed 1 s tolerance). - Integration helper: retry a GET once when a pooled keep-alive connection is reset (ECONNRESET as the server closes it); writes are never retried. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
397f4dd778 |
Worker: keepalive, reconnect backoff, no crash loop at startup (#1, #29)
- #1: the worker pings the server every 30 s over the WebSocket; if the previous ping got no pong, the connection is dead (server restart or network drop without a close) and is terminated so it reconnects. The ws server answers pings itself, so the server needs no change. - #29: reconnects back off from 1 s doubling to 60 s with up to 20% jitter, reset on a successful connection; a failed first heartbeat is logged and retried instead of exiting into a systemd crash loop. - stop() no longer schedules a reconnect. - Tests: backoff bounds, missed pong terminates, pong keeps, startup with an unreachable server (unit and end to end). The #6 test now waits for the worker to show offline before sending one command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d517cae7e6 |
Fix orphaned quick commands, prompt timeouts and worker delete (#6, #21, #34)
- #6: a quick command to a disconnected worker is refused before an execution is recorded, instead of leaving one stuck in 'running'. - #21: an unanswered prompt fails the execution (prompt_timeout) instead of continuing as if someone had chosen; prompt and wait steps never wait past the execution's deadline, and a wait cut short by it fails with execution_timeout. PULSE_PROMPT_TIMEOUT_MS (minimum 1 s, default 60 min) lets the test stack use 8 s. - #34: deleting a connected worker is a 409 explaining it would re-register on its next heartbeat; offline workers delete as before. Tests for each (integration 45/45). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
073114c92e |
Abort kills the command on the worker (#8 follow-up)
- worker: commands run with spawn in their own process group (same timeout, 10 MB output limit and result fields as exec). A new cancel_command message (by command_id, or every command of an execution) sends SIGTERM to the group, then SIGKILL after 5 s; the result reports cancelled: true. Old workers ignore the message. - server: the abort route sends cancel_command to the worker running each of the execution's commands. - Tests: the whole process tree dies on cancel (a background child too), execution-wide cancel leaves other executions alone, and end to end an aborted quick command's process is gone from the worker. Liveness checks treat zombies as dead (an orphan waits to be reaped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
dc732a1ec5 |
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
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> |
||
|
|
040ad028c0 |
Safer workflow conditions; Pulse is admin-only
CI / UI screenshots (before/after) (push) Skipped
CI / Lint (eslint) (push) Successful in 25s
CI / Test (jest) (push) Successful in 25s
CI / Security (npm audit) (push) Successful in 21s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m0s
CI / Integration (api) (push) Successful in 2m23s
CI / Lint (eslint) (pull_request) Successful in 24s
CI / Test (jest) (pull_request) Successful in 32s
CI / Security (npm audit) (pull_request) Successful in 39s
CI / UI (playwright) (push) Successful in 2m6s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / Integration (api) (pull_request) Successful in 2m13s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m46s
CI / UI screenshots (before/after) (pull_request) Successful in 27s
CI / UI (playwright) (pull_request) Successful in 3m5s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
- Workflow conditions (step.condition and route `if`) are now parsed and interpreted by lib/condition.js instead of being run with Node's vm module. The language covers what workflows use: state/params lookups, parseInt/parseFloat/Number/String/Boolean, a few string methods, the usual operators with JavaScript semantics. Conditions can only read the workflow's own data. Every condition in the production workflows gives the same result as before (differential test, 150 random states each). - Creating and updating a workflow rejects conditions that don't parse (400 with the step and the error). - Creating a workflow requires admin, like editing already did. - Only the admin group may use Pulse (pages, API and live WebSocket); employees get 403. Gandalf and workers use API keys and are unaffected. - The live-update UI test finds its execution's row by id instead of counting rows (the list is capped at 50). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a34867af92 |
Integration tests for the workflow engine and the scheduler
CI / UI screenshots (before/after) (push) Skipped
CI / Lint (eslint) (push) Successful in 17s
CI / Test (jest) (push) Successful in 18s
CI / Security (npm audit) (push) Successful in 9s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m2s
CI / Integration (api) (push) Successful in 2m31s
CI / Lint (eslint) (pull_request) Successful in 16s
CI / Test (jest) (pull_request) Successful in 15s
CI / Security (npm audit) (pull_request) Successful in 7s
CI / UI (playwright) (push) Successful in 1m39s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / Integration (api) (pull_request) Successful in 1m51s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m24s
CI / UI screenshots (before/after) (pull_request) Successful in 6s
CI / UI (playwright) (pull_request) Successful in 2m21s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
- 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> |
||
|
|
ea939d4430 |
Worker deploys from CI, with version reporting (#40)
CI / Lint (eslint) (push) Successful in 14s
CI / Test (jest) (push) Successful in 18s
CI / Security (npm audit) (push) Successful in 12s
CI / Integration (api) (push) Successful in 1m14s
CI / Scan (secrets, workflows, shell) (push) Successful in 1m29s
CI / Lint (eslint) (pull_request) Successful in 19s
CI / Test (jest) (pull_request) Successful in 13s
CI / Security (npm audit) (pull_request) Successful in 7s
CI / UI (playwright) (push) Successful in 1m43s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / Integration (api) (pull_request) Successful in 1m51s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m20s
CI / UI (playwright) (pull_request) Successful in 1m37s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
- The worker reports its commit (VERSION file, or git rev-parse in a checkout) in worker_connect and heartbeat metadata. The server keeps it per live socket and /healthz lists worker_versions. - deploy/pulse_worker_deploy.sh <sha> <ts>, for the webhook on a worker host: replay and age checks, commit must be on main, installs worker.js and the npm manifests from exactly that commit, writes VERSION, npm ci, restarts, waits until /healthz lists the sha, else restores the previous files. Sandbox tests cover deploy, replay, stale and malformed input, off-main commits, no-op redeploys and rollback. - New CI job Deploy worker after Deploy: only when worker/ or the npm manifests changed since the commit the workers report, so unrelated merges don't restart the worker; then waits for the worker to reconnect on the new commit. - README: Worker deploys (install, hook definition, adding a worker host). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
67a9e1c009 |
Integration tests: wait for a worker's WebSocket, not just its heartbeat
CI / Security (npm audit) (push) Successful in 21s
CI / Test (jest) (push) Successful in 23s
CI / Scan (secrets, workflows, shell) (push) Successful in 14s
CI / Integration (api) (push) Successful in 1m58s
CI / Lint (eslint) (pull_request) Successful in 44s
CI / UI (playwright) (push) Successful in 3m9s
CI / Test (jest) (pull_request) Successful in 42s
CI / Security (npm audit) (pull_request) Successful in 30s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 11s
CI / Integration (api) (pull_request) Successful in 1m44s
CI / Lint (eslint) (push) Successful in 13s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 1m45s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
Under load a new worker's first heartbeat marked it online before its WebSocket had connected, so a test's first command was refused, and the cleanup in finally then threw its own error and hid the real one. startWorker now waits until the server accepts a probe command for the worker, and cleanup never throws (offline status has its own test). Reproduced 1 in 6 under UI-test load before; 0 in 10 after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
def926d41e |
Integration tests for the Gandalf contract, auth and reliability; fix worker offline status
CI / Lint (eslint) (push) Successful in 46s
CI / Security (npm audit) (push) Successful in 26s
CI / Integration (api) (push) Successful in 1m31s
CI / Test (jest) (pull_request) Successful in 50s
CI / UI (playwright) (push) Successful in 2m31s
CI / Integration (api) (pull_request) Successful in 1m58s
CI / Test (jest) (push) Successful in 13s
CI / Deploy (push) Skipped
CI / Notify (push) Skipped
CI / UI (playwright) (pull_request) Successful in 2m16s
CI / Lint (eslint) (pull_request) Successful in 15s
CI / Security (npm audit) (pull_request) Successful in 15s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
New CI job `Integration (api)` (#45 phase 3) runs the real server and three workers on Node 20 against MariaDB and tests them as a black box over HTTP and WebSocket (20 tests, about 12 s): - Gandalf contract: submit and poll, stdout from command_result, failures with exit code and stderr, 401 for wrong or missing key, 400 for missing fields or an unknown worker, 404 for an unknown execution - Auth: SSO identity, 401/403, heartbeat key, /healthz exposes only status; WebSocket upgrade refused without credentials, with a wrong key or a wrong group; live events reach a signed-in browser; a browser socket cannot forge a command result - Reliability: a worker killed mid-command fails the execution at once; a worker at capacity answers with a failure; an aborted execution stays failed when the late result arrives; a disconnected worker shows offline The last test found a bug from #42: the close handler deleted the worker's runtime-id entry before checking whether the socket was still live under its database id, and the two ids are normally the same key. So a disconnected worker was never marked offline and showed 'online' until the stale heartbeat sweep. Gandalf was unaffected (it checks live sockets). MariaDB setup for CI moves to scripts/ci/mariadb.sh, shared by both jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |