Skip to content

fix: preserve route ETA when saving stop details - #479

Merged
OziinG merged 1 commit into
mainfrom
codex/kfood-stop-eta-refresh-fix
Oct 2, 2026
Merged

OziinG merged 1 commit into
mainfrom
codex/kfood-stop-eta-refresh-fix

Conversation

@OziinG

@OziinG OziinG commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Saving unchanged stop details previously deleted route geometry and every planned ETA, leaving the depot End time blank. Compare the persisted override values first, preserve planned stop ETA baselines after departure, and refresh fixed-sequence geometry after a real routing input change.

The refresh commits only when tenant, route revision, route shape, and every stop revision still match. Incomplete provider results stay unavailable; a superseded calculation returns the current route. READY persistence excludes arrived and terminal stops. No optimizer run, route reordering, driver-event changes, or schema migration is introduced.

Validation: Prisma generation, full lint, typecheck, 3,027 tests, build, diff check, and independent five-file review passed locally. The 232 locally skipped cases include optional DB/environment suites; CI runs the disposable PostgreSQL checks. Focused service/repository regressions pass 130/130. The separate Shopify display fix is already deployed; this server change prevents recurrence of the cache/ETA loss.

Skip unchanged operational overrides and refresh changed fixed-sequence geometry with tenant and input revision guards. Preserve historical planned ETA baselines on active routes and arrived or terminal stops.

Constraint: Existing driver timestamps and route stop ordering remain authoritative.
Rejected: Rebuild historical planned ETA from actual arrival events | Actual events cannot recover the deleted plan.
Confidence: high
Scope-risk: moderate
Directive: Keep asynchronous geometry writes conditional on the exact inputs they used.
Tested: Focused regressions 19/19; service and repository tests 130/130; independent five-file review.
@OziinG
OziinG merged commit 3324dd1 into main Oct 2, 2026
2 checks passed
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