Skip to content

(CODUX-105) Schedule node-flow runs - #2597

Merged
numnx merged 1 commit into
feature/CODUX-173-repeatable-node-flowsfrom
task/feature-codux-173-repeatable-node-flows-t04-codex-mrajvqua
Jul 7, 2026
Merged

(CODUX-105) Schedule node-flow runs#2597
numnx merged 1 commit into
feature/CODUX-173-repeatable-node-flowsfrom
task/feature-codux-173-repeatable-node-flows-t04-codex-mrajvqua

Conversation

@numnx

@numnx numnx commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Schedule node-flow runs

Automated task PR opened by Code UX for T04.

📋 Summary

Sprint: Sprint 173 · Repeatable node flows · Task: T04

Implement repeatable n8n-style node workflows in Code UX with durable flow definitions, node invocation execution, MCP automation, agent skill attachment, scheduler support, an editable dashboard canvas, and current documentation.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-07 11:13:07 UTC
Finished 2026-07-07 11:53:37 UTC
Duration 40m 29s

📊 Token Usage

Metric Value
Input tokens 171,120
Cached input tokens 5,686,272
Output tokens 25,982
Total tokens 5,883,374
Invocations 2
Tool calls 92
Active time 10m 30s

Included usage estimate (subscription/local login): $4.48

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Make node workflows schedulable through the existing scheduler engine, including backend contracts, MCP scheduler normalization, due-run execution, and persisted target payloads.

## Scope
- Edit `src/contracts/scheduler-types.ts`
- Edit `src/repositories/scheduler-repository.ts`
- Edit `src/services/scheduler-service.ts`
- Edit `src/mcp/management/scheduler-actions.ts`
- Edit `src/contracts/internal-management-types.ts`
- Edit `src/contracts/mcp-tool-definitions.ts`
- Edit `src/server/scheduler-routes.ts` only if request/response typing or route validation needs updates
- Edit `src/server/code-ux-server.ts` only if `SchedulerServiceDeps` requires `NodeFlowRuntimeService`
- Add or update tests under `tests/backend/repositories/`, `tests/backend/services/`, and `tests/backend/mcp/`

## Implementation Requirements
1. Add `node_flow` to `ScheduleTargetType` and define `ScheduleNodeFlowTarget` with `flowId`, optional JSON `input`, and optional `flowVersion` or version pin if T01 introduced version history.
2. Extend scheduler target serialization/deserialization in `SchedulerRepository` so `target_json` can store and round-trip `nodeFlowTarget` without breaking existing sprint, quicksprint, chat, or memory remediation rows.
3. Update `SchedulerService.executeEntry` to call `NodeFlowRuntimeService.runFlow` for `node_flow` entries and include scheduler metadata in the run options.
4. Add project ownership validation so only node flows from the selected project can be scheduled or executed by due-run processing.
5. Extend `SchedulerActions` and `manage_scheduler` schemas to accept `schedule_node_flow`, generic `create` with `targetType: "node_flow"`, flattened `flowId`, nested `nodeFlowTarget`, and optional JSON input.
6. Preserve recurrence, pause/resume, run count, failure marking, and `run_due` semantics for all existing scheduler targets.
7. Add tests for create/update/list/run-due behavior for node-flow entries and regression tests proving existing sprint/quicksprint/chat/memory remediation scheduler targets still round-trip.

## Constraints
- Do not add a second scheduling table or scheduler loop.
- Do not execute a node flow before `next_run_at` is due.
- Do not mark a schedule entry succeeded if `NodeFlowRuntimeService.runFlow` throws before creating or completing the run.
- Keep target details inside `target_json` to preserve row compatibility.

## Verification
- Run focused scheduler repository, service, and MCP action tests.
- Run `pnpm run test:backend`.
- Run `pnpm run lint` and confirm scheduler target unions are exhaustive.
🌿 Branch Info

Base: feature/CODUX-173-repeatable-node-flows
Head: task/feature-codux-173-repeatable-node-flows-t04-codex-mrajvqua


🤖 Generated by Code UX

@numnx
numnx merged commit 38e3c9f into feature/CODUX-173-repeatable-node-flows Jul 7, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-173-repeatable-node-flows-t04-codex-mrajvqua branch July 7, 2026 11:56
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