Skip to content

Warn when current GPS outruns server-confirmed route results - #215

Merged
OziinG merged 2 commits into
mainfrom
codex/cc-265-current-position-alert
Aug 24, 2026
Merged

Warn when current GPS outruns server-confirmed route results#215
OziinG merged 2 commits into
mainfrom
codex/cc-265-current-position-alert

Conversation

@OziinG

@OziinG OziinG commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes #212

Change control: EVNSolution/clever-change-control#265

Outcome

  • derives raw mismatch evidence only from server-owned operationalState: in-progress lifecycle, fresh/reliable position, server-evaluated proximity threshold, nearest stop sequence, and authoritative server progress
  • maps that evidence through the canonical operational-state presentation and reuses its Alert, GPS, Server, Gap, and Sync Pills
  • keeps Gap strictly Device-to-server; when Device evidence is absent, the warning shows Gap unknown
  • preserves GPS as location evidence only; it never marks a stop delivered
  • suppresses warnings for stale/unreliable GPS, server threshold false, missing legacy evidence, terminal routes, and the next unresolved stop

Kitchener regression

The 1/11 server-results versus GPS-near-Stop-11 case renders canonical evidence including:

  • Alert warning
  • GPS fresh
  • GPS Stop 11 nearby
  • Server 1/11
  • Gap unknown when Device evidence is absent
  • Sync unknown

The warning states that at least nine earlier planned stops have no result and that GPS proximity does not confirm delivery.

Verification

  • focused route tracking and operational-state tests: 55/55
  • full Shopify tests: 616/616
  • lint: pass, zero warnings
  • build: pass
  • typecheck: pass
  • public URL guard: pass
  • Shopify Polaris App Home component validation: pass
  • git diff --check: pass
  • control-plane preflight: ready

The current node:test harness has no JSX transform or DOM renderer. Accessibility is therefore covered by the closest available source contract for role="alert", the warning banner heading, the evidence group label, and canonical Pill wiring; no new test dependency was added.

Release boundary

This PR is source-only. It does not merge or deploy.

Keep GPS proximity, server-confirmed results, and unresolved gaps as independent evidence so Kitchener-style event loss is visible without implying delivery completion.

Constraint: Preserve the deployed independent-Pill UI and Shopify source-data read-only boundary.

Rejected: Treat GPS proximity as stop completion | GPS is location evidence only.

Confidence: high

Scope-risk: narrow

Directive: Keep the next unresolved stop free of mismatch warnings and require server result evidence.

Tested: focused tracking 41/41; full Shopify 613/613; lint; build; typecheck; public URL guard; diff check

Not-tested: live production GPS traffic and physical driver workflow
@OziinG

OziinG commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Implementation verification is complete for head 1ec12f2811e77997b1d109a0a992a1057c40095d.

  • GitHub CI run 32785157691: success
  • focused tracking: 41/41
  • full Shopify: 613/613
  • lint, build, typecheck, public URL guard, compose validation, and diff check: pass

Independent code-reviewer and architecture review remain required before merge. This implementation lane has not approved, merged, or deployed the PR.

Constraint: Server operationalState owns proximity, freshness, and terminal result counts.

Rejected: Recalculate proximity or result Pills in Shopify | duplicates Route Ops policy and misstates missing evidence.

Confidence: high

Scope-risk: narrow

Directive: Preserve Device-to-server Gap semantics and suppress alerts when server evidence is incomplete.

Tested: focused 55/55; full Shopify 616/616; lint; build; typecheck; public URL guard; Shopify component validation; diff check

Not-tested: DOM-rendered accessibility because the node:test harness has no JSX/DOM renderer; live production GPS traffic
@OziinG

OziinG commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

HOLD remediation is now on exact head 04691aac3f87d7fdf7106be9c07e42c7fa957336.

  • Removed Shopify-owned 100m/coordinate proximity logic.
  • Raw mismatch evidence now requires server operationalState: IN_PROGRESS, FRESH, reliableForProximity=true, withinProximityThreshold=true, nearestStopSequence, and authoritative serverProgress counts.
  • Missing legacy state/progress stays unknown and suppresses the warning; no missing count is coerced to zero.
  • Canonical operational-state.js now owns the alert presentation and reuses its Alert/GPS/Server/Gap/Sync Pills.
  • Gap remains Device-to-server and is Gap unknown when Device evidence is absent.
  • Server-resolved SKIPPED/CANCELLED terminal outcomes are represented by authoritative resolvedStopCount; the conservative earlier-unresolved lower bound prevents false warnings at the next unresolved stop.
  • Added Kitchener, stale/AGING, unreliable, threshold-false, missing evidence, SKIPPED/CANCELLED, Device-absent, malformed mismatch, accessibility wiring, and no-separator regressions.

Fresh local evidence: focused 55/55; full Shopify 616/616; build, typecheck, lint, public URL guard, Polaris component validator, diff check, and control-plane preflight all pass.

Accessibility test gap: this repository node:test harness has no JSX transform or DOM renderer. The closest available contract asserts role="alert", banner heading, evidence aria label, canonical Pill wiring, and no middle-dot/bullet separator without adding a new dependency.

No merge or deployment was performed.

@OziinG
OziinG merged commit f96d08f into main Aug 24, 2026
2 checks passed
@OziinG
OziinG deleted the codex/cc-265-current-position-alert branch August 24, 2026 22:57
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.

Harden K-food webhook admission and show independent operation health

1 participant