Skip to content

Conversation

@fiftin
Copy link
Collaborator

@fiftin fiftin commented Nov 25, 2025

GEMINI 3

Implement Workflow feature to allow chaining tasks into pipelines with conditional and parallel execution.

This PR introduces the core components for the Workflow system:

  • New database models and migrations for workflows, nodes, links, and runs.
  • REST API endpoints for managing workflows and triggering runs.
  • A Go-based workflow execution engine that integrates with the existing TaskPool.
  • A basic Vue.js frontend for workflow creation/editing (drag-and-drop nodes, link management) and viewing run history.

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Nov 25, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

links, err := e.store.GetWorkflowLinks(workflow.ProjectID, workflow.ID)
if err != nil { log.Error(err); return }

nodes, err := e.store.GetWorkflowNodes(workflow.ProjectID, workflow.ID)
// But triggering creates new running nodes.
// So we check active nodes count.

activeNodeRuns, err := e.store.GetWorkflowNodeRuns(workflow.ProjectID, runID)
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +94 to +98
// Fetch projectID from workflow via run
run, err := e.store.GetWorkflowRun(0, runID)
if err != nil {
log.Error("Failed to get workflow run", err)
e.failNodeRun(newNodeRun, "Failed to get workflow run")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Workflow engine fetches runs with project ID 0

In triggerNode the workflow run is loaded with GetWorkflowRun(0, runID), but the SQL for that method joins workflow_run against workflow on the provided project ID. Passing 0 means the lookup always returns “not found”, so every task node immediately logs “Failed to get workflow run”, is marked as error, and no tasks are ever queued for execution. The engine needs to pass the real project ID (from the workflow or run) to allow workflows to run at all.

Useful? React with 👍 / 👎.

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.

3 participants