fix(deploy): resolve the error-output flag from edges on both sides of change detection - #6754
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Shared rule in Change detection now uses that rule on both live and deployed snapshots when comparing Regression tests cover flag-only vs edge-backed cases in Reviewed by Cursor Bugbot for commit af0fb83. Configure here. |
Greptile SummaryThe 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.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| 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
…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.
9115631 to
af0fb83
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
Summary
errorEnabled: falsewhile an error edge still leaves it —setBlockErrorEnableddoesn't remove existing error edges, both block renderers draw the port onerrorEnabled || hasErrorConnection, and the executor never reads the flag at all (the edge alone decides routing). The two spellings are one state.materializeDeploymentStatebackfillserrorEnabled: truefor any block with an error edge, while the live normalized tables are read verbatim. Change detection compared the raw flag and sawtrueagainstfalsefor a block that hadn't changed.false, which the next read backfills straight back totrue. The deploy button sat on "Update" permanently, andcheckNeedsRedeployment(raw jsonb, skips the backfill) disagreed with the button.@sim/workflow-typesascollectErrorSourceBlockIds/resolveEffectiveErrorEnabledso 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
Testing
compare.test.ts; verified they go red when the fix is neuteredapps/simsuite: 25742 passed, 0 failedbunx turbo run type-check(24 packages) andbun run check:audits(27 audits) cleanChecklist