Drop the cached store so the next query reopens whatever the worker wrote (each * worker is a fresh process that deletes + recreates the .db). NULL-safe: the * background watcher path (main.c) has no MCP server / cached store — the child * writes the DB and the parent only needs the return code, so there is nothing * to invalidate. */
| 7481 | * writes the DB and the parent only needs the return code, so there is nothing |
| 7482 | * to invalidate. */ |
| 7483 | static void invalidate_cached_store(cbm_mcp_server_t *srv) { |
| 7484 | if (!srv) { |
| 7485 | return; |
| 7486 | } |
| 7487 | if (srv->owns_store && srv->store) { |
| 7488 | cbm_store_close(srv->store); |
| 7489 | srv->store = NULL; |
| 7490 | } |
| 7491 | free(srv->current_project); |
| 7492 | srv->current_project = NULL; |
| 7493 | } |
| 7494 | |
| 7495 | /* Resolve a per-supervisor-run temp path <cache_dir>/logs/.supervisor-<pid><suffix> |
| 7496 | * (falls back to the CWD if the cache dir is unresolvable). Used for the crash- |
no test coverage detected