GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(deploy): resolve the error-output flag from edges on both sides of change detection by waleedlatif1 · Pull Request #6754 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A block can hold errorEnabled: false while an error edge still leaves it — setBlockErrorEnabled doesn't remove existing error edges, both block renderers draw the port on errorEnabled || hasErrorConnection, and the executor never reads the flag at all (the edge alone decides routing). The two spellings are one state.
  • Only the deployed side reconciled them: materializeDeploymentState backfills errorEnabled: true for any block with an error edge, while the live normalized tables are read verbatim. Change detection compared the raw flag and saw true against false for a block that hadn't changed.
  • No redeploy could clear it — deploying snapshots the live false, which the next read backfills straight back to true. The deploy button sat on "Update" permanently, and checkNeedsRedeployment (raw jsonb, skips the backfill) disagreed with the button.
  • Lifted the rule into @sim/workflow-types as collectErrorSourceBlockIds / resolveEffectiveErrorEnabled so the backfill and the comparison share one definition, and applied it to both sides of the diff. Compared outside the structural gate, since the flag can match while the edges disagree.

Type of Change

  • Bug fix

Testing

  • 3 regression tests in compare.test.ts; verified they go red when the fix is neutered
  • Full apps/sim suite: 25742 passed, 0 failed
  • bunx turbo run type-check (24 packages) and bun run check:audits (27 audits) clean
  • Confirmed against a real affected workflow: deployed snapshot and live normalized tables matched byte-for-byte across blocks, edges, loops, parallels and variables, so the only difference was the one-sided backfill

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@vercel

vercel Bot commented Aug 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 16, 2026 12:31am

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Aug 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches deploy/change-detection logic for error routing, but the change aligns comparison with existing UI and executor behavior and is covered by targeted regression tests.

Overview
Fixes workflows stuck on Update when a block has errorEnabled: false but still has a connected error edge — a state the UI and executor already treat as “error output on.”

Shared rule in @sim/workflow-types: collectErrorSourceBlockIds and resolveEffectiveErrorEnabled treat the flag and error edges as one state (flag or error edge ⇒ on).

Change detection now uses that rule on both live and deployed snapshots when comparing errorEnabled, instead of only backfilling the deployed side in materializeDeploymentState. That one-sided compare made redeploy snapshot the live false, which the next read backfilled to true again.

Regression tests cover flag-only vs edge-backed cases in compare.test.ts.

Reviewed by Cursor Bugbot for commit af0fb83. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes error-output change detection resolve the effective state from both the block flag and outgoing error edges, sharing that logic with deployment materialization.

  • Adds shared helpers for collecting error-edge sources and resolving effective error-output state.
  • Applies the effective state symmetrically during workflow comparison.
  • Adds regression coverage for stale false flags with live error edges.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/workflows/comparison/compare.ts Compares effective error-output state outside the structural block gate and contains the requested documentation-comment fix.
apps/sim/lib/workflows/persistence/utils.ts Reuses the shared error-source collector while preserving deployment-state backfilling.
packages/workflow-types/src/workflow.ts Introduces shared canonical helpers for interpreting error edges and effective error-output state.
apps/sim/lib/workflows/comparison/compare.test.ts Adds regression tests covering symmetric edge-derived state and genuine flag-only changes.

Reviews (2): Last reviewed commit: "chore(deploy): use TSDoc for the error-o..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot]
greptile-apps Bot reviewed Aug 16, 2026
View reviewed changes
Comment thread apps/sim/lib/workflows/comparison/compare.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

waleedlatif1 added 2 commits August 15, 2026 17:25
@waleedlatif1
fix(deploy): resolve the error-output flag from edges on both sides o…
8e0c46c
…f change detection

A block can hold `errorEnabled: false` while an error edge still leaves it.
`setBlockErrorEnabled` does not remove existing error edges, both block renderers
draw the port on `errorEnabled || hasErrorConnection`, and the executor never
reads the flag at all — the edge alone decides routing. So the two spellings are
one state, and nothing about the block has functionally changed.

Only the deployed side reconciled them. `materializeDeploymentState` backfills
`errorEnabled: true` for any block with an error edge, while the live normalized
tables are read verbatim. Change detection compared the raw flag, saw `true`
against `false` for a block that had not changed, and no redeploy could clear it:
deploying snapshots the live `false`, which the next read backfills straight back
to `true`. The deploy button sat on "Update" permanently, and the server path
(`checkNeedsRedeployment`, which reads the raw jsonb and skips the backfill)
disagreed with it.

Lift the rule into `@sim/workflow-types` as `collectErrorSourceBlockIds` /
`resolveEffectiveErrorEnabled` so the backfill and the comparison share one
definition, and apply it to both sides of the diff. Compared outside the
structural gate, since the flag can match while the edges disagree.
@waleedlatif1
chore(deploy): use TSDoc for the error-output comparison comments
af0fb83
@waleedlatif1
waleedlatif1 force-pushed the fix/deploy-change-detection-rvt branch from 9115631 to af0fb83 Compare August 16, 2026 00:25
@vercel
vercel Bot deployed to Preview August 16, 2026 00:31
View deployment
@waleedlatif1

waleedlatif1 commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1

waleedlatif1 commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 16, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit af0fb83. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@waleedlatif1
waleedlatif1 merged commit 4f722c6 into staging Aug 16, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the fix/deploy-change-detection-rvt branch August 16, 2026 00:48
@waleedlatif1 waleedlatif1 mentioned this pull request Aug 16, 2026
v0.8.3: sim cli, new tools, credential groups, splunk, finder-like files refactor, security hardening #6765
Merged

This branch was successfully deployed

1 active deployment
Preview — af0fb83f Deployed Aug 16, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@waleedlatif1
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.