Repository navigation
Commit b0d6ef6
Roi
fix(core): tolerate file watcher startup failures
Fixes anomalyco#16610
Related anomalyco#26842
Related anomalyco#23190
The file watcher initialization could fail in ways that made the entire
TUI unresponsive or crash:
- Effect.promise did not catch synchronous throws from @parcel/watcher's
subscribe() call; Effect.tryPromise does
- The .git watcher setup ran inside the main layer body, so any failure
(git.dir timeout, subscribe timeout) killed the entire watcher service
including the experimental root watcher; it is now isolated in its own
forkScoped with an independent catchCause
- The @parcel/watcher callback's error parameter was silently ignored;
it is now logged
- Unsubscribe errors during cleanup could cause unhandled rejections;
they are now suppressed
- The outer catchCause log message now includes the directory and
explains the consequence (watcher disabled)
Reproduction: OpenCode 1.17.8 / Bun 1.3.14 in a Linux dev container
with overlayfs crashes with exit code 132 (SIGILL) and Bun panic
'Segmentation fault at address 0x0' when run inside a Git repo.
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true avoids the crash.1 parent 355a0bc commit b0d6ef6
1 file changed
Lines changed: 33 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
| |||
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
102 | | - | |
| 108 | + | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
| |||
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
133 | 152 | | |
134 | 153 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
138 | 157 | | |
139 | 158 | | |
140 | 159 | | |
| |||
0 commit comments