feat(ingest): FleetPulse ingest, presence projector, P12 and heatmap component #85
No reviewers
Labels
No labels
in-progress
in-review
ready-for-agent
seam-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
patrick/Polaris!85
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/ingest-fleetpulse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Vehicles now get their expected weekly presence pattern into Polaris automatically: a FleetPulse feed document posted to the API is checked for duplicates, validated, matched to an existing vehicle (never auto-created), and used to keep that vehicle's sites, presence pattern and suggested service suitability up to date — all without ever discarding history. From that pattern, the system works out concrete dated time windows a vehicle is expected at each site, correctly handling a pattern's fixed weekly cycle even across a daylight-saving clock change and a block that runs to midnight. Admins get a page to see the feed log, replay a document by hand, or paste/drop one in manually — including a shortcut to create a missing vehicle and immediately re-ingest a feed that was rejected for it. A first building block for showing a vehicle's pattern as a weekday × hour heatmap is also delivered, ready for the vehicle detail page to use once it exists.
Related Issues
Closes #17 (PH2 / T-B). Also resolves the two small cross-boundary fixes flagged in seam-request #84 (filed from this PR).
Scenarios: S01, S02, S12, S16. Edge cases: E05, E06, E17.
Type of Change
Breaking Changes
None for any already-merged consumer.
polaris.api.dto.ingest'sFleetPulseDocumentshape changes (see Additional Context) — no existing client depended on it, since this is the first ticket to actually post toPOST /ingest/fleetpulsefor real.Test Plan
Backend:
ruff,mypy --strict,pytest(421 passed, includes new unit coverage for the ingest pipeline's validation/geometry/hashing helpers and the projector's DST/24:00/observation-group/gap-splitting behaviour, plus integration coverage against a real Postgres for idempotency, unknown-vehicle rejection, malformed documents, site versioning, suitability suggestions and replay). Frontend:ng lint,ng build,npm test(76 passed, includes the new ingest store and heatmap component),npm run i18n:parity.Checklist
docs/updated for any behavioural change (docs/03-scenarios.md §S01–S02)polaris.domainAdditional Context
polaris.api.dto.ingest'sFleetPulseDocument/FleetPulseSite/FleetPulseTimeBlockwere corrected to match the real FleetPulse feed shape (confirmed againstdocs/design_document.mdand the sample feed from #14) instead of the shape that module's own docstring already flagged as inferred pending this reconciliation.backend/openapi.jsonregenerated in the same commit.polaris/projector/core.py.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoNrSy7Reyp7evkfcdHeLX
f0de2054fetof7fc44ce5b