Skip to content

K2GO-317 fix(maps): FQR download progress, ETA, and resume resilience - #746

Merged
luisguzman-adfa merged 6 commits into
mainfrom
fix/K2GO-317-maps-progress-eta
Nov 6, 2026
Merged

luisguzman-adfa merged 6 commits into
mainfrom
fix/K2GO-317-maps-progress-eta

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • Device progress UI for FQR map downloads: one overall ring driven by cumulative bytes vs the consent-step size estimate (not equal per-layer thirds), and one whole-region ETA from a smoothed speed (not go-pmtiles' raw per-layer value). On resume the ring holds its peak and blinks instead of dropping to 0; the ETA stacks as "Xs" over "restantes".
    • UI changes: no new or changed strings. Only the progress ring and ETA behavior change; they use theme colors (no hardcoded hex). Light/dark and long-locale wrap are part of the on-device check below.
  • dash-node runner resilience (1.5.0): a pause waits for go-pmtiles to flush its resume journal (grace 2.5 s -> 60 s; SIGKILL only as a last-resort cap); the stall watchdog fires only on a true wedge (7 s -> 30 s, a retry counts as activity); a new idle watchdog pauses a frozen extract (no progress line for 30 s).
  • Carry patch 0004 pins the maps-role pmtiles binary to the 1.31.2-r2 build, which skips an already-complete layer on resume.

Why

  • The old ring reset per layer and stuck on the big layer; the ETA jumped (1 s to 2 min to 15 s) and read "1 s left" at 65%; a resume looked like a restart.
  • A pause, a network stall, or a frozen extract could lose progress or hang; a short grace could SIGKILL mid-flush; the 7 s watchdog false-paused on normal no-byte phases and re-downloaded completed layers.
  • On resume a completed layer was re-downloaded whole (its journal is removed on success); the r2 build fixes that at the source.

Verifications

  • dash-node tsc --noEmit clean; chained 2-pass review on the runner changes: no findings.
  • Patch 0004 validated with the bake applier (patch -p1): forward, reverse, idempotent, byte-exact result.
  • Coordination: the r2 binary is swapped onto the box and 1.5.0 is dev-pushed before the end-to-end test. The upstream maps-role r2 update supersedes patch 0004 when it lands.
  • Deferred: on-device end-to-end check (a resume after a layer completes skips that layer and transfers no bytes; the in-progress layer resumes from its journal; light/dark and locale wrap).

Notes

  • dash-node 1.5.0. Patch 0004 is an interim bake carry; drop it when the upstream maps-role pins r2.
  • Set the ui label (progress ring and ETA behavior change).

…op ring

Ring and ETA now run off cumulative bytes vs the consent estimate (device
sends est) and an EMA-smoothed speed, not go-pmtiles per-layer eta_s or the
1/3-per-layer buckets that made the time jump and the ring stick. On resume
the ring holds its peak and blinks instead of falling to 0; ETA stacks
"6 s" over "restantes". dash-node 1.4.13.
…R downloads

Pause waits for go-pmtiles to flush its journal (unbounded fsync); SIGKILL is a last-resort cap. Stall watchdog fires only on a true wedge (no bytes and no retries for 30 s, a retry counts as activity). New idle watchdog pauses on 30 s with no progress line (frozen process). dash-node 1.5.0.
Interim bake carry (0004): pin the maps-role pmtiles binary to r2 (armhf, arm64, amd64). r2 skips an already-complete layer on resume, so a resume no longer re-downloads a finished layer. Drop when the upstream maps-role update pins r2 (as 0003 was dropped for iiab#4565).
… network error

tile-extract.py's own mirror/catalog request (its requests.head between layers) can fail with a transient network error, which carries no go-pmtiles exit_code 2. The catch treated it as a hard error and purged every completed layer, so a retry re-downloaded them. Detect the stderr signature and treat it as resumable (keep partials, pause), so a resume skips the completed layers via r2. dash-node 1.5.0.
Print the commit (short hash + subject) between the git reset and the staging build, so the operator can confirm the rebuild is building the intended commit.
onDone relied on updateOverlay(100) to stop the resume blink (100 >= peak is non-regressing). Make it explicit so every exit path (pause, fail, hide, done) stops the blink, robust against future updateOverlay changes.
@luisguzman-adfa
luisguzman-adfa merged commit ec7d29d into main Nov 6, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-317-maps-progress-eta branch November 6, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant