(row: ConnectionRow | null)
| 2096 | const isToolSyncHealth = (health: HealthCheckResult | null): boolean => |
| 2097 | health?.detail?.startsWith(toolSyncHealthDetailPrefix) === true; |
| 2098 | const syncedSet = (row: ConnectionRow | null) => { |
| 2099 | const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null; |
| 2100 | return isToolSyncHealth(health) |
| 2101 | ? { tools_synced_at: Date.now(), last_health: null, updated_at: new Date() } |
| 2102 | : { tools_synced_at: Date.now() }; |
| 2103 | }; |
| 2104 | // Every exit stamps the sync time — including the cleanup paths that |
| 2105 | // produce zero tools — so the stale-catalog check (`config_revised_at` |
| 2106 | // vs `tools_synced_at`) doesn't re-attempt this connection per read. |
no test coverage detected