This repository was archived by the owner on Jun 4, 2026. It is now read-only.
Commit 57385f5
fix: address PR #17 Copilot review
Six fixes in one commit, addressing every Copilot comment except #7
(dead code, deferred to a later cleanup pass).
#4 — manifest shape mismatch (critical):
push.ts was still reading/writing the old manifest format
(files[path] = hashString) while pull.ts and sync.ts use the new
{localHash, remoteMtime} shape. push now uses the new shape,
migrates old manifests on read (mirrors sync.ts detector), and
refreshes remoteMtime via getRemoteMtimes() after a successful
upload so the next pull/sync sees a consistent picture.
#3 — partial-success manifest (important):
In --batch mode we were marking every instance as synced when
result.uploaded > 0, even if some failed. Now we derive failed
paths from result.errors and only add successes to the manifest.
Failed uploads stay out and get retried on the next run.
#6 — ATOMIC_SOURCE_EXTENSIONS gap (important):
EXTENSION_MAP was missing .tsx/.jsx/.cjs/.scss/.less/.sass, so
those extensions got application/octet-stream and were routed
through individual POST instead of /_atomic despite being listed
as atomic-source compatible. Now mapped to
application/typescript/javascript and text/x-* respectively, so
isTextFile() returns true and they take the atomic path.
#2 — CLI --version out of sync:
program.version() was hardcoded to '1.0.0' while package.json is
at 1.0.1. Now reads from package.json via createRequire so
boxel --version stays accurate on every release.
#1 — --batch-size NaN guard:
parseInt on bad input (e.g. "abc") returned NaN, which bypasses
`?? 10` and flows into the uploader as NaN. Now uses a
parsePositiveInt parser that throws InvalidArgumentError with
a friendly message on non-positive-integer input.
#5 — invalid-JSON test expectation:
The test expected data.type='file' but the code (correctly) emits
'source' because /_atomic only accepts 'card' and 'source'
resource types. Test updated to match the correct contract.
All 164 tests pass (was 163/164 before this commit).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9dbfe46 commit 57385f5
4 files changed
Lines changed: 117 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
11 | 34 | | |
12 | 35 | | |
13 | 36 | | |
| |||
17 | 40 | | |
18 | 41 | | |
19 | 42 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
25 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
26 | 60 | | |
27 | | - | |
28 | 61 | | |
29 | 62 | | |
30 | 63 | | |
| |||
105 | 138 | | |
106 | 139 | | |
107 | 140 | | |
108 | | - | |
| 141 | + | |
| 142 | + | |
109 | 143 | | |
110 | 144 | | |
111 | 145 | | |
112 | 146 | | |
113 | 147 | | |
114 | | - | |
115 | | - | |
| 148 | + | |
| 149 | + | |
116 | 150 | | |
117 | 151 | | |
118 | 152 | | |
| |||
147 | 181 | | |
148 | 182 | | |
149 | 183 | | |
150 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
151 | 188 | | |
152 | 189 | | |
153 | 190 | | |
| |||
165 | 202 | | |
166 | 203 | | |
167 | 204 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
174 | 215 | | |
175 | 216 | | |
176 | 217 | | |
| |||
188 | 229 | | |
189 | 230 | | |
190 | 231 | | |
191 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
192 | 236 | | |
193 | 237 | | |
194 | 238 | | |
| |||
228 | 272 | | |
229 | 273 | | |
230 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
231 | 298 | | |
232 | 299 | | |
233 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 | | |
6 | 16 | | |
7 | 17 | | |
| |||
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
29 | 45 | | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
34 | 50 | | |
35 | | - | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| |||
66 | 82 | | |
67 | 83 | | |
68 | 84 | | |
69 | | - | |
| 85 | + | |
70 | 86 | | |
71 | 87 | | |
72 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
0 commit comments