Fix FoundationModels crash, driving constraint, and disable card descriptions
- RouteDescriptionGenerator: reuse session, cap tokens at 60, greedy sampling, prewarm with prompt prefix, serial request queue with rate-limit retry and circuit breaker - Disable AI/template descriptions on trip option cards - GameDAGRouter: fix off-by-one in canTransition driving constraint (daysBetween+1) so multi-day cross-city routes aren't rejected - CanonicalSyncService: wrap SyncStatusMonitor in #if DEBUG Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -654,9 +654,12 @@ enum GameDAGRouter {
|
||||
// Calculate driving hours available
|
||||
// For same-day games: enforce both time availability AND daily driving limit
|
||||
// For multi-day trips: use total available driving hours across days
|
||||
// daysBetween counts calendar day gaps, but the traveler can drive on
|
||||
// partial days at both ends (post-game evening + pre-game morning), so
|
||||
// use (daysBetween + 1) for multi-day trips to avoid off-by-one rejection.
|
||||
let maxDrivingHoursAvailable = daysBetween == 0
|
||||
? min(max(0, availableHours), constraints.maxDailyDrivingHours)
|
||||
: Double(daysBetween) * constraints.maxDailyDrivingHours
|
||||
: Double(daysBetween + 1) * constraints.maxDailyDrivingHours
|
||||
|
||||
let feasible = drivingHours <= maxDrivingHoursAvailable && drivingHours <= availableHours
|
||||
|
||||
|
||||
Reference in New Issue
Block a user