Commit Graph

6 Commits

Author SHA1 Message Date
3da04c111e Move runtime artifacts out of the source tree to ~/trips
The dev directory now holds source code + compiled binaries only:
  ~/trips/osm/          OSM PBF extracts (was osm/, 1.4 GB)
  ~/trips/tilecache/    mock tile cache (was mock/.tilecache)
  ~/trips/store/mock/   per-trip uploads + chat logs (was mock/store, PII)
  ~/trips/logs/         server.log
  ~/trips/stale-osm-build/  stale source/tarball dup of ~/osm-build
                           (repo osm/build had no binaries; the live OSRM
                           toolchain + graphs already lived in ~/osm-build)

Code now points at the new locations, all overridable via env:
- mock/server.js: TRIPS_HOME (default ~/trips) for tile cache + store
- setup-osrm.sh / setup-osrm-colombia.sh: OSM_DIR (default ~/trips/osm)
- spatial/compose+import.sh: OSM_DIR (default ~/trips/osm)
- .gitignore: rewritten — no artifact paths remain in-tree
2026-09-10 10:03:04 -04:00
ca32d20a50 Fix arrival drop-off, taxi routing, and Santa Marta coverage
Four user-reported bugs from the Colombia trip:

1. Santa Marta legs not routing (extract gap). The SAMARTA OSM box had
   MAXLAT 11.22, which clipped the old town (~11.24 N) so every city
   point snapped to the same boundary node. Raised it to 11.28 (covers
   the Malecón + Plaza Colesio). Rebuilt the Colombia extract.

2. "Can't take a taxi / wrong times." The :5003 Colombia router is a
   *walking* build (foot.lua) and cannot return a driving route, so 'car'
   legs silently came back as long walks (CTG->hotel showed 105 min).
   Added a second, *driving* build (car.lua, same cropped OSM) on :5004
   and made the /route proxy send driving-profile requests there. Now
   the airport drop-off is a real 16-min drive, and the walk<->taxi
   toggle changes the estimate (16 min car vs 105 min walk).

3. Arrival timeline inconsistent. The arrival day's startMin was set from
   a static ~20-min estimate and never updated when the drop-off actually
   routed. Added syncArrivalStart(): the start tracks landing + the
   transfer's (asynchronously routed, mode-dependent) duration, and every
   stop follows. Lunch no longer lands before the traveller reaches the
   hotel.

4. Hovering a hotel card zoomed to the other city. renderHotelCard
   flashed EVERY stay's marker, so a multi-city trip flew the map to the
   off-screen hotel (and alternated on each hover). Now it flashes only
   the current day's hotel(s).

Also: enrichment used a single global token, so when apply_flight_anchors
enriched all days in one pass only the LAST day's legs actually routed
(the earlier days bailed on the token check). Made the token per-day so
every day's legs route independently, and scoped the background
re-renders to the on-screen day.

Verified via CDP: 11/11 fix checks + cdp_smoke, cdp_struct (13),
cdp_dates (7), cdp_leg (17), cdp_coords (6) all green.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-09 22:13:00 -04:00
33ed5d9fe6 multi-trip mock + Colombia trip with a real walking router
The mock can now work several trips at once: a trip picker in the
topbar, per-trip state in localStorage (edits + version history survive
switching), and a per-trip router key so each trip routes on its own
OSRM extract.

Colombia (Cartagena -> Santa Marta, 8 days) becomes the default working
trip, inside a new walking-profile OSRM instance:
- scripts/crop_pbf.py: streaming 3-pass PBF cropper (no PBF library;
  the country file is too big for osmium extract -s complete_ways on
  this box). Framing validated against osmium test fixtures and
  osrm-extract. Drops relations (foot profile ignores restrictions).
- scripts/setup-osrm-colombia.sh: download -> crop (~4.6 MB) ->
  extract/partition/customize with the official foot.lua -> serve
  :5003. Verified: Getsemaní -> Castillo San Felipe 7.98 km / 96 min.
- server.js: ROUTERS map, ?router=colombia|northeast on /route,
  /table, /router-status (per-router probe points).
- app.js: legs touching a transit stop are fixed (flight/taxi/bus via
  M.multimodal), never re-routed; distance-0 router answers (both
  points on one node) read as adjacent stops, not out-of-coverage.
- multi-hotel fix: day-scope map fit uses the stays covering THAT day,
  so a two-city trip no longer fits the whole country per day.

Also: pre-cache-tiles.sh (Cartagena+Santa Marta z14-16, 2560 tiles),
tile cache write fix (Node rejects flags:'x'; buffer-then-write),
favicon, renderHotelMks load-order guard, tests updated for the new
default trip (all four puppeteer suites green, zero console errors).
2026-09-09 09:44:29 -04:00
916f9eb503 destination: 39-84 46th St, Sunnyside (OSM way 241831843); durable data location; profile-sensitivity experiment
- destination changed from generic 'Queens NY' to the real address,
  geocoded offline from the NY PBF (addr:street=46th Street,
  addr:housenumber=39-84, postcode 11104 -> 40.74707,-73.9181)
- OSRM tree moved /tmp/osm-build -> /home/gmp/osm-build (durable);
  scripts default W to $HOME/osm-build; LD_LIBRARY_PATH export for
  the baked-in RPATH; cmake stub paths re-pointed
- profile experiment: profiles/car-us.lua (US-tuned speed table on
  stock car.lua) -> Lincoln->Sunnyside 406 -> 377 min vs Valhalla 327;
  README documents the mechanism (motorway=90 x speed_reduction 0.8
  = 72 km/h effective on untagged US interstates)
- bench goldens re-recorded for both backends with new destination;
  both 26/26 PASS, integration tests pass on both routers
2026-09-06 16:48:51 -04:00
0c4a1f9f60 router: working local OSRM backend + per-backend bench goldens
- fix encoded-polyline decoder (zigzag: (n>>1) ^ -(n&1)) — caught by
  the OSRM integration tests (Boston clearance 5681km -> 38km)
- OSRM client: routes[] JSON shape, overview=full for geometry,
  polyline+geojson support
- local OSRM 26.4.1 built from source (no sudo): deps.sh (bzip2, lua
  5.2 with readline stub, oneTBB, boost 1.84 via b2 + hand-rolled
  CMake config files, osmium-tool), setup-osrm.sh (merge PBFs ->
  extract -> partition -> customize -> serve :5000); v26 flag fixes
- bench: tasks.osrm.json goldens; both backends 26/26 PASS and agree
  on all 5 optimized orders (Ladd->Cascade etc.)
- README: profile deltas (Valhalla 332min vs OSRM 410min, same route
  shape), per-backend goldens, verified self-host status
2026-09-06 01:19:37 -04:00
efde2cc71b maps project: design, survey, mock app, and route-aware planning backend
- DESIGN.md: full design incl. driving-trip requirements (R1-R4),
  stays model, focus mode, mobile, provenance rules
- SURVEY.md: open-source landscape
- mock/: interaction mock (Florence itinerary, focus mode, stays,
  region stops, mobile layout)
- router/: Go module (stdlib-only) with Router interface
  (Valhalla + OSRM backends), stop_cost, optimize_stops, corridor,
  routectl CLI, bench (5 real NE-corridor tasks, 26 checks passing),
  integration tests, and setup-osrm.sh for the self-hosted router
- osm/: NH+MA+CT+NY PBFs (gitignored) + setup artifacts
2026-09-06 00:05:17 -04:00