Skip to content

[codex] refactor workflow executor node handlers#270

Merged
mbakgun merged 5 commits into
mainfrom
refactor/workflow-executor
Jun 29, 2026
Merged

[codex] refactor workflow executor node handlers#270
mbakgun merged 5 commits into
mainfrom
refactor/workflow-executor

Conversation

@mbakgun

@mbakgun mbakgun commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Refactors the monolithic WorkflowExecutor._execute_node_logic node dispatch into modular per-node handlers under backend/app/services/node_execution/nodes/.

What Changed

  • Added NodeExecutionContext and a node handler registry for workflow node execution.
  • Moved existing node-specific business logic into one handler module per node type without intentional behavior changes.
  • Kept WorkflowExecutor responsible for orchestration, retries, tracing, cancellation, pinned data handling, and final NodeResult packaging.
  • Added an AGENTS.md directive so future node execution logic goes through modular handlers instead of new executor branches.
  • Added a check.sh guard that fails fast when tracked frontend/backend text files exceed 10,000 lines.
  • Kept CI E2E on the default Playwright worker mode after the 8-worker/full-parallel run exposed shared-state E2E flakiness.

Impact

This reduces the workflow_executor.py god-file surface and gives each node type a clear backend home while preserving current runtime behavior and existing patch seams used by tests.

Validation

  • SECRET_KEY=test-secret-key-for-tests-only-32-bytes uv run pytest tests/test_workflow_executor_branching.py tests/test_json_output_mapper_node.py tests/test_mcp_call_node.py tests/test_websocket_node.py tests/test_discord_node.py tests/test_send_email_node.py tests/test_bigquery_node.py tests/test_github_node.py tests/test_drive_node.py tests/test_linear_node.py tests/test_amazon_s3_node.py
  • SECRET_KEY=test-secret-key-for-tests-only-32-bytes ./check.sh
  • Full backend suite from ./check.sh: 1696 passed
  • ./run_e2e.sh: 66 passed

@mbakgun mbakgun marked this pull request as ready for review June 29, 2026 16:55
@mbakgun mbakgun merged commit 3434018 into main Jun 29, 2026
2 checks passed
@mbakgun mbakgun deleted the refactor/workflow-executor branch June 29, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant