Commit 4c1f9f3
committed
fix(update): stop a slow progress write from erasing the install outcome
The state file is a temp file plus rename, so the last rename wins. Progress
writes were fire-and-forget, and the installer's terminal state=done line
bypasses the write throttle just as the child exits — so on the ordinary
success path that write could land after the outcome, restoring active and
dropping lastSuccess. The next launch read that as an abandoned install and
recorded a failure for a version that had installed cleanly, which parks the
version at two attempts.
Progress writes now run on one chain, new ones stop once the outcome is
settled, and the finalizer drains the chain before writing. Removing the
drain fails the new test.
Also from review: the CDN reject cases named the field they expect instead of
matching any non-empty message, the lock-ordering test now reaches the prompt
before asserting no lock was taken (it previously asserted before the first
await, so it held wherever the acquisition sat), and two lint nits this branch
introduced.1 parent e486a10 commit 4c1f9f3
4 files changed
Lines changed: 97 additions & 20 deletions
File tree
- apps/pythinker-code
- src/cli/update
- test
- cli/update
- tui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
844 | 853 | | |
845 | 854 | | |
846 | 855 | | |
| |||
849 | 858 | | |
850 | 859 | | |
851 | 860 | | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
852 | 864 | | |
853 | 865 | | |
854 | 866 | | |
| |||
917 | 929 | | |
918 | 930 | | |
919 | 931 | | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
920 | 935 | | |
921 | 936 | | |
922 | 937 | | |
| |||
936 | 951 | | |
937 | 952 | | |
938 | 953 | | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
945 | 964 | | |
946 | | - | |
947 | 965 | | |
948 | 966 | | |
949 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
209 | | - | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
232 | | - | |
| 234 | + | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
391 | 399 | | |
392 | 400 | | |
393 | 401 | | |
| |||
961 | 969 | | |
962 | 970 | | |
963 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
964 | 979 | | |
965 | 980 | | |
966 | 981 | | |
| |||
1178 | 1193 | | |
1179 | 1194 | | |
1180 | 1195 | | |
1181 | | - | |
| 1196 | + | |
1182 | 1197 | | |
1183 | 1198 | | |
1184 | 1199 | | |
| |||
2099 | 2114 | | |
2100 | 2115 | | |
2101 | 2116 | | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
2102 | 2161 | | |
2103 | 2162 | | |
2104 | 2163 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2022 | 2022 | | |
2023 | 2023 | | |
2024 | 2024 | | |
2025 | | - | |
2026 | | - | |
| 2025 | + | |
2027 | 2026 | | |
2028 | 2027 | | |
2029 | 2028 | | |
| |||
2089 | 2088 | | |
2090 | 2089 | | |
2091 | 2090 | | |
2092 | | - | |
2093 | | - | |
| 2091 | + | |
2094 | 2092 | | |
2095 | 2093 | | |
2096 | 2094 | | |
| |||
0 commit comments