Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Jan 22, 2026

waleedlatif1 and others added 6 commits January 22, 2026 11:26
…cation (#2939)

* improvement(workflow-item): stabilize avatar layout and fix name truncation

* fix(avatars): revert overflow bg to hardcoded color for contrast
* fix(resolver): consolidate code to resolve references

* fix edge cases

* use already formatted error

* fix multi index

* fix backwards compat reachability

* handle backwards compatibility accurately

* use shared constant correctly
@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 22, 2026 9:30pm

Request Review

@waleedlatif1 waleedlatif1 changed the title v0.5.68: router block reasoning, executor improvements, variable resolution consolidation v0.5.68: router block reasoning, executor improvements, variable resolution consolidation, helm updates Jan 22, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 22, 2026

Greptile Summary

This release consolidates seven improvements across executor reliability, variable resolution, and UX enhancements. The changes include fixes for parallel execution error handling, router reasoning output, reference resolution consolidation, and workflow avatar stability.

Key Changes:

  • Fixed parallel execution to properly stop when blocks error instead of swallowing errors
  • Added reasoning output to Router V2 block with structured JSON response format
  • Consolidated reference resolution into centralized block-reference.ts system with schema validation
  • Fixed loop termination when condition blocks have dead-end branches
  • Improved child workflow error propagation with trace span visibility
  • Fixed Gmail messageId field visibility and avatar layout stability
  • Added per-deployment volume configuration for Helm deployments

All changes are well-tested with 460+ executor tests passing, comprehensive router tests, and new DAG builder validation tests.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are incremental improvements with comprehensive test coverage (460+ executor tests, router tests, DAG builder tests). The error handling improvements make the system more robust, and the reference resolution consolidation reduces code duplication. No breaking changes detected.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/executor/execution/engine.ts Added error flag and execution error tracking to properly stop parallel execution when blocks error, preventing errors from being swallowed
apps/sim/executor/handlers/router/router-handler.ts Added reasoning output to Router V2 with structured JSON response format and fallback handling for non-JSON responses
apps/sim/executor/variables/resolvers/block.ts Refactored to use new consolidated resolveBlockReference system with better error handling and backwards compatibility fallbacks
apps/sim/executor/utils/block-reference.ts New centralized block reference resolution system with schema validation and InvalidFieldError handling
apps/sim/executor/handlers/workflow/workflow-handler.ts Improved error handling to wrap child workflow errors and propagate childTraceSpans for better debugging visibility
apps/sim/executor/dag/builder.ts Fixed validation to check sentinel node existence before validating loop/parallel structure, preventing errors on disabled subflows

Sequence Diagram

sequenceDiagram
    participant User
    participant ExecutionEngine
    participant NodeOrchestrator
    participant RouterV2Handler
    participant ProviderAPI
    participant WorkflowHandler
    participant BlockResolver
    participant BlockReference

    User->>ExecutionEngine: Execute workflow
    ExecutionEngine->>NodeOrchestrator: executeNode(context, nodeId)
    
    alt Router V2 Block
        NodeOrchestrator->>RouterV2Handler: execute(context, block, inputs)
        RouterV2Handler->>BlockResolver: resolve route definitions
        RouterV2Handler->>ProviderAPI: POST with responseFormat schema
        Note over ProviderAPI: Native structured JSON response
        ProviderAPI-->>RouterV2Handler: {route: "id", reasoning: "why"}
        RouterV2Handler->>RouterV2Handler: Parse JSON response
        alt Invalid JSON fallback
            RouterV2Handler->>RouterV2Handler: Use plain text as route
        end
        RouterV2Handler-->>NodeOrchestrator: {selectedRoute, reasoning, selectedPath}
    end
    
    alt Workflow Block
        NodeOrchestrator->>WorkflowHandler: execute(context, block, inputs)
        WorkflowHandler->>WorkflowHandler: Create sub-executor
        WorkflowHandler->>ExecutionEngine: execute(childWorkflowId)
        ExecutionEngine-->>WorkflowHandler: ExecutionResult with logs
        WorkflowHandler->>WorkflowHandler: captureChildWorkflowLogs()
        alt Child workflow errors
            WorkflowHandler->>WorkflowHandler: Wrap error with childTraceSpans
            WorkflowHandler-->>NodeOrchestrator: throw Error with childTraceSpans
        end
        WorkflowHandler-->>NodeOrchestrator: {result, childTraceSpans}
    end
    
    alt Block Reference Resolution
        NodeOrchestrator->>BlockResolver: resolve("{{BlockName.field}}")
        BlockResolver->>BlockReference: resolveBlockReference(name, path, context)
        BlockReference->>BlockReference: Check schema for field validity
        alt Field not in schema
            BlockReference-->>BlockResolver: throw InvalidFieldError
            BlockResolver->>BlockResolver: Try backwards compatibility fallback
        end
        BlockReference-->>BlockResolver: {value, blockId}
        BlockResolver-->>NodeOrchestrator: resolved value
    end
    
    NodeOrchestrator-->>ExecutionEngine: {output, isFinalOutput}
    
    alt Execution Error
        NodeOrchestrator-->>ExecutionEngine: throw Error
        ExecutionEngine->>ExecutionEngine: Set errorFlag = true
        ExecutionEngine->>ExecutionEngine: Store executionError
        ExecutionEngine->>ExecutionEngine: Stop parallel execution
    end
    
    ExecutionEngine->>ExecutionEngine: handleNodeCompletion()
    ExecutionEngine->>ExecutionEngine: Process outgoing edges
    ExecutionEngine-->>User: ExecutionResult
Loading

* Fix always allow, credential validation

* Credential masking

* Autoload
@waleedlatif1 waleedlatif1 merged commit e9c4251 into main Jan 22, 2026
23 checks passed
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.

4 participants