(row: ConnectionRow | null)
| 2533 | const isToolSyncHealth = (health: HealthCheckResult | null): boolean => |
| 2534 | health?.detail?.startsWith(toolSyncHealthDetailPrefix) === true; |
| 2535 | const syncedSet = (row: ConnectionRow | null) => { |
| 2536 | const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null; |
| 2537 | return isToolSyncHealth(health) |
| 2538 | ? { tools_synced_at: Date.now(), last_health: null, updated_at: new Date() } |
| 2539 | : { tools_synced_at: Date.now() }; |
| 2540 | }; |
| 2541 | // Every exit stamps the sync time — including the cleanup paths that |
| 2542 | // produce zero tools — so the stale-catalog check (`config_revised_at` |
| 2543 | // vs `tools_synced_at`) doesn't re-attempt this connection per read. |
no test coverage detected