Skip to content

v0.5.106: condition block and legacy kbs fixes, GPT 5.4#3431

Merged
icecrasher321 merged 4 commits intomainfrom
staging
Mar 6, 2026
Merged

v0.5.106: condition block and legacy kbs fixes, GPT 5.4#3431
icecrasher321 merged 4 commits intomainfrom
staging

Conversation

@icecrasher321
Copy link
Collaborator

@icecrasher321 icecrasher321 commented Mar 6, 2026

Summary

waleedlatif1 and others added 3 commits March 5, 2026 11:59
* feat(models): add gpt-5.4 and gpt-5.4-pro model definitions

* fix(providers): update test for gpt-5.4-pro missing verbosity support
* fix(kbs): legacy subblock id migration + CI check

* cleanup migration code

* address regex inaccuracy
…highlighting, duplicate terminal logs (#3429)

* fix(condition): consecutive error logging + execution dequeuing

* fix snapshot highlighting

* address minor gaps

* fix incomplete case

* remove activatedEdges path

* cleanup tests

* address greptile comments

* update tests:
@cursor
Copy link

cursor bot commented Mar 6, 2026

PR Summary

Medium Risk
Touches core workflow execution routing/logging (conditions, edge activation, loop/parallel sentinels) and workflow-state migrations, so regressions could affect which blocks run and how runs are visualized. Changes are covered by expanded unit tests and are mostly additive/guarded.

Overview
Fixes workflow execution edge/path handling and improves run visualization. The executor now distinguishes true dead-ends from intentionally routed dead-ends (via selectedOption/selectedRoute) and only queues loop/parallel sentinels when they belong to the same enclosing subflow, preventing downstream subflows from firing and avoiding unintended execution.

Improves condition and subflow output semantics. Condition blocks now always set selectedOption even when the chosen branch has no outgoing edge, and they filter control fields (error, _pauseMetadata) from propagated source output. Loop/parallel orchestrators emit start/complete events and logs for empty/short-circuited subflows so containers appear in snapshots and edge highlighting.

Aligns client-side edge highlighting with executor behavior. The UI marks outgoing edges on completion/error using a shared helper that mirrors executor activation rules (condition/router handles, error/source), and preview rendering now uses executed block output to correctly color condition/router edges.

Adds guardrails for subblock ID renames and expands migrations. Introduces migrateSubblockIds (initially knowledgeBaseIdknowledgeBaseSelector) integrated into workflow persistence via a migration pipeline, plus a new CI script/step (check-subblock-id-stability.ts) that fails PRs removing subblock IDs without a declared migration.

Updates model catalog. Adds gpt-5.4/gpt-5.4-pro (and Azure variant) definitions and adjusts provider capability tests accordingly.

Written by Cursor Bugbot for commit d640fa0. Configure here.

@vercel
Copy link

vercel bot commented Mar 6, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 6, 2026 1:26am

Request Review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR bundles three focused fixes — condition block dead-end routing, legacy knowledge-block subblock ID migration, and new GPT-5.4 model definitions — along with supporting infrastructure (migration pipeline, CI stability check, empty-subflow SSE events).

Key changes:

  • Condition dead-end routing: The condition handler now always returns selectedOption even when the matched branch has no outgoing edge, allowing EdgeManager to distinguish deliberate "routed dead-ends" from true dead-ends. Only the enclosing loop/parallel sentinel fires in the routed case, preventing spurious execution.
  • Edge highlighting: Client-side edge colouring now happens on block completion (marking outgoing edges based on output) rather than block start. Condition and router handles are correctly highlighted using actual output data.
  • Empty-subflow SSE events: Loops and parallels skipped due to empty collection or false initial condition now emit onBlockStart/onBlockComplete events for visibility in logs and snapshot highlighting.
  • Subblock ID migration system: A new SUBBLOCK_ID_MIGRATIONS registry and migrateSubblockIds function handle legacy key renames (e.g. knowledgeBaseIdknowledgeBaseSelector) at workflow load time, backed by a CI script that enforces migration entries for any future renames.
  • GPT-5.4 / GPT-5.4-pro models: Adds pricing, 1M token context window, and capability metadata; gpt-5.4-pro deliberately omits verbosity and cachedInput.

Findings:

  • The CI safety check's regex is too strict — it only extracts subblock IDs if id is the first property in each object, risking silent misses on non-standard field ordering.
  • Dead-code guard in shouldActivateEdgeClient is unreachable and should be removed.

Confidence Score: 4/5

  • Safe to merge — the logic is well-tested and fixes address real production bugs. Two findings point to areas of fragility worth addressing.
  • The condition-routing and edge-highlighting logic are sound and well-covered by tests. The subblock migration system is well-designed. The two verified issues are: (1) a regex in the new CI script that could silently miss subblock IDs if field ordering varies, which reduces the safety net's effectiveness rather than causing a production bug; and (2) unreachable dead code in an edge-marking helper that should be cleaned up for clarity. Both are worth fixing but don't block this PR.
  • apps/sim/scripts/check-subblock-id-stability.ts — the regex pattern should be broadened to match id: anywhere in the subblock object, not just immediately after the opening brace.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Condition Block Executes] --> B{Matching condition found?}
    B -- No match --> C[selectedCondition = null\nconditionResult = false]
    B -- Match found --> D{Has outgoing edge?}
    D -- Yes --> E[selectedConnection set\nselectedOption = conditionId\nconditionResult = true]
    D -- No / Dead-end --> F[selectedConnection = null\nselectedOption = conditionId\nconditionResult = true]

    E --> G[EdgeManager.processOutgoingEdges]
    F --> G
    C --> G

    G --> H{activatedTargets.length == 0?}
    H -- No, some edges fired --> I[Normal flow: activated targets queued]
    H -- Yes, dead-end --> J{isRoutedDeadEnd?\nselectedOption OR selectedRoute set?}
    J -- No true dead-end\nselectedOption null --> K[Queue cascadeTargets normally\nloop sentinel fires]
    J -- Yes routed dead-end\nselectedOption set --> L{isEnclosingSentinel?\nsource.loopId == sentinel.loopId?}
    L -- Yes same subflow --> M[Queue enclosing sentinel only\nloop can continue/exit]
    L -- No downstream subflow --> N[Skip sentinel\nprevents spurious execution]

    style F fill:#f9f,stroke:#333
    style M fill:#9f9,stroke:#333
    style N fill:#f99,stroke:#333
Loading

Last reviewed commit: d640fa0

@icecrasher321 icecrasher321 merged commit 3ce9475 into main Mar 6, 2026
26 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.

2 participants