Commit a5dac82
committed
fix(db): carry locked through the reconcile and start suffixes at (1)
Two review findings, both real.
`locked` was hardcoded false on the workflow insert. `workflow_folder` has a
`locked` column and the app still enforces the lock feature against
`folder.locked`, so a stranded locked folder would have come back unlocked.
0272 carries `f.locked` through for exactly this reason; this now matches it.
`workspace_file_folders` has no such column — file folders have never been
lockable — so the file pass still writes false.
Name dedup started at ' (2)', skipping a free ' (1)'. 0272 enumerates
`generate_series(1, 10000)` and the app's own dedup produces "New folder (1)",
"New folder (2)", ..., so starting at (2) was inconsistent with both.
Fixtures extended to cover both: a stranded locked folder must arrive locked, a
stranded unlocked one must stay unlocked (proving the value is copied rather
than blanket-set), and a collision with a free ' (1)' must take it. Still
idempotent across three consecutive runs.
The single row stranded in production is an archived, unlocked canary folder,
so neither bug would have bitten on today's run — but this file is meant to be
re-runnable and ships to self-hosted rolling deploys.1 parent e339a38 commit a5dac82
1 file changed
Lines changed: 13 additions & 6 deletions
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
| |||
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | | - | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
92 | | - | |
| 99 | + | |
93 | 100 | | |
94 | 101 | | |
95 | 102 | | |
| |||
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
117 | | - | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| |||
0 commit comments