Skip to content

Cover flow validation and execution edge cases #16

Description

@brudex

Proposed labels: testing, area:flows, help wanted

Context

Server-side workflow validation enforces graph rules, while flow execution
decides which reachable nodes run or are skipped. The separate flow-builder
tests do not provide equivalent server-side coverage for malformed graphs and
branch execution behavior.

Suggested starting points

  • services/flow/flow-workflow-validation.js
  • services/flow/flow-executor.service.js
  • services/flow/flow-node-executor.service.js
  • services/flow/nodes/
  • social-flow-builder/tests/unit/ (for existing graph examples only)
  • new root tests under test/

Scope

Add table-driven server-side tests for malformed connections, duplicate IDs or
names, entry-point rules, side-channel nodes, cycles, and one valid minimum
graph. Use mock node handlers to prove non-selected branches do not execute.

Non-goals

  • Do not alter workflow JSON semantics or the browser flow-builder UI.
  • Do not execute real publish, HTTP-request, AI, or JavaScript node side
    effects in tests.

Acceptance criteria

  • Invalid graph cases return the current structured validation outcome and do
    not throw unexpectedly.
  • A valid minimum graph passes validation and executes its selected path.
  • Mocked handlers demonstrate skipped branches do not run.
  • Tests are isolated from external services and pass through npm test.

Verification

  1. Run npm test twice.
  2. Inspect test doubles to confirm no node can perform a real external action.
  3. Run git diff --check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:flowsSocial Flow builder and executionhelp wantedExtra attention is neededtestingTest coverage and test infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions