Cue-sheet caching so each route is enriched once #30
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#55 Cue-sheet review on the phone before riding
robert/PedalPebble
#26 CueSheetEnricher interface and canonical direction enum
robert/PedalPebble
Reference
robert/PedalPebble#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Goal
Enrichment is slow and possibly online. Do it at import, never during a ride.
Acceptance criteria
Files
companion/.../route/enrich/CueSheetCache.ktClosed by PR #89 (merged): CueSheetCache (companion/core, pure JVM, 13 new host tests incl. one real end-to-end run against GpxCueEnricher + the real bikerouter-style-cues.gpx fixture) keyed by route id + a single pipeline-wide CURRENT_ENRICHER_VERSION constant \u2014 covers both a tier's own logic changing and a new tier slot being wired in later, no per-tier versioning needed. Backed by a new Room
cue_sheetstable with a real Migration(1,2) (checked field-for-field against CueSheetEntity: routeId/enricherVersion/cuesEncoded NOT NULL, tier nullable \u2014 matches). Which backend won is recorded via the existing RouteLibrary.updateEnrichment() hook, so RouteLibraryScreen's status line now shows real data with no new UI needed there; a manual re-enrich button was added.\n\nHonestly flagged, not papered over: raw GPX text (needed by tier 0) isn't persisted anywhere in the route library yet \u2014 GpxImporter discards it after parsing. getOrEnrich/forceReEnrich take it as optional; absent, tier 0 fails closed (same behaviour it already has for malformed input) and falls through to tier 1+. Not a regression \u2014 no caller anywhere can supply it post-import today anyway \u2014 documented as a separate follow-up (persisting rawGpx) rather than solved here.\n\nVerification split, same pattern as every companion PR tonight: :companion:core (the cache/codec logic) is host-tested and green. :companion:route (Room codegen, the migration actually running, UI wiring) is hand-reviewed only \u2014 no Android SDK in this sandbox.