Skip to content

fix(workflows): refuse new placements of sunset blocks in workflow edits - #9456

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/cli-legacy-blocks
Oct 29, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/cli-legacy-blocks

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Workflow edits (CLI, Chat, MCP — all go through the same operations engine) now refuse a new block whose type is sunset (legacy / deprecated), e.g. table instead of table_v2
  • Covers every creation path: add, loop/parallel nestedNodes children, insert_into_subflow, and an edit that switches a block's type
  • The refusal is a block_not_allowed skipped item whose reason names the successor (use "table_v2" instead) and whose details.replacedBy carries it, so the agent self-corrects
  • Placed sunset blocks keep executing and stay editable; only new placements are refused, matching the catalog, which already hides sunset blocks from blocks list
  • Agents were writing legacy block ids from memory; the catalog read side was already correct but the write side accepted them silently

Type of Change

  • Bug fix

Testing

  • lib/workflows/editing + lib/workflows/application suites: 542 passed
  • New tests in operations.test.ts fail with each guard (add, nested, insert, type switch) reverted and pass with the fix
  • bun run lint, check-block-registry.ts origin/staging
  • Type-check / check:audits / full suite left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • 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 Oct 29, 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 Oct 29, 2026 10:18pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Workflow edits now refuse new sunset blocks while keeping placed blocks editable.

  • Workflow edits reject new sunset blocks and suggest their replacements.

Reviews (2) · Last reviewed commit: "test(workflows): cover sunset refusal wh..." · Reviewed by Greptile

Comment thread apps/sim/lib/workflows/editing/operations.test.ts
@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 Oct 29, 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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit d444d58 into staging Oct 29, 2026
116 of 118 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/cli-legacy-blocks branch October 29, 2026 22:57

This branch was previously deployed

1 inactive deployment
Preview — 974ec26e Deployed Oct 29, 2026 by vercel[bot]
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