Commit Graph

14 Commits

Author SHA1 Message Date
Trey t
44952140c8 everything is broke, gsd is ass 2026-01-10 16:20:13 -06:00
Trey t
b6f11a46dc test(09-03): add anti-backtracking validation tests
Added 7 TDD tests for Feature 2 (geographic efficiency / anti-backtracking):
- Route must start at specified start city
- Route must end at specified end city
- Intermediate games in wrong order rejected or reordered
- Multiple route options - least backtracking preferred
- Minor backtracking within tolerance is acceptable
- Excessive backtracking beyond destination rejected
- Correct directional classification for north-to-south route

All tests pass - existing ScenarioCPlanner implementation already
validates monotonic progress and prevents excessive backtracking.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 15:42:08 -06:00
Trey t
31d1163953 test(09-03): add travel corridor game inclusion tests
Added 5 TDD tests for Feature 1 (travel corridor game inclusion):
- Direct route with games along path includes all corridor games
- Game slightly off corridor within tolerance included
- Game far from corridor excluded
- Multiple games mixed filters correctly (excludes south/beyond-end games)
- No games along corridor returns empty route or failure

Tests validate that Scenario C planning correctly:
- Includes games within ~50-100 miles of direct travel corridor
- Excludes games in wrong direction (south when traveling north)
- Excludes games beyond the destination city

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 15:28:19 -06:00
Trey t
57d42ef835 test(09-02): add filler conflict and impossible combination tests
- Feature 1: Filler game timing conflict prevention (4 tests)
  - Filler between anchors included when feasible
  - Same-day filler excluded
  - Backtracking filler excluded/reordered
  - Multiple fillers only feasible included

- Feature 2: Impossible geographic combinations (5 tests)
  - Must-see games too far apart fail
  - Reverse chronological order fail
  - Triangle routing validation
  - Driving limit validation
  - Feasible combination sanity check

All tests pass individually, validating correct behavior.
Note: 2 tests exhibit pre-existing flakiness in full suite.
2026-01-10 15:03:31 -06:00
Trey t
1c20d54b8b test(09-01): add same-day multi-city conflict detection tests
- Tests same-day games in close cities (both included - FAILING)
- Tests same-day games in distant cities (only one per route - PASSING)
- Tests same-day games on opposite coasts (only one per route - PASSING)
- Tests three same-day games (picks feasible combinations - FAILING)

2 of 4 tests failing - need to implement feasible same-day game logic.
2026-01-10 12:53:15 -06:00
Trey t
9ec2a06b7a test(09-01): add timezone boundary tests for date range filtering
- Tests game at range start in different timezone (included)
- Tests game before range start in different timezone (excluded)
- Tests game at range end in different timezone (included)
- Tests game after range end in different timezone (excluded)

All tests pass - DateInterval.contains() correctly handles timezone boundaries.
2026-01-10 12:48:26 -06:00
Trey t
cf2f5b0dd8 test(08-02): add diversity coverage tests
Added 6 diversity tests to validate multi-dimensional route variety.
All tests pass, proving selectDiverseRoutes() produces varied results.

Tests validate:
- Game count diversity (2-3 games to 5+ games)
- City count diversity (2-3 cities to 4+ cities)
- Mileage diversity (short <500mi, medium 500-1000mi, long 1000+mi)
- Duration diversity (2-3 days to 5+ days)
- Bucket coverage (≥3 different game count buckets)
- No duplicate routes (unique game combinations)

Helper generateDiverseDataset() creates 50 games across 20 stadiums
over 14 days for realistic diversity testing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 12:19:06 -06:00
Trey t
13be6ffca5 test(08-02): add performance tests with large datasets
Added 4 performance tests with 1K, 5K, 10K games to validate DAG
algorithm scalability. Tests currently failing (RED phase).

Tests:
- 1K games: <2s expected
- 5K games: <10s expected
- 10K games: <30s expected
- 10K games: memory stability

Helper generateLargeDataset() creates realistic test data with
distributed stadiums and games across time spans.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-10 11:58:51 -06:00
Trey t
02cb09f4e5 test(08-01): canTransition boundary tests and cleanup
Add 7 canTransition boundary tests:
- Same stadium same day 4 hours apart is feasible
- Different stadium 1000 miles apart same day is infeasible
- Different stadium 380 miles apart 2 days apart is feasible
- Different stadium 100 miles apart 4 hours available is feasible
- Different stadium 100 miles apart 1 hour available is infeasible
- Game end buffer (3 hour) validation
- Arrival buffer (1 hour) validation

Also removes broken DayCardTests that referenced types removed in
previous refactor (DayCard, DayConflictInfo).

Total: 17 GameDAGRouter edge case tests all passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 11:51:38 -06:00
Trey t
a4db9a92eb test(08-01): GameDAGRouter edge case tests
Add 10 TDD tests for GameDAGRouter covering:
- Empty games array returns empty routes
- Single game returns single-game route
- Single game with non-matching anchor returns empty
- Two chronological feasible games returns combined route
- Two games too far apart same day returns separate routes
- Two games reverse chronological returns separate routes
- Three games with only feasible pairs returns valid combinations
- Anchor filtering excludes routes missing anchors
- Repeat cities OFF excludes same city twice
- Repeat cities ON allows same city twice

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 11:42:31 -06:00
Trey t
92d808caf5 Add Stadium Progress system and themed loading spinners
Stadium Progress & Achievements:
- Add StadiumVisit and Achievement SwiftData models
- Create Progress tab with interactive map view
- Implement photo-based visit import with GPS/date matching
- Add achievement badges (count-based, regional, journey)
- Create shareable progress cards for social media
- Add canonical data infrastructure (stadium identities, team aliases)
- Implement score resolution from free APIs (MLB, NBA, NHL stats)

UI Improvements:
- Add ThemedSpinner and ThemedSpinnerCompact components
- Replace all ProgressView() with themed spinners throughout app
- Fix sport selection state not persisting when navigating away

Bug Fixes:
- Fix Coast to Coast trips showing only 1 city (validation issue)
- Fix stadium progress showing 0/0 (filtering issue)
- Remove "Stadium Quest" title from progress view

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:20:03 -06:00
Trey t
4184af60b5 Refactor travel segments and simplify trip options
Travel segment architecture:
- Remove departureTime/arrivalTime from TravelSegment (location-based, not date-based)
- Fix travel sections appearing after destination instead of between cities
- Fix missing travel segments when revisiting same city (consecutive grouping)
- Remove unwanted rest day at end of trip

Planning engine fixes:
- All three planners now group only consecutive games at same stadium
- Visiting A → B → A creates 3 stops with proper travel between

UI simplification:
- Remove redundant sort options (mostDriving/leastDriving, mostCities/leastCities)
- Remove unused "Find Other Sports Along Route" toggle (was dead code)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 19:39:53 -06:00
Trey t
ab89c25f2f Refactor trip planning: DAG router + trip options UI + simplified itinerary
- Replace O(2^n) GeographicRouteExplorer with O(n) GameDAGRouter using DAG + beam search
- Add geographic diversity to route selection (returns routes from distinct regions)
- Add trip options selector UI (TripOptionsView, TripOptionCard) to choose between routes
- Simplify itinerary display: separate games and travel segments by date
- Remove complex ItineraryDay bundling, query games/travel directly per day
- Update ScenarioA/B/C planners to use GameDAGRouter
- Add new test suites for planners and travel estimator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 12:26:17 -06:00
Trey t
9088b46563 Initial commit: SportsTime trip planning app
- Three-scenario planning engine (A: date range, B: selected games, C: directional routes)
- GeographicRouteExplorer with anchor game support for route exploration
- Shared ItineraryBuilder for travel segment calculation
- TravelEstimator for driving time/distance estimation
- SwiftUI views for trip creation and detail display
- CloudKit integration for schedule data
- Python scraping scripts for sports schedules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 00:46:40 -06:00