Commit f79b234
refactor(forks): stop projecting a column the source query already pins
`listDeployedWorkflows` filters on `fork_sync_excluded = false` and then
selected the same column, so every row it returned carried `false` by
construction - `SELECT x ... WHERE x = false`. The field only ever varied while
`includeSyncExcluded` could make that predicate drop out, which the previous
commit removed, so it is scaffolding from the reverted override rather than
anything load-bearing.
Keeping it would not have been defensive either. If someone widens that
predicate they have to revisit the projection anyway, and a constant field
hides the coupling between the two instead of enforcing it.
Dropped from the query and from `DeployedWorkflowSummary`. The two write sites
now state the invariant they actually mean: a copy is not a new workflow, so it
is written synced and never takes the target workspace's new-workflow default -
which in an opt-out lineage would land a deliberately synced workflow unsynced
on the other side. That explicit write is kept precisely because it is a
semantic claim, not a read of something the query had already decided.
Untouched: the target-side read in `promote-plan.ts`, which queries target
workflows with no exclusion filter and genuinely varies. That is what keeps a
promote from overwriting a target the user unchecked.
Dropped the copy test for an unsynced source, an input no caller can now
produce, and renamed its sibling to the property that still holds.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 3362008 commit f79b234
4 files changed
Lines changed: 18 additions & 22 deletions
File tree
- apps/sim/ee/workspace-forking/lib
- copy
- promote
Lines changed: 5 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
704 | 703 | | |
705 | | - | |
| 704 | + | |
706 | 705 | | |
707 | 706 | | |
708 | 707 | | |
709 | 708 | | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | 709 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
| |||
68 | 62 | | |
69 | 63 | | |
70 | 64 | | |
71 | | - | |
72 | 65 | | |
73 | 66 | | |
74 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
476 | 480 | | |
477 | 481 | | |
478 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
215 | 221 | | |
216 | 222 | | |
217 | 223 | | |
218 | | - | |
| 224 | + | |
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
| |||
0 commit comments