(row: ConnectionRow | null)
| 2438 | const isToolSyncHealth = (health: HealthCheckResult | null): boolean => |
| 2439 | health?.detail?.startsWith(toolSyncHealthDetailPrefix) === true; |
| 2440 | const syncedSet = (row: ConnectionRow | null) => { |
| 2441 | const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null; |
| 2442 | return isToolSyncHealth(health) |
| 2443 | ? { tools_synced_at: Date.now(), last_health: null, updated_at: new Date() } |
| 2444 | : { tools_synced_at: Date.now() }; |
| 2445 | }; |
| 2446 | // Every exit stamps the sync time — including the cleanup paths that |
| 2447 | // produce zero tools — so the stale-catalog check (`config_revised_at` |
| 2448 | // vs `tools_synced_at`) doesn't re-attempt this connection per read. |
no test coverage detected