Skip to content

#0227 workflows: add v1 if + delay nodes#178

Open
jiggai-automation-bot wants to merge 7 commits into
mainfrom
ticket/0227-if-delay
Open

#0227 workflows: add v1 if + delay nodes#178
jiggai-automation-bot wants to merge 7 commits into
mainfrom
ticket/0227-if-delay

Conversation

@jiggai-automation-bot
Copy link
Copy Markdown
Collaborator

@jiggai-automation-bot jiggai-automation-bot commented Mar 14, 2026

Implements v1 workflow runner support for if and delay nodes.

Changes

  • Adds if node evaluation (path + comparator) and writes node output with boolean value.
  • Adds delay node which pauses a run until resumeAt, then the runner tick can continue scheduling.
  • Extends edge evaluation: supports edge on=true/on=false for edges coming out of an if node (existing success/error/always unchanged).
  • Adds unit tests for if condition evaluation.

Ticket: development-team #227

@rjdjohnston rjdjohnston force-pushed the ticket/0227-if-delay branch from 5a55af4 to 5605755 Compare March 18, 2026 17:02
@rjdjohnston rjdjohnston force-pushed the ticket/0227-if-delay branch from 026733d to 30ea58e Compare March 19, 2026 19:50
Add first-class if and delay workflow node kinds while maintaining
the decomposed module structure from PR #183.

if node:
- Evaluates action.{lhs, op, rhs} using dot-path references to prior node outputs
- Supported operators: truthy, ==, !=, >, >=, <, <=, contains
- Edges can use on: 'true' | 'false' for conditional branching
- Writes boolean output to node-outputs/

delay node:
- Pauses run for action.delaySeconds or action.delayMs (max 7 days)
- Sets run status to 'paused' with resumeAt timestamp
- Runner/tick automatically resumes when resumeAt passes
- No new daemon needed — uses existing runner loop cadence

Changes by module:
- workflow-if.ts: NEW — evalIfCondition + lastIfValueFromRun
- workflow-types.ts: add 'if' | 'delay' to NodeKind, 'true' | 'false' to EdgeOn, resumeAt to RunLog
- workflow-utils.ts: pause semantics + true/false edge handling in pickNextRunnableNodeIndex
- workflow-node-executor.ts: if + delay node execution in inline runner path
- workflow-worker.ts: if + delay node execution in pull-based worker path
- workflow-tick.ts: pick up paused runs for resume
- workflow-runner.ts: re-export workflow-if (thin orchestrator preserved)

264/264 tests pass, 0 lint errors.
@rjdjohnston rjdjohnston force-pushed the ticket/0227-if-delay branch from 30ea58e to 7c33556 Compare March 19, 2026 19:52
- Merged workflow-types.ts to include all three node types
- Resolved conflicts after rebasing ticket/0227-if-delay onto main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant