306→ private func checkPortAvailable(port: Int) async -> Bool { 307→ // Try /health first 308→ if let url = URL(string: "http://localhost:\(port)/health") { 309→ do { 310→ let (_, response) = try await URLSession.shared.data(from: url) 311→ if let httpResponse = response as? HTTPURLResponse, 312→ httpResponse.statusCode == 200 { 313→ return true 314→ } 315→ } catch { 316→ // Continue to fallback 317→ } 318→ } 319→ 320→ // Try root path as fallback 321→ if let url = URL(string: "http://localhost:\(port)/") { 322→ do { 323→ let (_, response) = try await URLSession.shared.data(from: url) 324→ if let httpResponse = response as? HTTPURLResponse, 325→ (200...299).contains(httpResponse.statusCode) { 326→ return true 327→ } 328→ } catch { 329→ // Continue to fallback 330→ } 331→ } 332→ 333→ // Try /api/health as another fallback (for log server) 334→ if let url = URL(string: "http://localhost:\(port)/api/cc/health") { 335→ do { 336→ let (_, response) = try await URLSession.shared.data(from: url) 337→ if let httpResponse = response as? HTTPURLResponse, 338→ httpResponse.statusCode == 200 { 339→ return true 340→ } 341→ } catch { 342→ // Failed 343→ } 344→ } 345→ 346→ return false 347→ } 348→ 349→ // MARK: - Manual Refresh 350→ 351→ func forceRefresh() async { 352→ await realtimeService.forceRefresh() 353→ await refreshAllTimeStats() 354→ await refreshBudget() 355→ await refreshServices() Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.