Commit 9fc6586
authored
fix(v2): hold create to the rules update enforces, and bind the last two cursors (#6684)
Three defects, one shape: a rule applied to one path and not its sibling.
Two were found by probing the live surface after the previous fixes
deployed, and the third by reading for the pattern.
Creating a workflow group through the public surface validated almost
nothing the update path validates. An enrichment group could name an
enrichment the registry does not define, or an output the enrichment does
not have, or carry no output id at all — each a 201 storing a column no
run can ever write, discovered only when the caller later tried to edit
the group and got the 400 create should have given. The workflow half was
the same: a fabricated block-and-path coordinate was stored on create and
refused on update. Create now runs the same two registry helpers and the
same workflow-output check the update path uses.
The discriminator there is the backing workflow id, not the declared
type. The workflow sidebar creates enrichment-template groups labelled
`enrichment` while backed by a real workflow and carrying no enrichment
id, so keying on the label would have refused the first-party create
path outright.
A group's producer type could also be relabelled after the fact into a
state creation refuses. Nothing rejected it and nothing could repair it,
since the update body carries no enrichment id to supply. Relabelling an
enrichment group as workflow-backed is the harmful direction: it keeps
the enrichment id while moving the group onto the workflow branch with an
empty workflow id, so every cell run fails. An update may now only
restate the type the group already has.
The workflow-version and workspace-member lists were the last two paged
reads minting cursors with no route identity, so a token from one parent
resumed another at a position that silently skips rows — the defect the
previous change closed everywhere else. Both now wrap their domain token
with the same scope binding, and the pagination guardrail gained a
declaration of every nested list's parent path param, because the old
one recorded only query filters and so could not tell an unfiltered list
from a forgotten parent.1 parent 4ff339e commit 9fc6586
9 files changed
Lines changed: 592 additions & 43 deletions
File tree
- apps
- docs
- sim
- app/api/v2
- workflows/[id]/versions
- workspaces
- [workspaceId]/members
- lib
- api/contracts
- v2/__tests__
- table/application
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6806 | 6806 | | |
6807 | 6807 | | |
6808 | 6808 | | |
6809 | | - | |
| 6809 | + | |
6810 | 6810 | | |
6811 | 6811 | | |
6812 | 6812 | | |
| |||
Lines changed: 79 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
46 | 90 | | |
47 | 91 | | |
48 | 92 | | |
| |||
125 | 169 | | |
126 | 170 | | |
127 | 171 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
135 | 176 | | |
136 | 177 | | |
137 | 178 | | |
138 | 179 | | |
139 | 180 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
148 | 191 | | |
149 | 192 | | |
150 | 193 | | |
151 | 194 | | |
152 | 195 | | |
153 | 196 | | |
154 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
155 | 218 | | |
156 | 219 | | |
157 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
19 | 38 | | |
20 | 39 | | |
21 | 40 | | |
22 | 41 | | |
23 | 42 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 43 | + | |
| 44 | + | |
27 | 45 | | |
28 | 46 | | |
29 | 47 | | |
| |||
34 | 52 | | |
35 | 53 | | |
36 | 54 | | |
37 | | - | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | 58 | | |
| |||
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
54 | 75 | | |
55 | 76 | | |
56 | 77 | | |
| |||
Lines changed: 30 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
16 | 35 | | |
17 | 36 | | |
18 | 37 | | |
| |||
22 | 41 | | |
23 | 42 | | |
24 | 43 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
| |||
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
38 | | - | |
| 56 | + | |
39 | 57 | | |
40 | 58 | | |
41 | 59 | | |
| |||
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
47 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
48 | 71 | | |
49 | 72 | | |
0 commit comments