Commit 717c323
fix(#80): clear companion LRUs on the cross-process reset notify path
A CLI `reset-to` runs `reset_to` (and the prune) in the short-lived CLI
process, then signals the long-lived companion via `POST /internal/notify
{kind: project_reset}`. That handler only reloaded buckaroo sessions; it never
cleared the companion's process-global `_build_compare_expr` / `cached_result_expr`
LRUs, so a warmed diff build kept pointing at a snapshot the prune deleted —
#80's "Communication gap", the path #80 calls the normal one ("reset is
normally run out-of-process").
- Hoist the in-server clear into `_invalidate_reset_caches()` and call it from
BOTH reset paths (`/api/reset` and the `project_reset` branch of
`/internal/notify`) so they can't drift. The clear is not gated on `buckaroo`:
the LRUs are companion process memory, independent of the subprocess.
- Reframe the `reset_to` comment (#96): clearing the result-plan memo answers
#96's literal "LRU outlives a prune", but for the dangling-read symptom it is
belt to cached_result_expr's per-call exists() self-heal (ee0a90a). The
load-bearing protection is the `_build_compare_expr` clear — the one LRU that
bakes the resolved path into a serialized build with no per-call recheck.
Closes #80, #96.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a965683 commit 717c323
2 files changed
Lines changed: 41 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
215 | 236 | | |
216 | 237 | | |
217 | 238 | | |
| |||
1135 | 1156 | | |
1136 | 1157 | | |
1137 | 1158 | | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1144 | 1163 | | |
1145 | 1164 | | |
1146 | 1165 | | |
| |||
1163 | 1182 | | |
1164 | 1183 | | |
1165 | 1184 | | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1166 | 1192 | | |
1167 | 1193 | | |
1168 | 1194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
| |||
0 commit comments