(row: ConnectionRow | null)
| 3539 | b("name", "=", String(ref.name)), |
| 3540 | ); |
| 3541 | const syncedSet = (row: ConnectionRow | null) => { |
| 3542 | const health = row ? Option.getOrNull(decodeLastHealth(row.last_health)) : null; |
| 3543 | return isToolSyncHealth(health) |
| 3544 | ? { |
| 3545 | tools_synced_at: Date.now(), |
| 3546 | last_health: null, |
| 3547 | updated_at: new Date(), |
| 3548 | } |
| 3549 | : { tools_synced_at: Date.now() }; |
| 3550 | }; |
| 3551 | // Every exit stamps the sync time — including the cleanup paths that |
| 3552 | // produce zero tools — so the stale-catalog check (`config_revised_at` |
| 3553 | // vs `tools_synced_at`) doesn't re-attempt this connection per read. |
no test coverage detected