Skip to content

fix(workflows): recover loads with legacy loop counts - #7843

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/workflow-load-performance
Sep 15, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
codex/workflow-load-performance

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Repair invalid stored loop counts before response validation so legacy workflows can load. Preserve valid counts, existing defaults, and collection and condition expressions.
  • Show workflow load errors with a retry action instead of leaving the canvas spinner visible after failure.

Type of Change

  • Bug fix

Testing

240 app tests and 15 shared persistence tests passed, covering all loop modes, serialization, collection iteration, response validation, retry recovery, and stale request failures. Lint, cleanup review, affected workspace type checks, all 46 repository audits, block registry validation, and docs manifest validation passed.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 15, 2026 2:29am UTC

Request Review

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the legacy normalization, retry lifecycle, and stale-response protections are consistent with their callers and contracts.

Summary

This PR restores loading for legacy workflows whose loop count was stored in a non-numeric representation and replaces an indefinite canvas spinner with a recoverable load-error state.

  • Repairs invalid loop block counts during normalized loading while preserving valid counts, absent-count defaults, and collection or condition expressions.
  • Adds a user-visible workflow load error with a same-workflow retry action.
  • Expands persistence, loop orchestration, retry, and stale-request coverage.

Diagram

sequenceDiagram
  participant User
  participant Canvas as Workflow canvas
  participant Registry as Workflow registry
  participant API as Workflow read API
  participant Loader as Normalized loader
  participant DB as Normalized tables

  User->>Canvas: Open workflow
  Canvas->>Registry: setActiveWorkflow(workflowId)
  Registry->>API: Fetch workflow envelope
  API->>Loader: Load normalized state
  Loader->>DB: Read blocks and subflows
  DB-->>Loader: Legacy loop count
  Loader->>Loader: Preserve numeric/absent count or repair invalid count
  Loader-->>API: Contract-valid workflow state
  API-->>Registry: Workflow envelope
  Registry-->>Canvas: Ready canvas

  alt Load fails
    API--xRegistry: Error
    Registry-->>Canvas: Error state
    Canvas-->>User: Unable to load workflow / Try again
    User->>Canvas: Try again
    Canvas->>Registry: setActiveWorkflow(workflowId)
  end
Loading

Reviews (1) · Last reviewed commit: "fix(workflows): recover loads with legac..."

@waleedlatif1
waleedlatif1 merged commit 44b6ea0 into staging Sep 15, 2026
33 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/workflow-load-performance branch September 15, 2026 02:33
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.

1 participant