# v479 — Fleet Map controlled driver-app live GPS activation

## Purpose

v479 activates the controlled driver-app live GPS session layer for the Fleet Map after the v478 intake/consent/readiness foundation. It allows fresh coordinates from the controlled driver-app session endpoint to become the trusted green-marker source while stale, stopped, or manually stale sessions lose live trust and fall back to non-live/stale review guidance.

## What changed

- Added `/api/fleet-map/driver-app-live-gps-sessions`.
- Added DomainEvent-backed driver-app live GPS session records.
- Added controlled live session actions:
  - start live session;
  - record live position;
  - stop live session;
  - mark live GPS stale.
- Added driver-app live GPS activation state to each Fleet Map position.
- Added green-marker activation only for fresh driver-app GPS coordinates.
- Added stale/stopped fallback behavior so old live GPS loses live trust.
- Added live GPS dashboard, selected-truck readout, recorder controls, audit trail, filters, summary counts, hover/info labels, and CORI guidance.

## Guardrails

- Green marker remains reserved for fresh driver-app GPS only.
- Manual, dispatcher-confirmed, estimated, ELD/provider, and non-live refresh records cannot turn a marker green.
- Stale or stopped driver-app GPS loses live trust and requires a fresh coordinate or driver check-in.
- No GPS/ELD/telematics provider is connected.
- No Google Geocoding API or Google Routes API call is activated.
- No payment collection, broker distribution limits, owned portal rules, internal load-board access, or Transportation Accounting workflow is changed.
- No Prisma schema change is included.

## Environment flags

```text
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_GPS_REAL_INTAKE_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_SESSION_RECORDING_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_COORDINATE_MUTATION_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_EVENT_NAME="FLEET_MAP_DRIVER_APP_LIVE_GPS_SESSION_RECORDED"
```

## Validation

- `npm run dispatchspot:preflight` passed.
- Targeted TypeScript/TSX syntax checks passed for changed Fleet Map service, types, client, and API route.
- Full `npm run build` was not completed in the sandbox because local dependencies are not installed here.
