Skip to content

Allow cross-date route additions with exclusive ownership and scoped endpoint evidence - #478

Merged
OziinG merged 1 commit into
mainfrom
codex/kfood-route-usability
Oct 2, 2026
Merged

OziinG merged 1 commit into
mainfrom
codex/kfood-route-usability

Conversation

@OziinG

@OziinG OziinG commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Dispatchers can manually add another delivery date or a Date Pending order to an existing route without rewriting the order date or route date. New-group planning keeps its date validation. Manual additions retain tenant, cancellation, terminal-status, coordinate and ownership checks, and concurrent claims leave exactly one route owner with a complete rollback for the losing request.

Route tracking now rejects lifecycle evidence outside the execution window or completion evidence older than the latest start, so the companion Shopify Start/End rows do not reuse an earlier execution. The included toll-road feasibility note is research only; it makes no routing or infrastructure changes.

Validation

  • Exact-head GitHub CI passed.

  • Prisma client generation, full API lint, final changed-file lint, typecheck and build passed.

  • API suite: 3,014 passed; 232 DB-dependent cases skipped by the ordinary runner.

  • Isolated PostgreSQL route-grouping suite: 40/40 passed, including cross-date/Date Pending save and reload, concurrent ownership, and late ineligibility.

  • Independent code review: no remaining findings.

  • No production deployment or order mutation performed.

The Shopify companion EVNSolution/shopify-clever#318 must be released after this server change to enable cross-date additions end to end. Operational deployment remains a separate action.

Manual additions preserve stored delivery dates while enforcing tenant,
terminal-state, coordinate and exclusive route ownership checks. Scope
lifecycle evidence to the active execution before showing endpoint times.

Constraint: Toll-road policy is research only; no runtime or production changes.
Rejected: Removing all grouping date checks | New planning still owns its date range.
Confidence: high
Scope-risk: moderate
Tested: 3014 unit tests; 40 PostgreSQL integration tests including concurrent additions; lint, typecheck, build and Prisma generation.
Not-tested: Production writes and deployment.
@OziinG
OziinG marked this pull request as ready for review October 2, 2026 15:41
@OziinG
OziinG merged commit ad9275f 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