Commit d27fdc9
committed
🤖 Fix resolvePath() to separate path resolution from existence checking
- Remove existence checking from LocalRuntime.resolvePath()
- Now just expands tildes and resolves to absolute path
- No longer uses fsPromises.access() to verify path exists
- Update SSHRuntime.resolvePath() to use readlink -m instead of realpath
- readlink -m normalizes paths without requiring them to exist
- Properly separates path resolution from validation
- Extract SSH command spawning pattern into execSSHCommand() helper
- Reduces duplication in SSHRuntime
- Reusable for simple SSH commands that return stdout
- Remove SSH integration tests for resolvePath()
- Will rely on createWorkspace matrix tests for end-to-end verification
- Keep only constructor unit tests that don't require SSH
- Update LocalRuntime test to expect non-existent paths to resolve successfully
- Revert unrelated gitService.test.ts debug logging
This improves separation of concerns: resolvePath() now purely resolves paths
without side effects, allowing callers to decide whether to validate existence.
Generated with `cmux`1 parent 2956db0 commit d27fdc9
File tree
5 files changed
+21
-107
lines changed- src
- runtime
- services
5 files changed
+21
-107
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 309 | + | |
322 | 310 | | |
323 | 311 | | |
324 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
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 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
325 | 333 | | |
326 | 334 | | |
327 | 335 | | |
| |||
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 351 | + | |
360 | 352 | | |
361 | 353 | | |
362 | 354 | | |
363 | | - | |
| 355 | + | |
| 356 | + | |
364 | 357 | | |
365 | 358 | | |
366 | 359 | | |
367 | 360 | | |
368 | 361 | | |
369 | | - | |
| 362 | + | |
370 | 363 | | |
371 | 364 | | |
372 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
| |||
0 commit comments